‣ Datagrip

Overview¶
DataGrip is a database management environment for developers. It is designed to query, create, and manage databases. Databases can work locally, on a server, or in the cloud. Supports MySQL, PostgreSQL, Microsoft SQL Server, Oracle, and more. If you have a JDBC driver, add it to DataGrip, connect to your DBMS, and start working.
Prerequisites¶
- Create an Astra Database
- Create an Astra Token
- Download your secure connect bundle ZIP
- Download and install DataGrip
Astra Community JDBC Drivers¶
1. Download JDBC Driver¶
Download latest archive astra-jdbc-driver-x.y.jar from Github Release page
2. Configure the Connection¶
- Select
DriversTab - Click the plus
+symbol to create a new User Driver - Populate the name as you like, in the screenshot we picked
Astra JDBC Driver - Add the shaded jar by clicking the plus
+symbol in theDriver Filespanel. - For the
Classfield, select the following (the list has been build by scanner the library we just imported)

3. Create the DataSource¶
- 1. Select
Data Sourcetabs.Using the+add a new Data source pick the driver we just created from the list - 2. Define a name for your datasource on the screenshot we picked
Astra JDBC DataSource - 3. Validate that you are using the driver define above, for us
Astra JDBC Driver - 4. Provide User Name. It can be the string
tokenor the value of aclientId. - 5. Provide the password. It can be the value for your starting with AstraCS:... or the value of a
clientSecret. - 6. Provide the URL as a single line
| Field | Required? | Description |
|---|---|---|
| db | YES | It is your database identifier it can be a name (then it must be unique) or a database identifier (UUID) |
| keyspace | YES | It is the keyspace you want to use. |
| region | NO | Only useful if the database lives on multiple regions |

-
7. Test the connection you should get the following screen, apply and save.
-
8. Validate with
Apply
4. Use DataSource¶
- Select the keyspace you want to use

- Enjoy your working environment

Using JDBC Simba Drivers¶
Tips for SecureConnectionBundlePath
You need to be a registered customer to use those drivers. If not consider the ING Driver alternative.
1. Download JDBC Driver¶
Download the JDBC driver from the Datastax customer support website
- Authenticate to Datastax Customer Portal.
- Select Simba JDBC Driver for Apache Cassandra.
- Select JDBC 4.2.
- Read the license terms and accept it (click the checkbox).
- Hit the blue Download button.
- Once the download completes, unzip the downloaded file.
2. Download Settings.zip¶
- Download the settings.zip locally
Think about backing up your settings.xml
If you are already a DataGrip user, back up your existing settings because downloading settings.zip might override your existing settings.
3. Import settings.zip file¶
-
Selecting
File→Manage IDE Settings→Import Settingsin DataGrip. -
From the directory menu, select the
settings.zipfile from the directory where it is stored. -
Select Import and Restart.
You will see a new database connection type called Astra: Simba Cassandra JDBC 4.2 driver shown.

- Go to the Driver
Advanced SettingsTAB to confirm the VM home path is set toDefault.

4. Establish the connection¶
-
The credentials are provided in the URL so for authentication field you can pick
No authin the select drop down. -
When you create your connection, the URL will look like this (on a single line):
jdbc:cassandra://;AuthMech=2;
UID=token;
PWD=<AstraCS:... your application token>;
SecureConnectionBundlePath=<PATH TO YOUR SECURE CONNECT BUNDLE>;
TunableConsistency=6
Tips for SecureConnectionBundlePath
-
You should use
/as a path separator even on Windows. -
The use of quotes for the path is not supported, please try to provide a path with no spaces.

URL in the screenshot shows the format described in the previous sentence.
- AuthMech: Specifies whether the driver connects to a Cassandra or Astra DB database and whether the driver authenticates the connection.
- ApplicationToken: Generated from Astra DB console.
- SecureConnectionBundlePath: Path to where your downloaded Secure Connect Bundle is located.
- TunableConsistency: Specifies Cassandra replica or the number of Cassandra replicas that must process a query for the query to be considered successful.