Created
June 27, 2023 13:53
-
-
Save guy9/cfa98fbf00f1718171dc7f71432b1a36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keyspace: iot | |
keyspace_definition: | | |
CREATE KEYSPACE IF NOT EXISTS iot WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; | |
table: devices | |
table_definition: | | |
CREATE TABLE devices ( | |
device_id uuid, | |
ts timestamp, | |
temperature float, | |
pressure float, | |
humidity float, | |
is_active boolean, | |
PRIMARY KEY(device_id, ts)) | |
columnspec: | |
- name: device_id | |
population: seq(1..1B) | |
- name: ts | |
population: uniform(1..100) | |
insert: | |
partitions: fixed(1) | |
batchtype: UNLOGGED | |
select: fixed(10)/10 | |
queries: | |
read-latest: | |
cql: SELECT * FROM devices WHERE device_id = ? AND ts = ? LIMIT 1 | |
fields: samerow | |
scan-partition: | |
cql: SELECT * FROM devices WHERE device_id = ? AND ts = ? | |
fields: samerow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment