Is it possible to connect to Azure CosmosDB graph with gremlin-scala ?

123 views
Skip to first unread message

Alain Marcel

unread,
Oct 25, 2017, 3:34:18 PM10/25/17
to Gremlin-users
Hi everybody !

I can connect to Azure CosmosDB with gremlin java.
Extract of java code from java tutorial (ok) is :
    Cluster cluster;
    Client client;
    try {
        cluster = Cluster.build(new File("src/remote.yaml")).create();
    } catch (FileNotFoundException e) {
        e.printStackTrace();
        return;
    }
    client = cluster.connect();

I want to use gremlin-scala syntax to work on graph.
How can I connect to cosmosdb graph and work on graph with gremlin-scala ?
Is it possible to connect with gremlin-scala ?
If not, is it possible to connect to azure cosmosdb graph with gremlin java api and then use gremlin-scala api to work on graph ?
If you have any snippet, I can try to it with my azure cosmosdb graph account.

Very thanks for any help.
Alain

Michael Pollmeier

unread,
Oct 26, 2017, 5:26:45 PM10/26/17
to Gremlin-users
on first sight: I don't think so, since their 'Java API' looks like it's just a java client that sends groovy code as strings over the wire:
https://github.com/Azure-Samples/azure-cosmos-db-graph-java-getting-started/blob/master/src/GetStarted/Program.java#L26

But I'm not familiar with their stack, maybe there's a way to send gremlin bytecode as well, or to work directly with a graph instance that talks to the cosmos cluster behind the scenes. In those cases you can use gremlin-scala.
Reply all
Reply to author
Forward
0 new messages