Create a Cassandra table as part of the basic tutorial.
Create a Cassandra table as part of the basic tutorial.
Procedure
-
Ensure that your configuration is appropriate, and that you know the snitch for
your cluster. See Configuring replication
and verify the status of your node:
-
Start cqlsh, and create a keyspace.
Use the keyspace.
cqlsh> CREATE KEYSPACE nhanes_ks WITH REPLICATION =
{'class':'NetworkTopologyStrategy', 'Solr':1};
cqlsh> USE nhanes_ks;
-
Copy the CQL table definition from the downloaded
create_nhanes.cql file, and paste it on the cqlsh
command line.
This action creates the nhanes table in the nhanes_ks keyspace.