1

I cannot find an implementation of BatchGraph (https://github.com/tinkerpop/blueprints/wiki/Batch-Implementation) in python connector (https://pypi.python.org/pypi/gremlinpython)

Could anyone assist me with this?

2 Answers 2

1

I've received an answer from TinkerPop Jira ticket, that BatchGraph was deprecated.

In general, massive batch loads (say millions of things) should be done with OLAP and anything less is probably best done with a groovy script. If you want to do it from python i would just write a parameterized script like:

data.each {
  g.addV('name', it.name, 'age', it.age).iterate()
}

where "data" is a parameter you pass with the script. "data" is just a List and the number of maps represents your batch size. Use sessionless requests so that Gremlin Server auto-commits. If you have further follow up questions, please ask them on the gremlin-users mailing list - thanks.

Sign up to request clarification or add additional context in comments.

Comments

0

In gremlin_python you can concat the traversals and finally send it to gremlin like this:

ret1 = g
ret1 = ret1.V()
ret1 = ret1.limit(4)
ret1.toList()

output:
[v[1], v[2], v[3], v[4]]

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.