Database Reference
In-Depth Information
use twitterkeyspace;
create table dumpuser(user_id timeuuid
primary key, fname text,lname text);
2.
Next, import data from output.json using json2sstable in
the dumpuser table:
$CASSANDRA_HOME/bin/json2sstable -K
twitterkeyspace -c dumpuser output.json /var/
lib/cassandra/data/twitterkeyspace/dumpuser/
twitterkeyspace-dumpuser-jb-1-Data.db
Importing 4 keys...
4 keys imported successfully.
3.
Next refresh the newly loaded sstables using the nodetool re-
fresh command:
$CASSANDRA_HOME/bin/nodetool refresh
twitterkeyspace dumpuser
nodetool refresh makes data available without a node re-
start.
4.
Now we can verify the loaded data by running the select command
using the cql shell over the table dumpuser :
cqlsh:twitterkeyspace> select * from dumpuser;
user_id |
fname | lname
--------------------------------------+---------+-----------
849d5820-50e3-11e4-abc1-3f484de45426 |
Brian | Neill
74ac3a80-50e3-11e4-abc1-3f484de45426 |
Melissa | Maldonado
7c34a260-50e3-11e4-abc1-3f484de45426 |
Chris | Nelson
f7d1f2c0-50e2-11e4-abc1-3f484de45426 |
vivek | mishra
(4 rows)
Search WWH ::




Custom Search