Gremlin python next() not working similar to next in Gremlin Console

61 views Asked by At

In gremlin python I'm not able to find a way to iterate through without loading everything at once in the memory. for eg.In gremlin python ->

g.V().next()

Will iterate all the vertices in the graph at the same time But we can iterate through the graph one at a time in gremlin console for eg. In gremlin console ->

t = g.V();[]
t.next()  # V[0]
t.next()  # V[1]

In gremlin python the query will timeout for large enough vertices. Is there any way in gremlin python or gremlin java to iterate through the vertices one at a time? I have been searching for a way to do this for over a week.

I also tried https://jayanta-mondal.medium.com/the-curious-case-of-pagination-for-gremlin-queries-d6fd9518620, but it did not work.

We want a efficient way to iterate over the graph without timing out.

0

There are 0 answers