Gremlin: How Works Io Import With Python
Solution 1:
First of all to be clear on the nomenclature, io()
is a step, while read()
and write()
are step modulators and those modulators can only apply to io()
step to tell it to read or write respectively. Therefore, as io()
currently only works with a string file name consequently you can only read/write from/to files.
If you want to send "a lot of data" with Python, I'd first consider what you mean by that in size. If you're talking millions of vertices and edges, you should first check if the graph database you are using has its own bulk loading tool. If it does, you should use that. You may also consider methods using Gremlin/Spark as described here in the case of JanusGraph. Finally, if you must use pure Gremlin to do your bulk loading, then parameterized traversal with your Python object (I assume a list
/dict
of some sort) is probably the approach to take. This blog post might offer some inspiration in that line of thinking.
Post a Comment for "Gremlin: How Works Io Import With Python"