Create a new connection with the following JDBC URL
jdbc:cassandra://keyspace;DefaultKeyspace=keyspace;AuthMech=2;UID=token;PWD=<ApplicationToken>;SecureConnectionBundlePath=<PATH TO YOUR SECURE CONNECT BUNDLE>;TunableConsistency=6
where:
keyspace is the keyspace you want to connect to (Optional)
DefaultKeyspace is the default keyspace (Optional)
AuthMech: Specifies whether the driver connects to a Cassandra or Astra DB database and whether the driver authenticates the connection.
ApplicationToken: The 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.
Example on Idea:
For legacy driver, client id and client secret correspond to username and password. They are created when you generate your application token.