Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

article

Erick Ramirez avatar image
Erick Ramirez posted Erick Ramirez edited

HOW TO - Connect to Astra DB from TablePlus

Overview

This article provides the steps for connecting to Astra DB from the TablePlus database GUI.

Prerequisites

This article assumes you have a running installation of Tableplus on your laptop or PC. It was written for the MacOS version but it should also work for the Windows version.

You will also need to generate an application token and download the secure bundle for your Astra DB.

Procedure

NOTE: For simplicity, the secure connect bundle has been placed in /path/to/scb.

DB INFORMATION

On your laptop or PC where Tableplus is installed, unpack your secure bundle. For example:

$ cd /path/to/scb
$ unzip secure-connect-getvaxxed.zip

Here is an example file listing after unpacking the bundle:

/
  path/
    to/
      scb/
        ca.crt
        cert
        cert.pfx
        config.json
        cqlshrc
        identity.jks
        key
        trustStore.jks

Obtain information about your database from the config.json file. Here is an example:

{
  "host": "70bf8560-105f-11ec-a3ea-0800200c9a66-us-west1.db.astra.datastax.com",
  "port": 98765,
  "cql_port": 34567,
  "keyspace": "getvaxxed",
  "localDC": "us-west-2",
  "caCertLocation": "./ca.crt",
  "keyLocation": "./key",
  "certLocation": "./cert",
  "keyStoreLocation": "./identity.jks",
  "keyStorePassword": "Kga1OJ83EF2oBQYR5",
  "trustStoreLocation": "./trustStore.jks",
  "trustStorePassword": "n8F9ptJO3H7YRxTW1",
  "csvLocation": "./data",
  "pfxCertPassword": "9b3HgFChtY60m4nfJ"
}

We will use this information to configure Astra DB as the data source in Tableplus.

NEW CONNECTION

STEP 1 - In Tableplus, create a new connection and select Cassandra as the target database.

STEP 2 - In the Host and Port fields, use the host and cql_port values in the config.json above.

STEP 3 - In the User and Password fields, use the client ID and client secret from the token you created in the Prerequisites section of this article.

STEP 4 - In the Keyspace field, use the keyspace values in the config.json above.

STEP 5 - Choose SSL VERIFY NONE for the SSL mode.

STEP 6 - For SSL keys, select the secure bundle files:

  • key for Key (leave the password blank when prompted)
  • cert for Cert
  • ca.crt for CA Cert

Here's an example of what the Cassandra Connection dialog box should look like:

tableplus-cassandra-connection.png

Final test

Connect to your Astra DB. If the connection was successful, you should be able to see all the tables on the left-hand side of the UI.

Here's an example output:

tableplus-astra-connected.png

astra dbtableplus
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Article

Contributors

Erick Ramirez contributed to this article