gremlin

Azure Cosmos DB Graph Wildcard search

妖精的绣舞 提交于 2021-02-06 08:56:27
问题 Is it possible to search Vertex properties with a contains in Azure Cosmos Graph DB? For example, I would like to find all persons which have 'Jr' in their name? g.V().hasLabel('person').has('name',within('Jr')).values('name') Seems like the within('') function only filters values that are exactly equal to 'Jr' . I am looking for a contains. Ideally case insensitive. 回答1: None of the text matching functions are available for CosmosDB at this time. However, I was able to implement a wildcard

Azure Cosmos DB Graph Wildcard search

时光毁灭记忆、已成空白 提交于 2021-02-06 08:55:50
问题 Is it possible to search Vertex properties with a contains in Azure Cosmos Graph DB? For example, I would like to find all persons which have 'Jr' in their name? g.V().hasLabel('person').has('name',within('Jr')).values('name') Seems like the within('') function only filters values that are exactly equal to 'Jr' . I am looking for a contains. Ideally case insensitive. 回答1: None of the text matching functions are available for CosmosDB at this time. However, I was able to implement a wildcard

Gremlin OLAP queries on AWS Neptune

蓝咒 提交于 2021-02-05 03:14:09
问题 In the AWS Neptune documentation it says it is Apache TinkerPop Gremlin compatible but it only refers to online transaction processing (OLTP) type of graph traversal queries. I haven't seen anything about long-running online analytical processing (OLAP) GraphComputer queries. Is it possible to execute OLAP queries on graphs stored in AWS Neptune graph database service? 回答1: I was at ReInvent and had a chance to talk to Brad about it. For the immediate future it’s all OLTP. only one query per

Gremlin OLAP queries on AWS Neptune

三世轮回 提交于 2021-02-05 03:11:08
问题 In the AWS Neptune documentation it says it is Apache TinkerPop Gremlin compatible but it only refers to online transaction processing (OLTP) type of graph traversal queries. I haven't seen anything about long-running online analytical processing (OLAP) GraphComputer queries. Is it possible to execute OLAP queries on graphs stored in AWS Neptune graph database service? 回答1: I was at ReInvent and had a chance to talk to Brad about it. For the immediate future it’s all OLTP. only one query per

Gremlin OLAP queries on AWS Neptune

孤街浪徒 提交于 2021-02-05 03:09:10
问题 In the AWS Neptune documentation it says it is Apache TinkerPop Gremlin compatible but it only refers to online transaction processing (OLTP) type of graph traversal queries. I haven't seen anything about long-running online analytical processing (OLAP) GraphComputer queries. Is it possible to execute OLAP queries on graphs stored in AWS Neptune graph database service? 回答1: I was at ReInvent and had a chance to talk to Brad about it. For the immediate future it’s all OLTP. only one query per

Gremlin for CosmosDB - Cannot create ValueField on non-primitive type GraphTraversal

谁说胖子不能爱 提交于 2021-01-29 18:34:32
问题 I'm trying to execute a query but facing this error. Below query is the simplest form of what I was trying to achieve. g.V('Users12345').as('u'). project('id', 'email', 'test'). by('id'). by('emailId'). by(where(values('id').is(eq(select('u').values('id'))))) I was trying to use select inside project. What's that I'm missing here? 回答1: The invalid part is eq(select('u').values('id')) . I guess "the query in its simplest form" means that you're aware of it being pointless. Assuming that u is

Gremlin case insensitive search

自作多情 提交于 2021-01-29 17:45:41
问题 I am new to Gremlin and I am using the Gremlin console to read data from a graph database. In the graph, there are vertices with label "Device". These vertices have a property "name" associated with them. I need to find out if there is a vertex that has a certain name. This check has to be case insensitive. Suppose I was to do this in a relational database, I could write the following query: SELECT * FROM device d WHERE LOWER(d.name) = 'mydevice' I am searching for a function similar to

Gremlin Python SDK for Azure CosmosDB

断了今生、忘了曾经 提交于 2021-01-29 12:31:04
问题 The documentation on the Azure site for CosmoDB & Gremlin & Python[1][2][3] use bad practices - tons of code duplication and concatenating strings to form queries, rather than using native python. However, when trying to use the native SDK, there's a 2 year old bug that prevents it due to serialization errors[4]. What's the best way to use Gremlin & Python with CosmosDB? Should I give up on Gremlin altogether - and if so, what's the alternative solution? [1] https://docs.microsoft.com/en-us

Shortest path taking into consideration the weight on tinkergraph in Java

无人久伴 提交于 2021-01-29 08:16:16
问题 I'm trying to find the shortest path taking into consideration the weights properties on the edges my work is on TinkerGraph and i want to do it in java. gremlin is not very helpful for me g.V().has(id1). repeat(both().simplePath()). until(has(id2)).as("path"). map(unfold().coalesce(values("weight"), constant(0)). sum()).as("cost"). select("cost","path").next().get("path"); this gives me the shortest path without taking into consideration the weight property on the edges . EDITED: my example:

How do I use unfolded list values to specify a vertex?

狂风中的少年 提交于 2021-01-29 06:12:40
问题 I'm trying to write a Gremlin traversal meaning "add all of these identities to this group", patterning it after the "inject list" example in the recipes. This is the logic I'm attempting: List identityIds = [...] gts.inject(identityIds).unfold() .V() // filter statement goes here? .addE(GROUP_INCLUDES_IDENTITY).from(V(groupId)) .iterate() As I understand it, this will spawn a traverser for each element in the list and execute the addE operation. However, I can't figure out how to express V()