Nodetool
ℹ️ For technical support, please contact us via email.
Create the killrvideo keyspace and the videos table
✅ Start cqlsh
./cqlsh
✅ Create the killrvideo keyspace:
CREATE KEYSPACE IF NOT EXISTS killrvideo
WITH replication = {
'class':'SimpleStrategy',
'replication_factor': 1
};
✅ Use the keyspace:
use killrvideo;
✅ Create the videos table:
CREATE TABLE IF NOT EXISTS videos (
video_id TIMEUUID,
added_date TIMESTAMP,
title TEXT,
PRIMARY KEY (video_id)
);
✅ Populate the videos table:
COPY videos(video_id, added_date, title)
FROM '/workspace/ds201-lab06/data-files/videos.csv'
WITH HEADER=TRUE;
✅ Verify that the data was loaded:
SELECT * from videos;
You should see that six rows have been added to the table.
✅ Exit cqlsh:
exit