Questions tagged [tinkerpop]

Apache TinkerPop™ is a graph computing framework for both graph databases (OLTP) and graph analytic systems (OLAP).

Apache TinkerPop™ is a graph computing framework for both graph databases (OLTP) and graph analytic systems (OLAP). Graph systems that are TinkerPop-enabled, allow users to the ability to utilize the various aspects of the TinkerPop stack in development of vendor-agnostic graph applications. The key component to the TinkerPop stack is the Gremlin, a graph traversal language, which allows users to query and manage a graph.

974 questions
2
votes
1 answer

Gremlin Traversal

EDITED: After @Prashant answer I understood order of my output needs to be preserved, so accordingly I have edited my original question and reposted. Below is my graph: g.addV('person').property(id, 1) g.addV('person').property(id,…
Bala
  • 357
  • 1
  • 4
  • 12
2
votes
1 answer

Gremlin query combine vertices with unrelated vertices CosmosDB

I would like to get several vertices e.G. with the label "user" combined with vertices, they are not related to, yet e.G. with the label "movie". I know, that the strength of Gremlin is traversing the vertex, and combining objects that are not…
2
votes
1 answer

Merge vertices, including properties and incoming/outgoing edges

How can I merge vertices, including their incoming/outgoing edges and their properties? I used this answer and it does almost exactly what I hoped for, but in case both vertices have the same property, only one of them gets to the resulting united…
Amitay Dror
  • 155
  • 6
2
votes
1 answer

Inject() list of strings to be upsert as vertices takes a very long time in Gremlin + Neptune

While optimizing a service that has AWS Neptune as a back-end I stumbled upon the recommendation to use inject(), so I decided to batch a set of queries to avoid round-trips to Neptune: g.inject(Array.from(attributes)) .unfold() …
2
votes
1 answer

JanusGraph Gremlin graph traversal with `as` and `select` provides unexpected result

I have two graph traversals with the following results: g.V().has("id", 2).outE("knows").inV() ==>v[4216] ==>v[8312] g.V().has("id", 5).outE("knows").inV() ==>v[4216] ==>v[8312] Basically, both vertices with id 2 and 5 have edges to the same two…
Hieu Nguyen
  • 382
  • 2
  • 15
2
votes
2 answers

Gremlin check if a Set attribute contains a value

I have a vertex with a Set attribute and a graph traversal e.g. graph.traversal().V().hasId(id) the returned vertex has a set attribute and I need to check if it contains a specific value
user1116377
  • 629
  • 3
  • 15
  • 31
2
votes
1 answer

How to get properties hasid/key with vertexes info in one gremlin query or Gremlin.Net

I try to get properties which has key or id in following query by Gremlin.Net, but vertex info(id and label) in VertexProperty is null in result. g.V().Properties().HasKey(somekey).Promise(p => p.ToList()) So i try another way, but…
hpstory
  • 25
  • 6
2
votes
1 answer

Anonymous Authentication by default in Amazon Neptune?

I'm learning about Amazon Neptune, and noticed that: IAM authentication is not enabled by default IAM authentication requires AWS Signature v4 for API calls, which increases application complexity By default, it seems that Amazon Neptune uses…
user189198
2
votes
1 answer

Is there a way to reverse a list in Gremlin?

Gremlin queries often work with or produce lists. Sometimes it is desirable to be able to reverse a list. Currently Gremlin does not have a reverse step so you cannot do something like: g.inject(['A','B','C','D']).reverse() Nor is there a reverse…
Kelvin Lawrence
  • 14,674
  • 2
  • 16
  • 38
2
votes
1 answer

Gremlin Query to count Edges - MemoryLimitExceededException AWS Neptune

Gremlin Query on Neptune to count no of edges for vertexes with certain label results in MemoryLimitExceededException. Error only occurs a few times i.e. if i run query 10 times, succeeds twice. Neptune is using…
Balu Vyamajala
  • 9,287
  • 1
  • 20
  • 42
2
votes
1 answer

Is there a good way to run a single gremlin query from the command line?

I'd like to run a single gremlin query, against a particular server, from the command line. (from my unix shell, not from the inside the Gremlin console) I'm looking for something analogous to postgres' psql (e.g. psql -c 'select * from…
jrr
  • 1,877
  • 19
  • 29
2
votes
1 answer

Edge with id already exists - Gremlin

I am using the following to upsert an edge using Gremlin. I am following the recipe as mentioned here. This is the code I am using. The code runs in a lambda which talks to a cluster hosted in Amazon Neptune public void createEdge(final String…
CHID
  • 1,625
  • 4
  • 24
  • 43
2
votes
1 answer

Which symbols are forbidden for Gremlin vertex label name?

I am stuck on searching this info. Are there any forbidden symbols for creating vertex labels in gremlin? Especially, I am interested if label name with spaces and brackets like g.addV("New node (1)") is valid? I'm using gremlin with tinkerpop and…
2
votes
1 answer

Problem running Gremlin query in CosmosDb

I have a problem running this Gremlin query in Azure CosmosDB. g.V(). has('node', 'id', 'new'). fold().coalesce( unfold(), addV('node'). property('id', 'new'). property('partitionKey', 'edd1f6ca3b1c446987d7da29e370cc7e') …
Martin
  • 880
  • 8
  • 20
2
votes
2 answers

Gremlin: OLAP vs dividing query

I have a query (link below) I must execute once per day or once per week in my application to find groups of connected users. In the query I check all possible groups for each user of the application (not all users are evaluated but could be a lot).…
fermmm
  • 1,078
  • 1
  • 9
  • 17