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
4
votes
1 answer

Change the default serilization in gremlin server to use GraphSON V1

I'm trying to change the output format of the Gremlin http server to a Non typed JSON object like the one below. { "requestId": "320599c8-7d49-4cc6-87a6-42115009f90c", "status": { "message": "", "code": 200, "attributes": {} }, …
alexgids
  • 396
  • 3
  • 11
4
votes
1 answer

Variables - Gremlin on Neptune

I'm on the Gremlin console and connected to an AWS Neptune DB g.V().hasLabel('Risk').toList() provides the expected results, but when i try to assign the results to a variable risks = g.V().hasLabel('Risk').toList() I get the message below - the…
Paul C
  • 303
  • 5
  • 15
4
votes
1 answer

Gremlin Python: Count vertices and its children in one query

I am trying to get the count of all vertices with a particular label and all its children in one query like so: g.V().hasLabel('folder').has('folder_name', 'root').as_('a', 'b').select('a',…
Raghav Jajodia
  • 419
  • 4
  • 6
4
votes
1 answer

Amazon Neptune: How to create custom vertex id in Python using tinkerpop/gremlinpython package?

As outlined here https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-differences.html custom vertex ids can only be set with the unquoted id property, i.e., g.addV('label1').property(id, 'customid'). How can one accomplish this…
JTW
  • 3,546
  • 8
  • 35
  • 49
4
votes
1 answer

Gremlin querying with the depth information while traversing

I have a use-case where users are in a hierarchy like user1 --HAS_CHILD--> user2--HAS_CHILD--> user3 --HAS_CHILD--> user4 For the given user I need to get all the cars owned by that user and all the cars owned by the children of that user. With the…
prabushitha
  • 1,433
  • 12
  • 13
4
votes
1 answer

Having clause for a group count gremlin query

I have a query where I need to find the groupCount of a particular type of vertices where the count is greater than 1. eg g.V().hasLabel('airport').limit(40).groupCount().as('gc').by('region').having('gc',gt(1)) I know this syntax is not valid…
Ujjwal Pathak
  • 646
  • 12
  • 21
4
votes
1 answer

Gremlin: Add an edge and drop an edge in single gremlin query

how to add an edge and dropping an edge to same vertex type in single gremlin query. say we have two types of vertex types A --is--> B now i have vertex which is connected to some other vertex of B. I want to update the A's vertex to some other…
4
votes
1 answer

AWS Neptune datetime()

I'm using gremlin-javascript to talk to AWS Neptune from Node. According to the docs and quickstart, dates should be set using datetime(). I did not find an implementation of this datetime() function in gremlin. Where should this be imported…
Fook
  • 5,320
  • 7
  • 35
  • 57
4
votes
1 answer

How do I list running gremlin queries? How can I cancel slow or long running queries?

Most databases provide a mechanism for users to list running queries and cancel them if required. This is particularly useful is terminating queries that take a lot of time. For example, in MySQL you woul do something like this: mysql>show…
The-Big-K
  • 2,672
  • 16
  • 35
4
votes
1 answer

Tinkerpop common version for multiple databases

Summary I am devloping a app that is intendent to work across multiple graph databases suppoted by tinkerpop Details Based on my research the same version of tinkerpop library (gremlin-python) does not work with the latest version of all the graph…
Akshay
  • 359
  • 1
  • 3
  • 14
4
votes
1 answer

custom id in gremlin_python

A custom id can be supplied to a new vertex at the Gremlin Console as follows: gremlin> g.addV('person').property(id, 1234).next() ==>v[1234] In the Java client it can be done as follows: graph.addVertex(T.id, customId); (Where T is…
Ned Lowe
  • 301
  • 1
  • 13
4
votes
1 answer

Gremlin - Traverse to leaf nodes in tree graph

I have tree data structure in graph as shown in below diagram. Each color represents node with different labels with relation like employee -> app -> project -> pv -> scan). Question #1: I want to find all leaf nodes (ones in green) of top node 0.…
indusBull
  • 1,834
  • 5
  • 27
  • 39
4
votes
2 answers

Tinkerpop Gremlin Depth First Search Order

I have a very simple example graph which I am trying to get a depth first query on. Let's say the graph edges look like this A->B A->C B->D B->E C->F C->G A depth first search from A should return A-B-D-E-C-F-G But if I could get the below order…
TimR75
  • 379
  • 2
  • 13
4
votes
1 answer

Tinkerpop/gremlin merge vertices (and edges)

Is there an easy way to replace or merge vertices and keep/merge existing edges? Or just manually copy all properties from the vertex and recreate existing edges and all (meta-)properties and then drop the superfluous vertex?
user3508638
  • 195
  • 1
  • 7
4
votes
1 answer

Gremlin group by vertex property and get sum other properties in the same vertex

We have vertex which will store various jobs and their types and counts as properties. I have to group by the status and their counts. I tried the following query which works for one…
Sads
  • 557
  • 6
  • 20