Skip to content

Instantly share code, notes, and snippets.

@at15
Created September 15, 2017 07:15
Show Gist options
  • Save at15/53e74aa7feb989adeeb0d4968d4af0ca to your computer and use it in GitHub Desktop.
Save at15/53e74aa7feb989adeeb0d4968d4af0ca to your computer and use it in GitHub Desktop.
Kairosdb Cassandra schema
CREATE TABLE IF NOT EXISTS data_points (
key blob,
column1 blob,
value blob,
PRIMARY KEY ((key), column1)
) WITH COMPACT STORAGE;
CREATE TABLE IF NOT EXISTS row_key_index (
key blob,
column1 blob,
value blob,
PRIMARY KEY ((key), column1)
) WITH COMPACT STORAGE;
CREATE TABLE IF NOT EXISTS row_key_time_index (
metric text,
row_time timestamp,
value text,
PRIMARY KEY ((metric), row_time)
)
CREATE TABLE IF NOT EXISTS row_keys (
metric text,
row_time timestamp,
data_type text,
tags frozen<map<text, text>>,
value text,
PRIMARY KEY ((metric, row_time), data_type, tags)
)
CREATE TABLE IF NOT EXISTS string_index (
key blob,
column1 blob,
value blob,
PRIMARY KEY ((key), column1)
) WITH COMPACT STORAGE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment