Create a Cassandra table

Create a Cassandra table as part of the basic tutorial.

Procedure

  1. 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:
    $ nodetool status
  2. Start cqlsh, and create a keyspace. Use the keyspace.
    cqlsh> CREATE KEYSPACE nhanes_ks WITH REPLICATION =
           {'class':'NetworkTopologyStrategy', 'Solr':1};
    
    cqlsh> USE nhanes_ks;
  3. 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.