Cassandra Query Language (CQL) for Astra DB

Because Astra DB is powered by Apache Cassandra®, you can send Cassandra Query Language (CQL) statements to your Astra DB Serverless databases with the CQL shell (cqlsh), Cassandra drivers, or the Data API.

To use CQL for Astra DB, you need an active Astra DB Serverless database with a keyspace. Familiarity with CQL is helpful but not required.

For more information about CQL for Astra DB, including command examples and specifications, see the CQL for Astra DB reference.

Limitations on CQL for Astra DB

To ensure high availability and optimum performance, Astra DB Serverless databases have guardrails on underlying Cassandra functionality, including commands and functionality available through CQL for Astra DB.

Keyspace, table, and column names are case sensitive

If you create a table in the Astra Portal, the table name, keyspace name, and column names become case-sensitive. Make sure your CQL commands use case sensitivity for these values. For more information, see How do I fix a "table does not exist" error in CQL.

Unsupported values are ignored

If you pass a CQL statement with unsupported data definition language (DDL) properties, the statement is executed without the unsupported values. Astra DB ignores the unsupported values and throws a warning.

For example, the following command creates a table with the given schema, and it attempts to pass an additional nodesync property:

CREATE TABLE IF NOT EXISTS library.books
  (
    id UUID PRIMARY KEY,
    lastname text,
    firstname text)
  WITH nodesync={'enabled': 'true'};

If you execute this statement against an Astra DB database, the table is created but the nodesync property is ignored. The response includes a warning with the ignored unsupported values:

Warnings :
Ignoring provided values [nodesync] as they are not supported for Table
Properties(ignored values are: [additional_write_policy,
bloom_filter_fp_chance, caching, cdc, compaction, compression,
crc_check_chance, dse_edge_label_property, dse_vertex_label_property,
gc_grace_seconds, id, max_index_interval, memtable,
memtable_flush_period_in_ms, min_index_interval, nodesync, read_repair,
speculative_retry])

Limited support for user-defined objects

CQL for Astra DB supports user-defined type (UDTs). It doesn’t support user-defined functions (UDFs) or user-defined aggregate functions (UDAs).

Unsupported CQL commands

For all supported CQL commands, see the CQL for Astra DB quick reference.

CQL for Astra DB doesn’t support the following commands:

Category Unsupported commands Notes

Access control

  • CREATE ROLE

  • GRANT ROLE

  • ALTER ROLE

  • REVOKE ROLE

  • DROP ROLE

  • LIST ROLES

  • GRANT PERMISSION

  • LIST PERMISSIONS

  • REVOKE PERMISSION

  • RESTRICT

  • RESTRICT ROWS

  • UNRESTRICT

  • UNRESTRICT ROWS

For information access control in Astra, see Roles and permissions reference.

Keyspaces

  • CREATE KEYSPACE

  • ALTER KEYSPACE

  • DROP KEYSPACE

The CQL shell DESCRIBE KEYSPACE command is supported.

For information about keyspaces in Astra, see Manage keyspaces.

Materialized views (MV)

  • CREATE MATERIALIZED VIEW

  • ALTER MATERIALIZED VIEW

  • DROP MATERIALIZED VIEW

Triggers

  • CREATE TRIGGER

  • DROP TRIGGER

User-defined aggregates (UDA)

  • CREATE AGGREGATE

  • DESCRIBE AGGREGATE

  • DROP AGGREGATE

Astra DB supports user-defined types (UDT) only.

User-defined functions (UDF)

  • CREATE FUNCTION

  • DESCRIBE FUNCTION

  • DROP FUNCTION

Astra DB supports UDT only.

DSE Search indexes

  • CREATE SEARCH INDEX

  • COMMIT SEARCH INDEX

  • REBUILD SEARCH INDEX

  • RELOAD SEARCH INDEX

  • ALTER SEARCH INDEX SCHEMA

  • ALTER SEARCH INDEX CONFIG

  • DROP SEARCH INDEX CONFIG

Execute CQL statements

To run CQL statements against your Astra DB Serverless databases, you can use the CQL shell, a Cassandra driver, or the Data API.

Data API and clients

You can use the Data API and clients to manage tables in Astra DB Serverless databases, including tables you previously created with cqlsh or a driver. For more information, see Get started with the Data API (HTTP) and About tables with the Data API (HTTP).

Drivers

Astra DB Serverless databases are compatible with the following Cassandra drivers:

For more information, see Cassandra driver compatibility.

CQL shell (cqlsh)

The CQL shell is a command-line utility that you can use to interact with your Astra DB Serverless databases using CQL. For more information, see Connect to the CQL shell for Astra DB.

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2026 | Privacy policy | Terms of use |  Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: Contact IBM