Search code examples
azuregremlintinkerpopazure-cosmosdb-gremlinapi

Azure Cosmos graph db supported Gremlin and Tinkerpop version


I'm having trouble finding what Azure Cosmos DB supports in using npm gremlin and Tinkerpop. https://www.npmjs.com/package/gremlin The gremlin package makes no reference to client.submit scripts, however, the Azure Node.js sample code uses submit.
https://github.com/Azure-Samples/azure-cosmos-db-graph-nodejs-getting-started/blob/master/app.js

Also, when I use tinkerpop features like filter, elementMap, etc. in a client.submit, it throws an error that it can't find it. g.V().elementMap('age') This suggests to me that only certain Tinkerpop features work inside client.submit. I'm using the latest http://tinkerpop.apache.org/docs/3.4.4/reference/

I don't get any response from Azure on this topic. Can anyone shed some light on how to use the latest gremlin and tinkerpop with Azure Cosmos DB? If not latest, which specific versions of each are supported?

Thanks, Donnie


Solution

  • I'm not an expert on CosmosDB but I don't think they support any specific version of TinkerPop but rather a subset of the available functions (though they have been steadily moving toward more full fledged support since release). Your best bet would be to look at the Gremlin steps they have documented as the ones they support and only use those. That list of steps can be found here.

    Note that there have been times where CosmosDB users here in Stackoverflow have come to find that there are supported steps not listed on that page, so giving a step a try if you really need it, even if not listed there, might actually work for you.