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
1
vote
1 answer
How to use coalesce with select in gremlin?
Query
g.V().
has('id', 1).
out('follows').
as('x').
out('knows').
as('y').
project('Name').
by(select('x').by('name'))
Here I want to use coalesce in the projection because there are vertices where name property does not exist.
I tried this but it…

Kajal Patel
- 99
- 6
1
vote
2 answers
How To exclude vertex with label name = 'Kpi' in gremlin
i have the next Query in GremlinDb:
g.V('61f4e0c0-2f17-4a0a-a874-ee7325c110e5').outE().has(label,'HasActionBook').inV().outE().has(label,'ActionBookHasSwimlane').inV().outE().inV()
and returns to me all items but i have a item with label 'Kpi' how…

Nikolai Ivanov
- 51
- 8
1
vote
1 answer
How to merge multiple objects into one, in gremlin query?
I have performed union in my query which gives me the following output
{
key1 = value1,
key2 = value2
},
{
key3 = value3
}
I need output as follows,
{
key1 = value1,
key2 = value2,
key3 = value3
}

Kajal Patel
- 99
- 6
1
vote
1 answer
Gremlin cosmos: How to copy a property value of edge as vertex property inside a repeat command
g.V().has(id,'xxx').repeat(outE('x').
has('b',gte(1588919200)).has('b',lte(1589128800)).inV())
.times(2).emit().property('a',b)
Edge has a property 'b' and vertex has a property 'a'.
For vertices satisfying certain conditions i want to copy edge's…

Gayathri Thenappan
- 13
- 3
1
vote
1 answer
Can I have O(1000s) of vertices connecting to a single vertex and O(1000s) of properties off a vertex for Cosmos DB and/or graph databases?
I have a graph with the following pattern:
- Workflow:
-- Step #1
--- Step execution #1
--- Step execution #2
[...]
--- Step execution #n
-- Step #2
--- Step execution #1
--- Step execution #2
[...]
--- Step execution #n
[...]
-- Step…

aronchick
- 6,786
- 9
- 48
- 75
1
vote
1 answer
Select Vertex based on edge property
I have a complex scenario. So i tried to create a sample of it as below.…

Venkata Dorisala
- 4,783
- 7
- 49
- 90
1
vote
1 answer
Azure Cosmos Graph nest edge vertex in a vertex property
I have two vertex:
1) Vertex 1: { id: 1, name: “john” }
2) Vertex 2: { id: 2, name: “mary” }
There is an edge from 1 to 2 named “children”.
Is it possible to return 2 nested in 1 using gremlin like this?
{
id: 1,
name: “john”,
…

Murilo Maciel Curti
- 2,677
- 1
- 21
- 26
1
vote
1 answer
Order results by number of coincidences in edge properties
I'm working on a recommendation system that recommends other users. The first results should be the most "similar" users to the "searcher" user. Users respond to questions and the amount of questions responded in the same way is the amount of…

fermmm
- 1,078
- 1
- 9
- 17
1
vote
1 answer
Azure provided visualization tool for graph data stored in CosmosDB
Is there any Azure provided tool for visualization of graph data stored in Azure CosmosDB? If I search on this , I get third party tools that connect to Azure CosmosDB that one needs to buy. Isn't there any such tool provided by Azure itself or at…

Dhiraj
- 3,396
- 4
- 41
- 80
1
vote
1 answer
Traverse to vertices without any edge with gremlin
My vertices have one of two labels 'User' and 'Group', and edges are labeled 'contains'. A 'Group' vertex may point to 'User' vertices or other 'Group' vertices. I use the following query to find 'User' vertices starting from a Group vertex. If a…

samsu
- 63
- 8
1
vote
1 answer
Does Azure Cosmos DB Gremlin supports stored procedures or custom functions
Does Azure Cosmos DB Gremlin supports stored procedures or custom functions? Unfortunately I can not find any documentation on it. Apache Tinkerpop supports user defined steps. Other graph databases (e.g. Orient DB) support custom functions as well

Regfor
- 8,515
- 1
- 38
- 51
1
vote
1 answer
Inconsistency between SQL SDK and Stored Procedure when handling long integer types
Our team is using Cosmos DB as our backend graph storage. Basically we are using JAVA Gremlin SDK to do queries on vertices/edges, and using SQL SDK to create/update vertices, due to the size and step limit of Gremlin API.
I met this issue when…

Sizhong Du
- 11
- 4
1
vote
0 answers
How to define and test Trigger in Azure Cosmos DB (Graph DB with Gemline API)?
How to define and test Trigger in Azure Cosmos DB (Graph DB with Gemline API) ?

Mahesh More
- 31
- 2
1
vote
1 answer
How to turn list of values into single items from valueMap step in cosmos db [Gremlin API]
In gremlin's tinkerpop documentation i can turn list of values from valueMap into a single item by using the by() modulator.
But this doesnt work yet on azure cosmosdb (gremlin API)

ephraim lambarte
- 121
- 1
- 11
1
vote
1 answer
Exclude a vertex and its children in a traversal [Gremlin API]
In my graph product vertex can have a composed_of edge from another product vertex.
Now I am trying to exclude a vertex and its children with composed_of edge when selecting all vertex with label product.
initially i have the id of the vertex to be…

ephraim lambarte
- 121
- 1
- 11