> ## Documentation Index
> Fetch the complete documentation index at: https://ngquct-feat-ai-sql-walkthroughs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cassandra / ScyllaDB

> Connect to Cassandra and ScyllaDB clusters, browse keyspaces, and run CQL queries

# Cassandra / ScyllaDB Connections

TablePro supports Apache Cassandra 3.0+ and ScyllaDB via the CQL native protocol. The driver requires the `system_schema` keyspace, introduced in Cassandra 3.0. Browse keyspaces and tables, inspect table structure, and run CQL in the editor.

## Quick setup

Click **New Connection**, select **Cassandra** or **ScyllaDB** (both entries use the same driver), enter host, port, credentials, and keyspace, and connect. The plugin auto-installs from the registry, or use **Settings** > **Plugins** > **Browse** > **Cassandra Driver**.

## Connection settings

| Field        | Default     | Notes                             |
| ------------ | ----------- | --------------------------------- |
| **Host**     | `localhost` | CQL contact point                 |
| **Port**     | `9042`      | CQL native port                   |
| **Keyspace** | -           | Leave empty for local dev         |
| **Username** | -           | Only if authentication is enabled |
| **Password** | -           |                                   |

## Connection URLs

```text theme={null}
cassandra://user:password@host:9042/keyspace
scylladb://user:password@host:9042/keyspace
```

`cql://` and `scylla://` work too. See [Connection URL Reference](/databases/connection-urls#cassandra--scylladb).

## Example configurations

**Local**: host `localhost:9042`, no auth
**Docker**: `cassandra:latest`, user/pass `cassandra:cassandra`
**Remote**: use [SSH tunneling](/databases/ssh-tunneling) for production clusters

## Amazon Keyspaces (IAM)

Set **Authentication** to an AWS IAM mode (Access Key, Profile, or SSO) to connect to Amazon Keyspaces with SigV4 signing instead of a password. Enter the AWS region and enable TLS, which Keyspaces requires (use the `cassandra.{region}.amazonaws.com` endpoint on port 9142). Profiles resolve from `~/.aws/config` and `~/.aws/credentials`, including `credential_process`, SSO, and assumed roles.

**SSL/TLS**: The Cassandra driver has no TLS fallback. **Preferred** behaves the same as **Required** (the SSL pane shows a warning). Use **Verify CA** with a CA certificate path for private PKI. For mutual TLS, set the client certificate and key paths; if the key is encrypted, enter its passphrase in the **Key Passphrase** field (stored in the Keychain). See [SSL/TLS](/features/ssl) for details.

## Features

**Keyspace browsing**: The sidebar lists keyspaces, and each keyspace lists its tables. Click a table to view its data.

**Table structure**: The structure view shows each column's name, CQL type, and a primary key flag (set for both partition key and clustering columns), plus the table's secondary indexes. Structure editing supports adding and dropping columns; make other schema changes in the CQL editor.

**Data grid**: Paginated, with type-aware formatting: uuid/timeuuid formatted, timestamps configurable, map/set/list/tuple as formatted collections, blob as hex.

<Frame caption="Keyspace tables in the sidebar with the data grid">
  <img className="block dark:hidden" src="https://mintcdn.com/ngquct-feat-ai-sql-walkthroughs/REI9tfF_TGivM099/images/cassandra-keyspace-browser.png?fit=max&auto=format&n=REI9tfF_TGivM099&q=85&s=252425827692c5ebf2410fd15c7411e7" alt="Cassandra keyspace and tables in the sidebar with table data in the grid" width="1560" height="960" data-path="images/cassandra-keyspace-browser.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/ngquct-feat-ai-sql-walkthroughs/REI9tfF_TGivM099/images/cassandra-keyspace-browser-dark.png?fit=max&auto=format&n=REI9tfF_TGivM099&q=85&s=127fff1846372caf4f585b7f87de5b00" alt="Cassandra keyspace and tables in the sidebar with table data in the grid" width="1560" height="960" data-path="images/cassandra-keyspace-browser-dark.png" />
</Frame>

### CQL editor

```sql theme={null}
SELECT * FROM users WHERE user_id = 123e4567-e89b-12d3-a456-426614174000;

INSERT INTO users (user_id, name, email, created_at)
VALUES (uuid(), 'Alice', 'alice@example.com', toTimestamp(now()));

UPDATE users USING TTL 86400
SET email = 'new@example.com'
WHERE user_id = 123e4567-e89b-12d3-a456-426614174000;

CREATE TABLE IF NOT EXISTS events (
    event_id timeuuid,
    user_id uuid,
    event_type text,
    payload text,
    PRIMARY KEY ((user_id), event_id)
) WITH CLUSTERING ORDER BY (event_id DESC);

CREATE INDEX ON users (email);
```

## CQL notes

* No JOINs or subqueries: denormalize, or run sequential statements.
* Every SELECT needs the full partition key in WHERE, or `ALLOW FILTERING` (a cluster scan, slow in production).
* Lightweight transactions: conditional writes with `IF`, e.g. `INSERT INTO users (...) IF NOT EXISTS;`.
* TTL and writetime: `USING TTL 3600`; `SELECT TTL(value), WRITETIME(value) FROM cache WHERE key = 'k1';`.

## Troubleshooting

**Connection refused**: Check Cassandra is running (`nodetool status`), verify port 9042 in `cassandra.yaml`, check `rpc_address` and `listen_address`.

**Auth failed**: Verify credentials, check `authenticator: PasswordAuthenticator` in `cassandra.yaml`. Default superuser: `cassandra:cassandra`.

**Timeout**: The driver uses a fixed 10 second connect timeout and 30 second request timeout. Neither is configurable, and the app-wide query timeout setting does not apply to Cassandra. Check host, port, firewall rules, and cloud IP allowlists.

**Read timeout**: Include the full partition key in WHERE, add a `LIMIT`, check cluster health with `nodetool`.

## Limitations

* Materialized views, UDTs, UDFs, and UDAs do not appear in the sidebar. Query `system_schema` tables in the CQL editor instead.
* Table options (compaction, compression, gc\_grace\_seconds) and clustering order are not shown in the structure view.
* DataStax Astra DB is not supported: the driver cannot load a Secure Connect Bundle.
* Counter columns are read-only in the grid; update them in the editor.
* Multi-DC settings are not configurable.
