Apache Cassandra
DataKlin connects to Apache Cassandra 4.1 and 5.0 through its built-in Cassandra connector. It signs in with a user name and password, or without either when the cluster doesn’t require them. The connection is plaintext only in this release: there are no TLS settings, so use it only on a trusted network. You can browse keyspaces, tables and other objects in the Database Explorer, open their definitions (DESCRIBE), and run CQL with results fetched page by page.
Supported versions Cassandra 4.1 and 5.0
- CQL completion
- Paged results
Connect
Section titled “Connect”-
Open New Connection. Click New Connection in the header of the Database Explorer, choose File › New Connection…, or press Ctrl+K, then Ctrl+N (Cmd+K, then Cmd+N on macOS). Getting started lists every way to open it.
-
Choose Apache Cassandra. Type
cassandrain Search connectors… and press Enter, or double-click Apache Cassandra. -
Fill in the Server section. Enter the Contact points and the Local data centre, the only required fields. Port starts at
9042. Add a Default keyspace if you want one, and the User and Password if the cluster needs them. You can paste a connection URL instead. -
Check Security. Open Security to see how the connection signs in. It is plaintext: see Authentication and TLS before you point it at a cluster.
-
Test the connection. Click Test connection. When it works, the server version and the cluster’s data centres show beside the button. When it doesn’t, the reason shows, with Copy details. Once the connection is saved, Show Connection Log shows the full log. If the Local data centre is wrong, the message lists the data centres the cluster has.
-
Save. Click Save, or Save and connect to connect at once. The connection appears in the Database Explorer.
Connection fields
Section titled “Connection fields”The Connection section at the top (Name, Folder, Environment and a color) is the same for every database: see Getting started. The Server and Authentication fields below are Cassandra’s own; the sign-in fields are listed apart. Options is the collapsed section at the bottom of the dialog.
Server
Section titled “Server”| Field | What it does | Default | Example |
|---|---|---|---|
| Contact pointsRequired | One or more nodes to connect to first, separated by commas: host or host:port, with IPv6 addresses in brackets ([::1]:9042). The driver discovers the other nodes from them. | None | cassandra-1.internal, cassandra-2.internal:9043 |
| Port | The native protocol port of contact points that don't name one. From 1 to 65535. | 9042 | 9042 |
| Local data centreRequired | Required by the driver's load balancing: the data centre whose nodes DataKlin talks to, such as datacenter1. A failed test lists the data centres the cluster has. | None | datacenter1 |
| Contact points only | Connect only to the contact points, never to the other nodes the driver discovers from them. Off by default, as in cqlsh and the driver. With it off, until TLS is supported, credentials go unencrypted to every node in the local data centre. | Off | Off |
| Default keyspace | The keyspace that unqualified names in statements refer to. Optional. It can't contain a double quote. | None | shop |
| Connect timeout (seconds) | From 1 to 3600. | 10 | 10 |
| Read timeout (seconds) | How long to wait for a node to answer one request, such as one page of results. From 1 to 3600. | 30 | 30 |
| Page size (rows) | The most rows requested from the server at a time. From 1 to 5000. | 500 | 500 |
Write each contact point as host or host:port, with an IPv6 address in brackets, such as [::1]:9042. Port applies to the contact points that don’t name one.
Authentication
Section titled “Authentication”| Field | What it does | Default | Example |
|---|---|---|---|
| User | Leave empty when the cluster doesn't require authentication. | None | app |
| Password | Stored in the DataKlin vault, never in the connection file. Next to it, Keep password chooses how long DataKlin keeps it: Save, Until DataKlin quits or Ask every time. | None | — |
Options
Section titled “Options”| Field | What it does | Default | Example |
|---|---|---|---|
| Read-only | Mark this connection as one that should not change data. DataKlin then refuses writes and schema changes before they reach the database. Choosing a protected environment, such as Production, ticks it for you. | Off | On |
| Disconnect when idle | Close this connection after it has sat unused. Reconnects on your next action. Choose Use default, Never, or After… and a number of minutes. | Use default | Never |
Connection string
Section titled “Connection string”Paste a cassandra:// URL into the first step of the dialog or into the Contact points field, and DataKlin offers to fill in the fields from it. Nothing changes until you click Fill fields. The path names the Default keyspace.
cassandra://app@localhost:9042/shopcassandra://app@cassandra-1.internal,cassandra-2.internal:9043/shop- A password in the URL goes into the Password field only, and is never written to a log.
- Write several contact points separated by commas, and an IPv6 host in brackets, such as
cassandra://[::1]:9042/shop. - Query options aren’t applied. DataKlin lists each one by name. The Local data centre isn’t in the URL: type it in the field.
Authentication and TLS
Section titled “Authentication and TLS”The Authentication method is Password: a User and Password, or neither when the cluster doesn’t require them. Passwords are kept as Secret storage describes.
The only TLS mode is Disable: Cassandra connections are plaintext in this release, and there are no certificate settings. See TLS and certificates.
Try it locally
Section titled “Try it locally”No cluster to hand? Start Cassandra in Docker:
docker run --name dataklin-cassandra -d -p 9042:9042 cassandra:5.0Then connect with these values:
| Field | Value |
|---|---|
| Contact points | localhost |
| Port | 9042 |
| Local data centre | datacenter1 |
| Contact points only | On, so DataKlin stays on the container’s address |
| User and Password | Empty: the image requires no sign-in |
Cassandra takes a minute or two to start, and Test connection fails until it is ready. When you’re done, remove the container with docker rm -f dataklin-cassandra.
Good to know
Section titled “Good to know”- No read-only session. Cassandra has no read-only session to switch on, so on a read-only connection DataKlin’s own statement checks refuse writes and schema changes before they reach the cluster. See Read-only connections.
- Destructive statements ask first. Statements such as
DROPandTRUNCATEask for confirmation before they run, and a protected environment such as Production always asks. See Confirming destructive statements. - CQL completion. The console completes keyspace, table, column, type and function names as you type. It reads them from the cluster’s
system_schemaand never reads your tables. - Cancel is client-side. DataKlin stops waiting for the result, but the server may finish the query.
- Large blobs. A blob cell keeps its first 1 MiB, with its real size shown.