Standalone CQL shell

Instead of using the native CQL shell that is included in DataStax Enterprise (DSE) or DataStax Distribution of Apache Cassandra (DDAC), the standalone CQLSH client is a separate, lightweight tool you can use to interact with your database.

Each DataStax Astra database includes an embedded CQL shell instance. In the DataStax Astra console, navigate to your database and click the CQL Console tab to open a CQLSH instance that is connected to your database.


  1. Download CQLSH. Choose the version for DataStax Astra.

  2. Create a DataStax Astra database.

  3. Download the secure connect bundle to obtain connection credentials for your DataStax Astra database.

Alternatively, have a teammate provide access to their Astra database.


  1. Change to the directory where you downloaded the CQLSH tarball and then extract it:

$ cd /<download_directory>
$ tar -xvf cqlsh-astra-<date>-bin.tar.gz
  • date - The date that the tarball was released, such as 20210304.

  1. From the directory where you extracted the CQLSH tarball, run the cqlsh script from the command line:

$ cd /cqlsh-astra
$ ./bin/cqlsh -u **clientID** -p **clientSecret** -b /path/to/secure-connect**database_name**.zip

Use the -b option to specify the location of the secure connect bundle that you downloaded for your database. Pass the Client Id and Client Secret for your database role using the -u and -p options. For more, see Manage application tokens.

  • username - Client ID for the database role.

  • password - Client secret for the specified Client ID.

  • database_name - Name of the Astra database to which you want to connect. Include the absolute path to the secure connect bundle for the database, such as /Users/myuser/Downloads/

Configure the cqlshrc file If you do not want to pass the secure connect bundle on the command line every time, set up the location in your cqlshrc file.

In the [authentication] section of the cqlshrc file in ~/.cassandra, include the Client ID and Client Secret from your application token. Configure the [connection] section of the cqlshrc file in ~/.cassandra to include the path to your connection credentials.

username = clientID
password = clientSecret

secure_connect_bundle = **/path/to/**secure-connect-**database_name**.zip


You are connected directly to your Astra database using CQLSH.

[cqlsh 6.8.0 | DSE | CQL spec 3.4.5 | DSE protocol v2]
Use HELP for help.

Switch to your KEYSPACE, where you can issue CQL commands to create tables, insert data, and manage database resources:

USE keyspace_name;