DSE core driver
The DSE core module handles cluster connectivity and request execution. It is published under the following coordinates:
<dependency>
<groupId>com.datastax.dse</groupId>
<artifactId>dse-java-driver-core</artifactId>
<version>2.1.1</version>
</dependency>
Quick start
If you’ve used the OSS driver before, initializing the DSE driver should look very familiar. Here is our canonical example to connect to DSE and execute a CQL query:
import com.datastax.dse.driver.api.core.DseSession;
import com.datastax.oss.driver.api.core.cql.*;
try (DseSession session = DseSession.builder().build()) {
ResultSet rs = session.execute("select release_version from system.local");
Row row = rs.one();
System.out.println(row.getString("release_version"));
}
DseSession extends CqlSession
, meaning that the DSE driver can execute any regular CQL query.
The session builder also extends its CQL counterpart, with a few extra methods to send additional
monitoring information; see DseSessionBuilder.