Accessing data using CQL

Resources for running CQL commands, including steps to launch the cqlsh utility.

Common ways to access CQL are:

  • CQL shell (cqlsh): a Python-based command-line client installed on DataStax Distribution of Apache Cassandra™ nodes.
  • DataStax drivers for developing applications.

Starting cqlsh

Launch the cqlsh utility with the default settings.

To connect to a security enabled cluster, see Using cqlsh with Kerberos or user authentication.

Tip: For a complete list of cqlsh options, see cqlsh (startup options).

Procedure

  1. Navigate to the DataStax Distribution of Apache Cassandra™ installation directory.
  2. Start cqlsh. For example.
    installation_directory/bin/cqlsh
    If you use security features, provide a user name and password.
  3. Print the help menu for cqlsh.
    bin/cqlsh --help
  4. Optionally, specify the IP address and port to start cqlsh on a different node.
    bin/cqlsh 100.0.0.75 9042
    Note: You can use tab completion to see hints about how to complete a cqlsh command.