DSE Graph Java driver documentation

21 views
Skip to first unread message

gw

unread,
Mar 13, 2018, 2:18:28 PM3/13/18
to DataStax Java Driver for Apache Cassandra User Mailing List
I apologize if this is not the right forum for this inquiry, but I couldn't find a forum dedicated to version 1.5 of the driver.  I am looking for the documentation pertaining to graph management functions such as index management etc.  Very nice manual I found here: https://docs.datastax.com/en/developer/java-driver-dse/1.5/manual/ does not seem to address management/schema functionality.

Any help would be greatly appreciated.

Cheers,
~gw

Kevin Gallardo

unread,
Mar 13, 2018, 2:41:18 PM3/13/18
to java-dri...@lists.datastax.com
Hi George,

The information regarding DSE Graph management and indexing is located in the DSE documentation over there.

Thanks.

--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-user+unsubscribe@lists.datastax.com.



--
Kévin Gallardo.
Software Developer in Drivers and Tools Team,
DataStax.

gw

unread,
Mar 13, 2018, 3:05:09 PM3/13/18
to DataStax Java Driver for Apache Cassandra User Mailing List
Thanks, Kevin.  I am looking for the java API documentation to execute these kinds of index management commands.  The documentation you pointed out is the command reference to DSE.  So, my conclusion is that there is no Java driver API which would enable management functions directly.  If I wanted to execute the following schema command:

schema.vertexLabel('reviewer').index('ratedByStars').outE('rated').by('stars').add()

Would I do it like this?
GraphStatement s = new SimpleGraphStatement("schema.vertexLabel('reviewer').index('myIndex')...")
        .setSystemQuery();
dseSession.executeGraph(s);


Cheers,
~gw

On Tuesday, March 13, 2018 at 2:41:18 PM UTC-4, Kevin Gallardo wrote:
Hi George,

The information regarding DSE Graph management and indexing is located in the DSE documentation over there.

Thanks.
On Tue, Mar 13, 2018 at 2:18 PM, gw <georg...@gmail.com> wrote:
I apologize if this is not the right forum for this inquiry, but I couldn't find a forum dedicated to version 1.5 of the driver.  I am looking for the documentation pertaining to graph management functions such as index management etc.  Very nice manual I found here: https://docs.datastax.com/en/developer/java-driver-dse/1.5/manual/ does not seem to address management/schema functionality.

Any help would be greatly appreciated.

Cheers,
~gw

--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.

Kevin Gallardo

unread,
Mar 13, 2018, 3:29:02 PM3/13/18
to java-dri...@lists.datastax.com
Hi,

GraphStatement s = new SimpleGraphStatement("schema.vertexLabel('reviewer').index('myIndex')...")
        .setSystemQuery();
dseSession.executeGraph(s);
Exactly, except without the `.setSystemQuery()` because the query is a schema query and not a system query.

A system query is "system.createGraph()...."

Now every query that is not a system query requires a graphName to be set, either via the GraphStatement or the GraphOptions. Also applies to schema queries like the one you mention above, because schema queries target a certain graph, just like regular traversals.

The method `.setSystemQuery()` is for when you have set a graphName globally via the GraphOptions but you want to execute one query that's a system query. In that case, you'd call `.setSystemQuery()` on that particular statement.

Hope that helps.

To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-user+unsubscribe@lists.datastax.com.

gw

unread,
Mar 13, 2018, 4:13:19 PM3/13/18
to DataStax Java Driver for Apache Cassandra User Mailing List

Great! Thanks for this clarification.

Cheers,
~gw
Reply all
Reply to author
Forward
0 new messages