Last active
August 29, 2015 14:19
-
-
Save nivdul/88d1dbb944f75c8bf612 to your computer and use it in GitHub Desktop.
Cassandra cql requests
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
CREATE KEYSPACE actitracker WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1 }; | |
CREATE TABLE users (user_id int,activity text,timestamp bigint,acc_x double,acc_y double,acc_z double, PRIMARY KEY ((user_id,activity),timestamp)); | |
COPY users FROM '/path_to_your_data/data.csv' WITH HEADER = true; | |
SELECT * FROM users WHERE user_id = 8 AND activity = 'Standing' LIMIT 10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment