Skip to content

Instantly share code, notes, and snippets.

@GregBestland
Last active October 30, 2018 20:24
Show Gist options
  • Save GregBestland/e0ec564fcbc2da5324414c5075b068e1 to your computer and use it in GitHub Desktop.
Save GregBestland/e0ec564fcbc2da5324414c5075b068e1 to your computer and use it in GitHub Desktop.
  1. Download the preview version of the Java DataStax Driver from <the EAP portal>.
  2. Extract the tarball.
  3. To install the packages to mavencd to the directory, then run ./install_maven.sh.
  4. Alternately you can directly import the requisite jars from the tarball.
  5. Download a DS On Demand config file from <DSOD admin portal>.

Connect and query example

import com.datastax.dse.driver.api.core.DseSession;
import com.datastax.dse.driver.api.core.DseSessionBuilder;

DseSession session = DseSession.builder().forClusterConfig(new File("/path/to/config.yaml").toURI().toURL()).build();
session.exeute("you query here");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment