Azure Cosmos DB databases can be configured to use a Gremlin API. Via this feature, Cosmos DB aims to provide a compatible server interface for applications using the Tinkerpop Gremlin graph traversal language. Not all Gremlin features are supported by Cosmos DB's implementation.
Questions tagged [azure-cosmosdb-gremlinapi]
283 questions
0
votes
1 answer
How to copy edges from one vertex to a new vertex in Gremlin
Background: I tried to use this question as a baseline but because I'm using Cosmos and had a slightly different scenario I wasn't able to make it work.
I want to know if it is possible to copy all the edges (in and out) from one vertex to a new…

Coel Drysdale
- 193
- 2
- 12
0
votes
1 answer
Formatting CosmosDB Gremlin Query
I'm new to Gremlin and CosmosDB. I've been following the tinkerpop tutorials and am using the TinkerFactory.createModern() test graph.
What I am looking for is to return a graphson object similar to this from cosmosdb.
{
"user": {
"name":…

Coel Drysdale
- 193
- 2
- 12
0
votes
1 answer
Get information from two vertices in Azure CosmosDB Graph (GREMLIN API)
I would like to create a query which gets information from two vertices. I have Vertex A and Vertex B and I need from Vertex A the value of property label and of properties array the value schema. From Vertex B I only would like to get the value of…

Michi-2142
- 1,170
- 3
- 18
- 39
0
votes
1 answer
Trouble simultaneously fetching filtered vertices and unfiltered vertices count
I'm trying to return a limited number of vertices matching a pattern, as well as the total (non-limited) count of vertices matching that pattern.
g.V()
.hasLabel("PersonPublic")
.has('partitionKey', "Q2r1NaG6KWdScX4RaeZs")
.has('docId',…

John
- 9,249
- 5
- 44
- 76
-1
votes
1 answer
How to connect to Azure Cosmos DB Gremlin API via embedded code
For now we are using the very simplified and not near reality approach that Azure officially lets one play: https://learn.microsoft.com/en-us/azure/cosmos-db/gremlin/quickstart-java.
But we need to use gremlin in a scriptive manner ... like…

Omar Ghoche
- 23
- 4
-1
votes
1 answer
Optimize the Gremlin Query running on Cosmos DB
I am creating a PoC using Azure Cosmos DB for Apache Gremlin to model and query/display the Organization Chart. Given a node, the service needs to traverse the graph and pull all children recursively so the UI can display the Organization Chart. For…

amit_g
- 30,880
- 8
- 61
- 118
-1
votes
1 answer
What is the alternative to none() step in gremlin cosmos db?
We are looking for a none() step alternative as our Gremlin compliant queries use a none() step but Cosmos throws a "'none' step not recognized error".
Since Cosmos supports String based queries while adding a Vertex in Java using the .iterate()…
-1
votes
1 answer
Gremlin Query to get longest common subsequence for a given source from the Azure Cosmos graph
lets assume I have got list of all longest common paths for given
source say A using below query
g.V().hasLabel('A').repeat(out()).until(__.not(out())).path().by('id')
Result: [ { "objects": [
"k", "B", "C"
] },
{ "objects": [
"A", "B", "E"
]…

place holder
- 13
- 1
-1
votes
1 answer
Exception using client and trying to add vertices
Steps in the code:
1.Declared Azure Cosmos DB Configuration variables(Host , PrimaryKey , Database ,Container)
2.Connection Pool
3.WebSocketConfiguration
4.GremlinServer
After all above steps, when I was using gremlin client and trying to add…

place holder
- 13
- 1
-1
votes
1 answer
How to get all connected nodes(Incoming + Outgoing) from a given node using Gremlin
I have a Knowledge Graph database and I need to query it using Gremlin to get all connected nodes(Incoming + Outgoing) for a given Node. Right now I am using an approach where I query it twice to get Incoming and Outgoing connections.
For outgoing…

Karan Agrawal
- 3
- 3
-2
votes
2 answers
Gremlin query not working - 2 x vertex if doesn't exist and add edge
I'm using gremlin and have the statement below. I want to:
create a vertex if one does not exist
create another vertex if one does not exist
create an edge between the verticies
The edge doesn't get created. I'd really appreciate help with the…

Silvertooth
- 31
- 2
-2
votes
1 answer
CosmosDB Gremlin API alternative for storing and processing Graph data
I currently use CosmosDB Gremlin API to store nodes and edges of an organization chart. To keep the data and occasional traversal, it is costing me minimum of $20 every month. Is there an alternative to CosmosDB Gremlin API which is cheaper and can…

wonderful world
- 10,969
- 20
- 97
- 194
-5
votes
3 answers
checking for a contains in a specific string in cosmosDB graph using pythongremlin api
I have a 2 "WEEK" vertices on azure cosmosdb graph.
g.V().hasLabel('WEEK').valueMap()
output:
{
"type":["1 week|1 month|1 wk|one month|one week|one wk"]
},
{
"type":["11 weeks|11 months|11 wks|eleven months|eleven weeks|eleven wks"]
}
i…

santhosh kurnapally
- 13
- 3