mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
Merge pull request #307 from dougwettlaufer/feature/http-schema-update
Add schema-astra phase to http timeseries workloads
This commit is contained in:
commit
89eeaa9481
@ -64,6 +64,23 @@ blocks:
|
|||||||
truncate table <<keyspace:baselines>>.<<table:iot>>;
|
truncate table <<keyspace:baselines>>.<<table:iot>>;
|
||||||
tags:
|
tags:
|
||||||
name: truncate-table
|
name: truncate-table
|
||||||
|
- tags:
|
||||||
|
phase: schema-astra
|
||||||
|
params:
|
||||||
|
prepared: false
|
||||||
|
statements:
|
||||||
|
- create-table-astra : |
|
||||||
|
create table if not exists <<keyspace:baselines>>.<<table:iot>> (
|
||||||
|
machine_id UUID, // source machine
|
||||||
|
sensor_name text, // sensor name
|
||||||
|
time timestamp, // timestamp of collection
|
||||||
|
sensor_value double, //
|
||||||
|
station_id UUID, // source location
|
||||||
|
data text,
|
||||||
|
PRIMARY KEY ((machine_id, sensor_name), time)
|
||||||
|
) WITH CLUSTERING ORDER BY (time DESC);
|
||||||
|
tags:
|
||||||
|
name: create-table-astra
|
||||||
- name: rampup
|
- name: rampup
|
||||||
tags:
|
tags:
|
||||||
phase: rampup
|
phase: rampup
|
||||||
|
@ -66,6 +66,23 @@ blocks:
|
|||||||
truncate table <<keyspace:gqlcf_iot>>.<<table:iot>>;
|
truncate table <<keyspace:gqlcf_iot>>.<<table:iot>>;
|
||||||
tags:
|
tags:
|
||||||
name: truncate-table
|
name: truncate-table
|
||||||
|
- tags:
|
||||||
|
phase: schema-astra
|
||||||
|
params:
|
||||||
|
prepared: false
|
||||||
|
statements:
|
||||||
|
- create-table-astra : |
|
||||||
|
create table if not exists <<keyspace:gqlcf_iot>>.<<table:iot>> (
|
||||||
|
machine_id UUID, // source machine
|
||||||
|
sensor_name text, // sensor name
|
||||||
|
time timestamp, // timestamp of collection
|
||||||
|
sensor_value double, //
|
||||||
|
station_id UUID, // source location
|
||||||
|
data text,
|
||||||
|
PRIMARY KEY ((machine_id, sensor_name), time)
|
||||||
|
) WITH CLUSTERING ORDER BY (time DESC);
|
||||||
|
tags:
|
||||||
|
name: create-table-astra
|
||||||
- name: rampup
|
- name: rampup
|
||||||
tags:
|
tags:
|
||||||
phase: rampup
|
phase: rampup
|
||||||
|
@ -65,7 +65,20 @@ blocks:
|
|||||||
}
|
}
|
||||||
tags:
|
tags:
|
||||||
name: create-gql-schema
|
name: create-gql-schema
|
||||||
|
- tags:
|
||||||
|
phase: schema-astra
|
||||||
|
statements:
|
||||||
|
- create-gql-schema: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphqlv2/admin
|
||||||
|
Accept: "application/json"
|
||||||
|
X-Cassandra-Request-Id: "{request_id}"
|
||||||
|
X-Cassandra-Token: "<<auth_token:my_auth_token>>"
|
||||||
|
Content-Type: "application/json"
|
||||||
|
body: |
|
||||||
|
{
|
||||||
|
"query":"mutation {\n deploySchema(namespace: \"<<keyspace:gqlsf_timeseries>>\", schema: \"\"\"\n type Iot @cql_input {\n machine_id: Uuid! @cql_column(partitionKey: true)\n sensor_name: String! @cql_column(partitionKey: true)\n time: Timestamp! @cql_column(clusteringOrder: DESC)\n sensor_value: Float!\n \tstation_id: Uuid!\n data: String!\n }\n type SelectIotResult @cql_payload {\n \t\tdata: [Iot]\n \t\tpagingState: String\n }\n type Query {\n getIots(\n machine_id: Uuid!,\n sensor_name: String!,\n pagingState: String @cql_pagingState\n ): SelectIotResult @cql_select(pageSize: 10)\n }\n type Mutation {\n \t\tinsertIot(iot: IotInput): Iot\n }\n \"\"\") {\n version\n }\n}\n"
|
||||||
|
}
|
||||||
|
tags:
|
||||||
|
name: create-gql-schema
|
||||||
- name: rampup
|
- name: rampup
|
||||||
tags:
|
tags:
|
||||||
phase: rampup
|
phase: rampup
|
||||||
|
Loading…
Reference in New Issue
Block a user