Integrate DbSchema with Astra DB Serverless
You can use DbSchema to create schemas and visualize data in your Astra DB Serverless databases.
Get a JDBC driver
DbSchema connections require a JDBC driver.
DbSchema automatically downloads the required JDBC driver for some connections. If there is no default JDBC driver or you want to use a different driver, you can manually upload 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 Serverless 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 Serverless
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 driver.
-
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.
-
Astra JDBC connector
-
OSS Cassandra JDBC driver
-
DbSchema JDBC driver
-
DataStax JDBC driver
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.
To connect the OSS JDBC driver to Astra, provide a keyspace, an application token, and the path to your database’s SCB:
jdbc:cassandra:dbaas:///KEYSPACE?consistency=LOCAL_QUORUM&user=token&password=APPLICATION_TOKEN&secureconnectbundle=/PATH/TO/SCB.zip
Contact DbSchema Support for assistance with the DbSchema Cassandra JDBC driver.
You may need to extract your database’s Secure Connect Bundle (SCB) to manually provide the SSL keystore.
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.