Questions tagged [gremlin]

Gremlin is the graph traversal language and virtual machine of Apache TinkerPop™

Gremlin is a graph traversal language and virtual machine, developed by Apache TinkerPop. Gremlin is designed to work with any TinkerPop-enabled graph system, such as Titan, OrientDB, Neo4j, RDF stores like Stardog and Blazegraph, and others.

For more information, see the most recent reference documentation for TinkerPop.

3522 questions
6
votes
1 answer

Titan lookups on indexed key are incredibly slow?

Using Titan w/ Cassandra v 0.3.1, I created a vertex key index via createKeyIndex as described in the Titan docs. gremlin> g.createKeyIndex("my_key", Vertex.class) ==>null I now have appx 50k nodes and 186k edges in the graph, and I'm finding a…
bcm360
  • 1,437
  • 2
  • 17
  • 25
6
votes
2 answers

Create an index on a vertex property that already exists in Titan (Cassandra)?

I am using Titan Server (Cassandra) v 0.3.1. I'd like to create an index on a vertex key/property that I have already started to use. However, in their documentation, Titan explains that: To index vertices by key, the respective key index must be…
bcm360
  • 1,437
  • 2
  • 17
  • 25
5
votes
1 answer

How to update several vertices with same property in Gremlin

I have a set of vertices which have the same property 'TYPE'. How to update this property for all the given set of vertices.
Shireesh
  • 61
  • 4
5
votes
1 answer

Anonymous traversal vs normal traversal gremlin

I have read the documentation about anonymous traversals. I understand they can be started with __ and they can be used inside step modulators. Although I dont understand it conceptually. Why cannot we use a normal traversal spawned from graph…
CHID
  • 1,625
  • 4
  • 24
  • 43
5
votes
3 answers

Gremlin: The provided traverser does not map to a value

g.V() .has('atom', '_value', 'red').fold() .coalesce(unfold(), addV('atom').property('_value', 'red')).as('atom') .out('view').has('view', '_name', 'color').fold() .coalesce(unfold(),…
Yamiteru XYZ
  • 151
  • 9
5
votes
1 answer

How to do efficient bulk upserts (insert new vertex, or update property(ies)) in Gremlin?

Context: I do have a graph with about 2000 vertices, and 6000 edges, this over time might grow to 10000 vertices and 100000 edges. Currently I am upserting the new vertices using the following traversal query: Upserting Vertices &…
EasyQuestions
  • 327
  • 1
  • 10
  • 23
5
votes
2 answers

TinkerPop get the count and continue the same traversal

I'm currently using TinkerPop java APIs for graph traversal. Currently I had to create a duplicate copy of the same traversal to compute the count. Long allUsersCount = gt.V().hasLabel("user").has("name", "John").count().next(); List users =…
Vivek
  • 11,938
  • 19
  • 92
  • 127
5
votes
1 answer

403 Forbidden error for Gremlin to AWS Neptune

Thanks a lot for your help in advance I'm trying to setup my AWS Neptune environment by following the instruction at https://docs.aws.amazon.com/neptune/latest/userguide/get-started.html . The setup seems to be fine, and I could check the status by…
5
votes
2 answers

AWS Neptune bulk delete data

I want to bulk delete nodes in the same way we can bulk load data using a curl operation in AWS Neptune. Is there an API convention for gremlin like I see for SPARQL? If so can you please post reference? If there is no bulk delete via the API, how…
Justin Gerard
  • 147
  • 1
  • 7
5
votes
2 answers

Merge results from multiple queries in Gremlin

Let's say I want to get a few vertices from my database: g.V(1, 2, 3) And then I have another set of vertices: g.V(4, 5, 6) Imagine it's not just g.V(), but some more complicated traversal to get my vertices. But the traversal must start with V(),…
Vojto
  • 6,901
  • 4
  • 27
  • 33
5
votes
3 answers

Multi-tenancy in AWS Neptune database

I'm new to Neptune. What is the best way to support multi-tenancy in the Neptune database? The requirements: 1. Support thousands of tenants in the database (one cluster) 2. Avoid query getting too complicated with tenants filtering 3. Good…
Avner Levy
  • 6,601
  • 9
  • 53
  • 92
5
votes
1 answer

tinkerpop/gremlin-python: next() vs iterate()

What is the difference between next() and iterate() when working with gremlin? Why does next() return the added vertex when calling g.addV(), but iterate() does not? When should I use next() and when should I use iterate()?
JTW
  • 3,546
  • 8
  • 35
  • 49
5
votes
3 answers

aws neptune times out for large graph drop ()

There are some threads on this subject already.. particularly this one but is there any recommended solution to drop large graph other than batching..? I tried increasing timeout and it doesn't work Below is the example.. gremlin>…
Sahas
  • 3,046
  • 6
  • 32
  • 53
5
votes
1 answer

Gremlin Python in Web Application

I have a python flask web app, which is querying a Janus graph DB using gremlin_python. One basic question is the correct way to initialize the graph traversal object. Can I initialize my traversal g =…
Max Arbiter
  • 318
  • 4
  • 18
5
votes
1 answer

Error when binding two instances Janusgraph on same graph

So I'm trying to deploy 2 instances of Janusgraph (v 0.3.1) to insert data in the same keyspace of ScyllaDb backend. To do that i deploy 2 janusgraph containers with docker. The first one is starting without errors and creates the keyspace in my…
Amojow
  • 141
  • 9