Questions tagged [azure-cosmosdb-gremlinapi]

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.

283 questions
0
votes
1 answer

Azure Cosmos update June 2020 - Gremlin API - "containing" case insensitive?

As of June 2020, Azure Cosmos DB supports performant case-insensitive searches for certain string functions like "contains". See this MSFT dev-blogs link. This is great, because string-functions usually kill the performance of "regular"…
user3151341
0
votes
1 answer

Is there a reason why not model social network with SQL API?

In one of our apps we need to introduce a feature of users being able to choose friends, see friends activity, etc. So far we use CosmosDb container with SQL API (for things app does beside this social network aspect). I am wondering is there a…
dee zg
  • 13,793
  • 10
  • 42
  • 82
0
votes
2 answers

How to upsert when the graph has 0 vertices?

I have an upsert query to insert vertices in the graph like this: V().coalesce( __.V().hasLabel("Person").has(id, "ABC"), __.addV(_a).property(id, "ABC") ).limit(1) However, it doesn't work when the graph has 0 vertices to start with. How…
Chris Johnson
  • 1,230
  • 7
  • 15
0
votes
0 answers

Converting String to Integer in Azure Cosmos DB Gremlin API

I have a few million edges in my graph that have a property called Occurrences - all of which have been entered as strings. I would like to convert them to integers ('16' -> 16) using Python, if possible. Is there any direct way to do this that…
enixon4
  • 51
  • 1
  • 7
0
votes
2 answers

CreateDocumentCollectionQuery method in GraphBulkImport library error when using linq operations on the collection

I am using CosmosDB>BulkExecutor nuget in a .net Standard 2.0 project using this nuget (latest pre-release version 2.4.1 preview) reference link for bulk executor which says that it has support for .net standard 2.0 however errors out when…
0
votes
1 answer

I can connect my local Azure function to my CosmosDB database, but when I publish the code on Azure, it cannot connect anymore

I have developed a blob-triggered function app that then saves data to a CosmosDB database using the Gremlin API and the Gremlin.Net driver. I have created a CosmosDB database on my Azure account, and then read the connection parameters from…
0
votes
1 answer

update cosmos db gremlin vertices using document API

Can I use cosmos Document APIs to bulk update gremlin api vertices and edges? we are a java shop and Microsoft doesn't have a java client to do bulk imports into cosmos DB gremlin APIs. It is doable, but is it recommended?
Michael Scott
  • 540
  • 2
  • 8
0
votes
0 answers

cosmosDB graph high RU usage even when limiting results

I have a sample data that i modeled in my cosmos DB gremlin API. The sample csv is as follows Name, Job Titles, Department "ADRIANO, RACQUEL ANNE", PARAMEDIC, PARAMEDIC "AFFANEH, MAHIR A", …
0
votes
1 answer

Optimize this query to get lineage diagram in graph using gremlin

I have my data set up in cosmos DB gremlin API. I am trying to write a query that can starting at a given vertex, gives all the edges with labels and properties in both directions, and the vertices with their properties, with a loop count of lets…
0
votes
2 answers

Cosmos graph DB RU for Update operation using Gremlin

I have a graph DB and the requirement is to update an attribute in a few vertices. Now let's assume I have to update an attribute value from 0 to 1. Approach #1 - run update for each vertex in a loop foreach(int id in ids) { …
0
votes
1 answer

Gremlin : What is the most efficient way to write multiple traversals?

Suppose I have a vertex person, and it has multiple edges, I want to project properties from all traversal. What is the most efficient way to write a query in Cosmos DB Gremlin API? I tried the following, but its performance is…
0
votes
1 answer

Gremlin: Get leaf vertexes sorted by cumulative edges property obtained on traversal

I'm traversing a graph and need to obtain all leaf nodes sorted by an order property present on the edges. I was only able to get the leaf vertices ordered by the last edge with the following…
0
votes
1 answer

Gremlin : Combine 2 or more vertices without an edge between them in Cosmos DB Gremlin API

Suppose I have a vertex Employee and a vertex Department. Employee has a property departmentId but there is no edge between these 2 vertices, can I project departmentName along with employeeName?? g.addV('employee'). property('id', 1). …
0
votes
0 answers

Gremlin : Alternative of inject to perform dynamic sorting

I want to perform dynamic ordering on a field through the gremlin query, I am using following query g.inject('asc').as('mode'). V(). choose(select('mode').is('asc'), order().by('lastName'), order().by('lastName',…
0
votes
1 answer

Gremlin : Use filter in result of group by

Sample Data g.addV('result'). property('marks', 100). property('subject', 'Maths'). property('student', A) g.addV('result'). property('marks', 50). property('subject', 'English'). property('student', A) I have details of multiple students, and I…