Use CQL shell (cqlsh)
CQL shell (cqlsh) is a Python-based command-line interface for interacting with Cassandra-based databases.
Use it to execute CQL commands to manage schemas, query and modify data, and perform administrative tasks.
You can work interactively at a prompt or run commands from a file or directly from the command line.
cqlsh connects to a running database instance using the the Apache Cassandra Python driver and the native protocol.
CQL shell commands
In addition to executing CQL statements, cqlsh provides a set of built-in shell commands.
These commands control the cqlsh session, format output, inspect cluster metadata, and perform utility tasks such as importing or exporting data.
Shell commands are interpreted by cqlsh and are not sent to the database as CQL.
Because these commands are implemented by the cqlsh client rather than the database itself, they are not available when connecting through Apache Cassandra drivers or other tools such as DataStax Studio, that only support CQL commands.
Prerequisites
cqlsh requires Python 2.7 or a supported Python 3 version (3.6–3.11).
Newer versions of Python 3 (3.12 and later) are not supported.