Submitting DSE Graph queries with the DataStax drivers

The DataStax drivers expose the String API and Fluent API for executing DSE Graph traversals.

Graph use cases are characterized by highly connected data. Traversing these connections is essential for solving modern fraud detection and personalization use cases. To address the emerging demand of the Graph database, DataStax invests heavily into the Apache TinkerPop graph computing framework that leverages Gremlin as its property graph query language and core API. The DataStax drivers expose several interfaces for executing DSE Graph traversals:

  • Fluent API (analogous to TinkerPop Bytecode API)

  • String API (analogous to TinkerPop Script API)

  • remote traversal sources for full compatibility with TinkerPop’s execution model

DataStax recommendes Fluent API as the interface for graph traversals.

Fluent API

The DataStax drivers Graph Fluent API leverages TinkerPop’s Gremlin Language Variants and allows developers to programmatically construct Gremlin traversals and execute the compiled bytecode through a DSE session, similar to standard CQL queries. This interface is recommended for all new DSE Graph applications.

DSE Graph Fluent API
DSE Graph Fluent API
Fluent API for Drivers

C/C++ [1]

C#

Java

Node.js

PHP [1]

Python

Ruby (not supported)

String API

The String API is a more limited interface than the Fluent API. The String API simply passes Gremlin Groovy strings through the DataStax Driver to the DSE Graph server.

String API for drivers

C/C++

C#

Java

Node.js

PHP

Python

Ruby

Remote traversal source

The DataStax drivers allow a TinkerPop GraphTraversalSource to be remotely connected to DSE Graph. This source lends full compatibility with TinkerPop types and uses an implicit execution model through the TinkerPop terminal steps.

The results for a GraphTraversalSource are detached from the server. Modifications to the remote elements do not directly affect the data stored in DSE Graph.

Remote traversal source for drivers

C/C++ [1]

C#

Java

Node.js

PHP [1]

Python

Ruby [1]

Domain Specific Languages

Domain Specific Languages (DSLs) simplify code and provide concise APIs for DSE Graph applications. DSLs allow the developer to abstract the underlying Gremlin code that is traversing the DSE property graph into usable methods that are tailored to the application.

Domain Specific Languages for drivers

C/C++ [1]

C#

Java

Node.js [1]

PHP [1]

Python

Ruby [1]

User-defined IDs

Partition and clustering keys in DSE Core extend to DSE Graph. Use partition and clustering keys when creating vertex labels. Vertex labels more effectively distribute the data throughout the cluster and gives the user control over where the data is distributed.


1. Not supported.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com