Last active
August 15, 2016 12:01
-
-
Save tzach/7d3a4540264418fdb15aa9fa159e0188 to your computer and use it in GitHub Desktop.
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
cqlsh> | |
CREATE KEYSPACE mykeyspace WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }; | |
use mykeyspace ; | |
CREATE TABLE users (user_id int PRIMARY KEY, fname text, lname text); | |
insert into users (user_id , fname, lname) values (1, 'tzach', 'livyatan'); | |
insert into users (user_id , fname, lname) values (2, 'dor', 'laor'); | |
insert into users (user_id , fname, lname) values (3, 'shlomi', 'laor'); | |
insert into users (user_id , fname, lname) values (4, 'shlomi', 'livne'); | |
insert into users (user_id , fname, lname) values (6, 'avi', 'kivity'); | |
./presto-cli --server localhost:8080 --catalog hive --schema default | |
presto:default> | |
SELECT * FROM cassandra.mykeyspace.users where user_id >= 2 and user_id <= 3 | |
-> ; | |
user_id | fname | lname | |
---------+--------+------- | |
2 | dor | laor | |
3 | shlomi | laor | |
(2 rows) | |
Query 20160627_072855_00002_knar7, FINISHED, 1 node | |
presto:default> SELECT * FROM cassandra.mykeyspace.users limit 1; | |
user_id | fname | lname | |
---------+-------+---------- | |
1 | tzach | livyatan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Join example