· 7 years ago · Oct 23, 2018, 11:04 AM
1---
2tags:
3 group: schema
4statements:
5- name: create-keyspace
6 prepared: false
7 statement: |
8 create keyspace if not exists <<KEYSPACE:fallout>>
9 WITH replication = <<replication:{'class': 'SimpleStrategy', 'replication_factor': '1'}>>
10 AND durable_writes = <<durable_writes:true>>;
11- name: create-table
12 prepared: false
13 statement: |
14 CREATE TABLE <<KEYSPACE:fallout>>.blobs (
15 key text,
16 blob text
17 PRIMARY KEY(key)
18 )
19 WITH compaction = <<compaction:{'class': 'SizeTieredCompactionStrategy'}>>
20 AND compression = <<compression:{'class': 'LZ4Compressor'}>>;
21---
22tags:
23 group: write-uniform
24statements:
25 - name: write-blobs
26 prepared: true
27 statement: |
28 insert into <<KEYSPACE:fallout>>.users (key, blob)
29 values (?key, ?blob);
30 bindings:
31 key: AlphaNumericString(<<key_len:25>>) -> text
32 blob: AlphaNumericString(<<blob_len:256>>) -> text