Questions tagged [tinkerpop3]

Apache TinkerPop™ is an open source graph technology stack, providing a storage agnostic interface to graph databases and graph analytics frameworks. Tinkerpop 3.x represents a major change in the API since 2.x given a complete re-write with Java 8 and refined thinking with respect to graph traversal mechanisms for both OLTP and OLAP.

Apache TinkerPop™ 3.x provides graph computing capabilities for both graph databases (OLTP) and graph analytic systems (OLAP) under the Apache2 license.

It offers:

  • A standard, vendor-agnostic graph API on the JVM (needs Java 8)
  • In-memory reference implementation of this API, TinkerGraph
  • A standard, vendor-agnostic graph query language, called "Gremlin" (Groovy based)
  • OLTP and OLAP engines for evaluating query
  • A command line shell, Gremlin shell
  • Visualization, via Gephi Integration

More information:

731 questions
0
votes
1 answer

Gremlin, 1-to-N relationship query issue

I'm new to Gremlin. Struggling to get this one right. Any help would be really appreciated. I have the Comments(C), Plans(P) and Users(U) enter code here data in below format. C3 - CommentsOn -> P1 C2 - CommentsOn -> P1 C1 - CommentsOn -> P1 U2 -…
user1472423
  • 101
  • 1
  • 12
0
votes
1 answer

Why doesn't my gremlin query give an output?

I have run into some errors with my gremlin console. I have the following lines of code: graph = TinkerGraph.open() graph.io(graphml()).readGraph('air-routes.graphml') i then do the following: g.V(2) And this gives no output. in fact whenever…
Maths12
  • 852
  • 3
  • 17
  • 31
0
votes
1 answer

Fetch vertices (at variable depths) reachable from a node

Sample graph of what I'm building I want to fetch all the students connected to a particular school. The students, however, can be present at any depth in the graph (with respect to the school). Ideally, I want to filter the students through the…
0
votes
1 answer

Query Edge Nodes & Edge Properties

I'd like to get a list of edge properties in the form of [ {'src': nodeid, 'dst': nodeid, 'item': itemid}, {'src': nodeid, 'dst': nodeid, 'item': itemid}, ... ] Refer to this question, I formulate the query as the following in…
twfx
  • 1,664
  • 9
  • 29
  • 56
0
votes
1 answer

How do you return a single object as opposed to a single item in an array?

From a traverser, if I just want the first item in the list of vertexes, how would I go about returning it as an object? I've tried: g.V() .has("Project", "id",…
0
votes
1 answer

Gremlin: Can't sum property from other node

I have a graph with post vertices, which have edges to 1 or more tag vertices. I'm trying to compute the total weight for each tag: // Create empty graph graph = TinkerGraph.open() g = graph.traversal() // Create some tag vertices g.inject('food',…
scribu
  • 2,958
  • 4
  • 34
  • 44
0
votes
1 answer

Tinkerpop3 custom edge id generator

I use TinkerGraph for integration tests (extended unit tests) in Java. In this implementation Edge ids are generated as a sequence of Integers. I want to change that so they are generated as random UUIDs. The reason for this is to get my test setup…
AnnTea
  • 532
  • 7
  • 15
0
votes
1 answer

Connecting to DSE Graph running on a Docker Container results into No host found

I am running my DSE Graph inside a Docker container with this command. docker run -e DS_LICENSE=accept -p 9042:9042 --name my-dse -d datastax/dse-server -g -k -s On my Scala Code I am referencing it as follows object GrDbConnection { val…
KyelJmD
  • 4,682
  • 9
  • 54
  • 77
0
votes
1 answer

gremlin javascript can't collect the properties of a vertex

After inserting a vertex in amazon neptune , I get the an unique id . If I want to print out the properties of a vertex , I can do it easily in gremlin console But in my node js app , if I try to do the same I can't get the properties of the…
0
votes
1 answer

TinkerPop 3 Gremlin Collect Edge Properties during traversal

Using TinkerPop 3 Java APIs: My graph looks like this: james {risk: 'n'} --> chris {risk: 'n'} --> raj {risk: 'n'} --> joanne {risk: 'y'} The edge label is 'travelledWith' and a property called 'pnrLocator' Now, I want to traverse from james till…
user1189332
  • 1,773
  • 4
  • 26
  • 46
0
votes
1 answer

simplePath() breaks query

When ading simplePath() inside a match(), my query no longer returns results. The query attempts to find any event (e.g. "graph database conference") that somehow involves three specific people. "alice" attended the school that hosted the event.…
deridex
  • 130
  • 6
0
votes
2 answers

List of vertices that can be reached by a specified list of vertices

Here's how my graph looks like. g = TinkerGraph.open().traversal() school1 = g.addV('school').property('id', '1').next() school2 = g.addV('school').property('id', '2').next() student1 = g.addV('student').property('id', '3').next() student2 =…
Pranjal
  • 500
  • 6
  • 12
0
votes
1 answer

Converting long value(epoch) to Date format using gremlin query

I have vertex created date in long format (epoch). I want to convert the long value into particular date format (YYYY-MM or YYYY-MM-DD) using gremlin query. .map or .transform is not working. Can someone please help.
Siva
  • 27
  • 7
0
votes
1 answer

How to load vertices of specific type?

How can I load the vertices of a specific type using the Tinkerpop 3 Java API. With Tinkerpop 2.x it was possible to use the "@class" property. This does not seem to work with TP 3.x. @Test public void testOrientDB() { try (OrientGraphFactory…
Jotschi
  • 3,270
  • 3
  • 31
  • 52
0
votes
1 answer

How to append the count of child vertices in Gremlin?

Here's the graph I'm working on. g = TinkerGraph.open().traversal() first_generation = g.addV('person').property('id', '1').next() second_generation = g.addV('person').property('id', '2').next() third_generation = g.addV('person').property('id',…
Pranjal
  • 500
  • 6
  • 12