Created
December 4, 2014 16:38
-
-
Save mfelsche/4b78602f58a43b14c5b1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
-- users | |
DROP TABLE users; | |
CREATE TABLE users ( | |
username STRING PRIMARY KEY, | |
name STRING, | |
address STRING INDEX USING FULLTEXT, | |
date_of_birth TIMESTAMP, | |
date_joined TIMESTAMP, | |
month_partition STRING PRIMARY KEY | |
) CLUSTERED INTO 4 shards | |
PARTITIONED BY (month_partition) | |
WITH (number_of_replicas = 0, refresh_interval = 0); | |
-- steps | |
DROP TABLE steps; | |
CREATE TABLE steps ( | |
username STRING, | |
ts TIMESTAMP, | |
num_steps INTEGER, | |
month_partition STRING, | |
payload OBJECT(dynamic) | |
) CLUSTERED BY (username) INTO 4 shards | |
PARTITIONED BY (month_partition) | |
WITH (number_of_replicas = 0, refresh_interval = 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment