Integrate DbSchema with Astra DB Classic
You can use DbSchema to create schemas and visualize data in your Astra DB Classic databases.
Get a JDBC driver
DbSchema connections require a JDBC driver.
DbSchema automatically downloads the required JDBC driver for some connections. If there isn’t a default JDBC driver or you want to use a different driver, you can manually provide a JDBC driver JAR file.
Examples of Apache Cassandra® JDBC drivers include the following:
-
The Astra JDBC connector.
-
The open-source
ing-bank/cassandra-jdbc-wrapper
, which supports connections to Astra. The Astra JDBC connector is based on this project. -
The DbSchema Cassandra JDBC driver, which is developed by DbSchema. It is automatically downloaded when you create a DbSchema Cassandra connection[DbSchema Cassandra connection], but it may not be directly compatible with Astra. Contact DbSchema Support for assistance with this driver.
-
A DataStax JDBC driver.
You can access the DataStax ODBC and JDBC drivers through the DataStax Support portal or by contacting DataStax Support.
Get Astra DB credentials
-
Create an Astra DB Classic database or use an existing one.
-
Download your database’s Secure Connect Bundle (SCB), and then securely store it where your DbSchema installation can access it.
-
Generate an application token with a role that permits reading the database, at minimum.
Connect DbSchema to Astra DB Classic
To connect Astra to DbSchema, you need to create a database connection in DbSchema, upload your JDBC driver, and then configure the JDBC driver connection details.
-
Download and install DbSchema on your machine if you haven’t done so already.
-
Start DbSchema.
-
Under Start New Model, select Connect to the database, and then click Start.
-
From the Choose your database menu, select Cassandra, and then click Next.
-
In the Cassandra Connection Dialog window, find JDBC Driver, and then click Edit.
-
In the JDBC Driver Manager window, find Rdbms, and then click New.
-
For Rdbms Name, enter
Astra
, and then click OK. -
Click OK again to confirm, and then upload your JDBC driver JAR file.
After you upload the JDBC driver, an Astra option is added to the Choose your database menu for future connections.
-
In the Connection Dialog window, change Connection Name to Astra if it doesn’t automatically change. If you change the name, make sure JDBC Driver is still set to your Astra JDBC connector.
-
For JDBC URL, select Edit Manually.
-
In the Connection tab, enter the JDBC URL required to connect your driver to Astra, and then click Connect.
-
OSS Cassandra JDBC driver
-
Astra JDBC connector
-
DbSchema JDBC driver
-
DataStax JDBC driver
To connect the OSS Cassandra JDBC driver to Astra, provide the JDBC URL for your driver version:
Version 4.16 and laterjdbc:cassandra:astra://DB_NAME/KEYSPACE?token=APPLICATION_TOKEN&consistency=LOCAL_QUORUM
Version 4.15.z and earlierjdbc:cassandra:dbaas:///KEYSPACE?consistency=LOCAL_QUORUM&user=token&password=APPLICATION_TOKEN&secureconnectbundle=/PATH/TO/SCB.zip
At minimum, you must provide your database’s name, a keyspace, and an application token:
jdbc:astra://DB_NAME/KEYSPACE_NAME?token=APPLICATION_TOKEN
For more information, see the repository for the Astra JDBC connector.
DataStax doesn’t test the DbSchema Cassandra JDBC driver on Astra. For assistance with this driver, contact DbSchema Support.
To get the host and port for the JDBC URL, extract your database’s Secure Connect Bundle (SCB) archive, open
config.json
, and then find thehost
andport
fields. You can also get SSL keystore files from the extracted SCB to enable SSL encryption.Contact DataStax Support for information about the DataStax JDBC drivers.
-
-
If prompted, in the Select Schemas/Catalogs window, select keyspaces that you want to bring into DbSchema, and then click OK.
Make sure the imported schemas are mapped correctly in DbSchema. For more information, see the DbSchema documentation on Reverse Engineer Settings and Database Schema.
Next steps
After establishing a connection, you can use DbSchema’s features to design, visualize, and manage your schemas, including creating tables, inspecting keyspaces, and viewing data. For more information, see the DBSchema tutorials.