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
Select specific array elements of gremlin query result
I have a dataset with products and orders. For a given product (here PRODUCT 2) I want to find the 5 products that were ordered most in combination with PRODUCT 2.
I have managed to query and sort all associated products with their frequency.…

Donna Schweitzer
- 317
- 1
- 2
- 10
0
votes
1 answer
How to do distributed transaction cordination around SQL API and GraphDB in CosmosDB?
I have a Customer container with items representing a single customer in SQL API (DocumentDB) in CosmosDB. I also have a Gremlin API (GraphDB) with the customers' shoppingcart data. Both these data are temporary/transient. The customer can choose…

wonderful world
- 10,969
- 20
- 97
- 194
0
votes
1 answer
Azure CosmosDb Gremlin API, Clone vertex, Compilation Error
Based on this answer provided by daniel-luppitz, I am trying to clone a vertex in Azure CosmosDb but I am getting the following error:
Compilation Error: Unable to bind to method 'property', with arguments of type:…

A_Nabelsi
- 2,524
- 18
- 21
0
votes
1 answer
Is there any kind of inverse for the "has" function (contains at least 1) negated to (contains none)
I am looking for all cards where the key has been returned. Closest I have been able to find is the has and hasNot, but hasNot isnt property based.
Trying to get it to be something like…

HDatom
- 21
- 6
0
votes
1 answer
How to generate a custom JSON output from a CosmosDB Graph using Gremlin?
I'm using the CosmosDB Graph database to store the names of a few people, their marriages and the children whom they have out of the marriages. In the following diagram, you will see that the person Husband has a Child A from his first marriage and…

wonderful world
- 10,969
- 20
- 97
- 194
0
votes
1 answer
Gremlin query on Cosmos DB: Unable to cast object of type StringField to Compose1Field
We have the issue with Gremlin query on Azure Cosmos DB
The query works in Gremlin Console on TinkerPop but Cosmos DB is complaining about it.
It seems to be an issue with the last group().by(...) step
Not sure if this is a bug or there is some…

Sebastian Widz
- 1,962
- 4
- 26
- 45
0
votes
1 answer
How to delete all edges from Microsoft Azure Cosmos DB if query RU cost exceeds the limit
We have a graph in Azure Cosmos DB (Gremlin API) with approx 3K vertices and 16K edges. I would like to drop all edges but keep the vertices.
When I run gremlin query like q.E().drop() I get the exception
ExceptionType :…

Sebastian Widz
- 1,962
- 4
- 26
- 45
0
votes
1 answer
Why are 4 vertices created from a query with 1 `addV()` clause?
Per the Tinkerpop documentation, I would expect the following query to create 1 new vertex with 5 properties when passed to Azure CosmosDB.
g.V()
.addV('ImpactArea')
.property('partitionKey', '1')
.property('docId', 'N3TWjll8Ryba18grxkQD')
…

John
- 9,249
- 5
- 44
- 76
0
votes
1 answer
Create a "join" query with data from edge and connected vertix
I have a Gremlin API Cosmos DB. In the DB I have one type of Vertice with Label User that are connected to Vertices labeled Companies. I then want to show all connected companies. I do the query g.V('id-of-User').outE() and gets all connected…

Magnus Jansson
- 23
- 6
0
votes
1 answer
Soft delete in Azure Search with a Cosmos Graph DB
I'm trying to setup the soft delete feature on Azure Search with a Cosmos DB Graph database as my data source.
Azure Search needs a column in the database to track deletes so I've added a property to all my vertices called 'isDeleted' with a true /…

michael_hook
- 1,936
- 14
- 10
0
votes
1 answer
How to return meta properties of vertex property in Gremlin 3.4.0
One of my vertex property got his properties (meta properties). But when i return all vertex properties i only get value of that property but not his properties also. Is that possible to do?
This is what i've tried:
g.V(rootID).Out()
.Has("name",…

Hazaaa
- 144
- 2
- 14
0
votes
1 answer
Gremlin query is returning no results when part of the query returns nothing
I have a gremlin query which finds the vertices I want to archive but it is returning an empty array.
My graph is laid out in a way where a vertex can have multiple parents and children. When a vertex is archived then it needs to archive all of it's…

ghertyish
- 193
- 1
- 11
0
votes
1 answer
Cosmos DB ConnectionPolicy
Cosmos DB supports a ConnectionPolicy that can provide multi-homing and automatic retries. In looking through the docs and Gremlin.NET code I don't see any options to set a connection policy on the GremlinServer or GremlinClient.
Can multi-homing…

David Torres
- 165
- 9
0
votes
1 answer
How to write old queries in new Gremlin 3.x syntax in javascript/typescript
I need to write old queries from Gremlin 2.6 to 3.4 syntax in JS/TS, because in 2.6 i've done everything with strings and then i execute that string but now i want to use 3.4 syntax where i can use chaining methods.
First i need to convert this…

Hazaaa
- 144
- 2
- 14
0
votes
1 answer
CosmosDB Gremlin: Using stored value in subsequent where filter
I have a problem when trying to filter based on a stored list of strings. I want to build this list in a sideEffect() and then use it in a subsequent where(without()). I am expecting a list of users excluding user.a1 in the following example, but…
user11188523