Last active
May 18, 2020 21:03
-
-
Save debloper/b48c9557925048e394565e650015191c to your computer and use it in GitHub Desktop.
Initialize a simple cassandra cluster
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 | |
Connected to Test Cluster at 127.0.0.1:9042. | |
[cqlsh 5.0.1 | Cassandra 3.11.6 | CQL spec 3.4.4 | Native protocol v4] | |
Use HELP for help. | |
cqlsh> CREATE KEYSPACE foo WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; | |
cqlsh> USE foo; | |
cqlsh:foo> CREATE TABLE foo.bar (id int PRIMARY KEY, status text, details list<text>); | |
cqlsh:foo> INSERT INTO bar (id, status, details) VALUES (1, 'done', ['sample text']); | |
cqlsh:foo> SELECT * from bar; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment