-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.txt
54 lines (48 loc) · 1.43 KB
/
schema.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
CREATE KEYSPACE balboa WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 1};
USE balboa;
CREATE TABLE observations_by_rdata (
rrname text,
rdata text,
rrtype text,
sensor_id text,
last_seen timestamp,
PRIMARY KEY (sensor_id, rdata, rrname, rrtype)
);
CREATE CUSTOM INDEX observations_by_rdata_idx ON balboa.observations_by_rdata(rdata)
USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = {
'mode': 'CONTAINS',
'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer',
'case_sensitive': 'false'
};
CREATE TABLE observations_by_rrname (
rrname text,
rdata text,
rrtype text,
sensor_id text,
last_seen timestamp,
PRIMARY KEY (sensor_id, rrname, rdata, rrtype)
);
CREATE CUSTOM INDEX observations_by_rrname_idx ON balboa.observations_by_rrname(rrname)
USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = {
'mode': 'CONTAINS',
'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer',
'case_sensitive': 'false'
};
CREATE TABLE observations_firstseen (
rrname text,
rdata text,
rrtype text,
sensor_id text,
first_seen timestamp,
PRIMARY KEY (sensor_id, rrname, rdata, rrtype)
);
CREATE TABLE observations_counts (
rrname text,
rdata text,
rrtype text,
sensor_id text,
count counter,
PRIMARY KEY (sensor_id, rrname, rdata, rrtype)
);