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 DBeaver

Overview

This article provides the steps for connecting to Astra DB from DBeaver Community Edition database client.

Prerequisites

This article assumes you have installed DBeaver Community Edition on your laptop or PC. It was written for version 21.2.0 on MacOS 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

JDBC DRIVER

Download the JDBC driver from the DataStax website:

  1. Go to https://downloads.datastax.com/#odbc-jdbc-drivers.
  2. Select Simba JDBC Driver for Apache Cassandra.
  3. Select JDBC 4.2.
  4. Read the license terms and accept it (click the checkbox).
  5. Hit the blue Download button.
  6. Once the download completes, unzip the downloaded file.

IMPORT DRIVER

Create a new driver for Astra DB in DBeaver:

  1. Go to the Driver Manager.
  2. Click the New button.
  3. In the Libraries tab, click the Add File button.
  4. Locate the directory where you unzipped the driver download and add the CassandraJDBC42.jar file.
  5. Click the Find Class button which should identify the driver class as com.simba.cassandra.jdbc42.Driver.
  6. In the Settings tab, set the following:
    • Driver Name: Astra DB
    • Driver Type: Generic
    • Class Name: com.simba.cassandra.jdbc42.Driver

      dbeaver-01-create-driver.png

  7. Click the OK button to save the driver.

At this point, you should see Astra DB as one of the drivers in the list:

dbeaver-02-driver-manager.png

NEW CONNECTION

Connect to your Astra DB in DBeaver:

  1. Open the New Database Connection dialog box.
  2. Select Astra DB from the list of drivers.
  3. In the Main tab, set the JDBC URLto:
    jdbc:cassandra://;AuthMech=2;TunableConsistency=6;SecureConnectionBundlePath=/path/to/secure-connect-getvaxxed.zip
    Note that you will need to specify the full path to your secure bundle.
  4. In the Username field, enter the string token.
  5. In the Password field, paste the value of the token you created in the Prerequisites section above. The token looks like AstraCS:AbC...XYz:123...edf0.

    dbeaver-03-new-connection.png

  6. Click on the Connection details button.
  7. In Connection namefield, give your DB connection a name:

    dbeaver-04-connection-details.png

  8. Click the Finish button.
  9. Click on the Test Connectionbutton to confirm that the driver configuration is working:

    dbeaver-05-test-connection.png

  10. Click on the Finish button to save the connection settings.

Final test

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

Here's an example output:

dbeaver-06-explore.png

astra dbastra-db-clientsdbeaver
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