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
22
votes
2 answers

How to perform pagination in Gremlin

In Tinkerpop 3, how to perform pagination? I want to fetch the first 10 elements of a query, then the next 10 without having to load them all in memory. For example, the query below returns 1000,000 records. I want to fetch them 10 by 10 without…
Mohamed Taher Alrefaie
  • 15,698
  • 9
  • 48
  • 66
21
votes
1 answer

Why do you need to fold/unfold using coalesce for a conditional insert?

I'm trying to understand how this pattern for a conditional insert works: g.V() .hasLabel('person').has('name', 'John') .fold() .coalesce( __.unfold(), g.addV('person').property('name', 'John') ).next(); What is the purpose of the…
cejast
  • 957
  • 8
  • 18
18
votes
2 answers

How can I use gremlin-console to remotely create and access variables?

I remotely connect to a gremlin server using gremlin-console(which is janusgraph), but when I create a variable and access it, it doesn't work. My ultimate goal is to use gremlin-console to create index... gremlin> :remote connect tinkerpop.server…
Gao
  • 912
  • 6
  • 16
16
votes
4 answers

Is it possible to visualize the output of a graph query (Gremlin or SPARQL) as nodes and edges in Amazon Neptune?

GREMLIN and SPARQL only define the APIs for graph queries. How do I use the API responses and and plot that as an actual graph, with edges and vertices? Is there something like MySQL Workbench for graphs?
The-Big-K
  • 2,672
  • 16
  • 35
14
votes
3 answers

Gremlin - only add a vertex if it doesn't exist

I have an array of usernames (eg. ['abc','def','ghi']) to be added under 'user' label in the graph. Now I first want to check if the username already exists (g.V().hasLabel('user').has('username','def')) and then add only those for which the…
Vipul Sharma
  • 768
  • 3
  • 11
  • 25
12
votes
1 answer

Gremlin: "The provided traverser does not map to a value" when using project

In the Modern graph, I want to get for each person the name and the list of names of software he created. So I tried the following query g.V().hasLabel('person').project('personName','softwareNames'). by(values('name')). …
cmant
  • 453
  • 1
  • 5
  • 11
11
votes
1 answer

How to remove edge between two vertices?

I want to remove edge between two vertices, so my code in java tinkerpop3 as below private void removeEdgeOfTwoVertices(Vertex fromV, Vertex toV,String edgeLabel,GraphTraversalSource g){ …
MichaelP
  • 2,761
  • 5
  • 31
  • 36
11
votes
1 answer

What next() means in TinkerPop

I'm currently reading the TinkerPop3 Documentation What I'm confused is that I can't find any explanation about next(). For example, w/ next() or w/o next() returns same vertext gremlin> g.V().has('name', 'marko') ==>v[1] gremlin> g.V().has('name',…
Jason Heo
  • 9,956
  • 2
  • 36
  • 64
9
votes
1 answer

gremlin python - add multiple but an unknown number of properties to a vertex

I want to add more than one property to a vertex, but from the outset do not explicitly know what those properties might be. For example, say for one person to be added as vertex to the graph, we have the following property dictionary: Person 1 { …
Ian
  • 3,605
  • 4
  • 31
  • 66
9
votes
2 answers

How do I update a specific edge property using Gremlin/Titan/TinkerPop3?

The goal I have a simple enough task to accomplish: Set the weight of a specific edge property. Take this scenario as an example: What I would like to do is update the value of weight. Additional Requirements If the edge does not exist, it should…
Double M
  • 1,449
  • 1
  • 12
  • 29
9
votes
1 answer

Best way to find a shortest path between two nodes in Tinkerpop 3.1

I know this was asked several time but I haven't found any reference regarding the last version of Tinkerpop (3.1), featuring many new useful functions we can use in our traversals. Let's say I have to find a shortest path between nodes 3 and 4. Is…
Alberto
  • 597
  • 3
  • 17
8
votes
1 answer

Does JanusGraph run on Windows 10

I'm running on Windows 10 with janusgraph-0.2.0-hadoop2. I have put the winutils.exe in the bin folder. P:\Software\DB\NoSQL\janusgraph-0.2.0-hadoop2\bin>gremlin-server.bat Error: Could not find or load main class Files I had a quick look…
8
votes
2 answers

Gremlin: What's an efficient way of finding an edge between two vertices?

So obviously, a straight forward way to find an edge between two vertices is to: graph.traversal().V(outVertex).bothE(edgeLabel).filter(__.otherV().is(inVertex)) I feel that filter step will have to iterate through all edges making really slow for…
Mohamed Taher Alrefaie
  • 15,698
  • 9
  • 48
  • 66
7
votes
1 answer

Gremlin Console for Windows error "The most significant bit.."

Seems like Gremlin Console not working for Windows: I downloaded the latest Gremlin console and run the bin\gremlin.bat file. seems like after connecting (as in the below commands) and running a simple remote command (g.V(123).count()) I'm getting…
toto
  • 1,197
  • 2
  • 15
  • 26
7
votes
2 answers

Gremlin Coalesce To Add Multiple Vertices and Edges

Right now I am able to generate a query to create as many vertices and edges as I want. e.g. g.V(). addV('vert1').as('a'). addV('vert2').as('b'). addE('has').from('a').to('b') ^^^^^^^^^^^^^ This works. Easy enough right? Now lets create a gremlin…
Austin Malpede
  • 115
  • 2
  • 8
1
2 3
48 49