Connecting Using the DriverManager
- Last Updated: December 6, 2016
- 1 minute read
- DataDirect Connectors
- JDBC
- Apache Cassandra 6.0
- Documentation
One way to connect to a Cassandra keyspace is through the JDBC DriverManager
using the DriverManager.getConnection() method. As the
following example shows, this method specifies a string containing a connection URL.
Connection conn = DriverManager.getConnection
("jdbc:datadirect:cassandra://MyServer:9042;KeyspaceName=MyKS");
Note: A Cassandra keyspace is equivalent to a relational database.