Skip to content

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
  1. 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.

  2. Choose Apache Cassandra. Type cassandra in Search connectors… and press Enter, or double-click Apache Cassandra.

  3. 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.

  4. 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.

  5. 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.

  6. Save. Click Save, or Save and connect to connect at once. The connection appears in the Database Explorer.

The New connection dialog for Apache Cassandra in DataKlin, with the connection's name, folder and server fields filled in

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.

FieldWhat it doesDefaultExample
Contact pointsRequiredOne 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.Nonecassandra-1.internal, cassandra-2.internal:9043
PortThe native protocol port of contact points that don't name one. From 1 to 65535.90429042
Local data centreRequiredRequired 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.Nonedatacenter1
Contact points onlyConnect 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.OffOff
Default keyspaceThe keyspace that unqualified names in statements refer to. Optional. It can't contain a double quote.Noneshop
Connect timeout (seconds)From 1 to 3600.1010
Read timeout (seconds)How long to wait for a node to answer one request, such as one page of results. From 1 to 3600.3030
Page size (rows)The most rows requested from the server at a time. From 1 to 5000.500500

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.

FieldWhat it doesDefaultExample
UserLeave empty when the cluster doesn't require authentication.Noneapp
PasswordStored 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—
FieldWhat it doesDefaultExample
Read-onlyMark 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.OffOn
Disconnect when idleClose this connection after it has sat unused. Reconnects on your next action. Choose Use default, Never, or After… and a number of minutes.Use defaultNever

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/shop
cassandra://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.

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.

No cluster to hand? Start Cassandra in Docker:

Terminal window
docker run --name dataklin-cassandra -d -p 9042:9042 cassandra:5.0

Then 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.

  • 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 DROP and TRUNCATE ask 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_schema and 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.