azure-cosmosdb-gremlinapi

How is cosmosDB RU throughput enforced

强颜欢笑 提交于 2021-02-02 09:35:45
问题 I have a cosmosGB gremlin API set up with 400 RU/s. If I have to run a query that needs 800 RUs, does it mean that this query takes 2 sec to execute? If i increase the throughput to 1600 RU/s, does this query execute in half a second? I am not seeing any significant changes in query performance by playing around with the RUs. 回答1: As I explained in a different, but somewhat related answer here, Request Units are allocated on a per-second basis. In the event a given query will cost more than

How to Perfrom Where Filter in Gremlin queries

天涯浪子 提交于 2020-07-23 06:52:36
问题 where(​ and​ (​ choose(constant(0).is(1),​ select('WorkLocation'). is(within('Not Updated')),​ select('WorkLocation')),​ ​ choose(constant(1).is(1),​ select('Status'). is(within('Red', 'Orange')),​ select('Status')),​ ​ choose(constant(0).is(1),​ select('ConfirmationDate'). is(between(637281491635663900, 637258237221895200)),​ select('ConfirmationDate'))​ )​ ) In the Above Where condition Query, I have to do a filter on three fields WorkLocation, Status, ConfirmationDate, I have used choose

How to Perfrom Where Filter in Gremlin queries

戏子无情 提交于 2020-07-23 06:51:17
问题 where(​ and​ (​ choose(constant(0).is(1),​ select('WorkLocation'). is(within('Not Updated')),​ select('WorkLocation')),​ ​ choose(constant(1).is(1),​ select('Status'). is(within('Red', 'Orange')),​ select('Status')),​ ​ choose(constant(0).is(1),​ select('ConfirmationDate'). is(between(637281491635663900, 637258237221895200)),​ select('ConfirmationDate'))​ )​ ) In the Above Where condition Query, I have to do a filter on three fields WorkLocation, Status, ConfirmationDate, I have used choose

Limit number of items in group().by() in gremlin query

吃可爱长大的小学妹 提交于 2020-03-21 20:28:57
问题 I am trying to run a gremlin query which groups vertices of a certain label into several groups by a certain field (assume it is 'displayName') and limit the number of groups to n and the number of items in each group also to n . Is there a way to achieve that? Since group().by() returns a list of the item, I tried using unfold() and then applying limit on the inner items. I managed to limit the number of groups that are returned, but couldn't limit the number of items in each group. Here's

Limit number of items in group().by() in gremlin query

旧街凉风 提交于 2020-03-21 20:28:47
问题 I am trying to run a gremlin query which groups vertices of a certain label into several groups by a certain field (assume it is 'displayName') and limit the number of groups to n and the number of items in each group also to n . Is there a way to achieve that? Since group().by() returns a list of the item, I tried using unfold() and then applying limit on the inner items. I managed to limit the number of groups that are returned, but couldn't limit the number of items in each group. Here's

How to generate a custom JSON output from a CosmosDB Graph using Gremlin?

霸气de小男生 提交于 2020-01-16 19:08:10
问题 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 Child B from his second marriage. Father of Husband Mother of Husband GRAND FATHER & GRAND MOTHER +---------------+--------------+ Marriage | +------------+---------------+--------------+-----------+ FATHER & MOTHER Ex Wife A Marriage Husband

How to generate a custom JSON output from a CosmosDB Graph using Gremlin?

二次信任 提交于 2020-01-16 19:08:08
问题 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 Child B from his second marriage. Father of Husband Mother of Husband GRAND FATHER & GRAND MOTHER +---------------+--------------+ Marriage | +------------+---------------+--------------+-----------+ FATHER & MOTHER Ex Wife A Marriage Husband

How can I get an exclusive subgraph from a vertex?

本小妞迷上赌 提交于 2019-12-24 10:56:15
问题 I've recently had to change from using Cypher to Gremlin and I'm trying to convert a query that allowed a user to 'delete' a node and all of the subgraph nodes that would be affected by this. It wasn't actually removing nodes but just adding a 'DELETED' label to the affected nodes. I can get a subgraph in Gremlin using: g.V(nodeId).repeat(__.inE('memberOf').subgraph('subGraph').outV()).cap('subGraph') but this doesn't take into account any nodes in the subgraph that might have a route back

Gremlin query is returning no results when part of the query returns nothing

佐手、 提交于 2019-12-11 17:57:17
问题 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 affected descendants that would be 'orphaned' by this process. If any of the descendants have a path back to a central vertex then it shouldn't archive it because it won't be 'orphaned' g.V(itemId) // Find the item to delete. .union( // Start a

How to do distributed transaction cordination around SQL API and GraphDB in CosmosDB?

拥有回忆 提交于 2019-12-04 06:06:09
问题 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 clear shopping cart which will delete the temporary customer and the shoppingcart data. Currently I make separate calls, one to the SQL API (DocumentDB) and Gremlin API (GraphDB) which works but I want to do both as a transaction (ACID principle).