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 Enterprise nodes.
  • DataStax drivers for developing applications.
  • DataStax Studio an interactive tool for exploring and visualizing large datasets using DSE Graph. It provides an intuitive interface for developers and analysts to collaborate and test theories by mixing code, documentation, query results and visualizations into self-documenting notebooks.

Starting cqlsh 

Launch the cqlsh utility with the default settings.

Execute the cqlsh python script to start the CQL shell; CQL shell is a python-based command line client for executing CQL commands interactively. CQL shell supports tab completion.

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

Procedure

  1. Navigate to the DataStax Enterprise installation directory.
  2. Start cqlsh on the Mac OSX, for example.
    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. Some platforms, such as Mac OSX, do not ship with tab completion installed. You can use easy_install to install tab completion capabilities on Mac OSX:
    easy_install readline