Export to graphml/graphson with Python
Hello everyone,
I hope this question has not been asked yet, if so I'm sorry for redundant content... I would like to export my graph to graphml or graphson using Python. The documenation provides this code "g.io("graph.xml").write().iterate()" , which does not produce any output or this "g.io(someOutputFile).with(IO.writer,IO.graphml).write().iterate()", which does not follow the syntax. Do you have any suggestion how to solve this? I also read about making sure that the file is accessible by the GremlinServer, do I need to do anything else except creating a connection to the server (which I have done to create the graph in the first place)?
2 Replies
i would expect
g.io("graph.xml").write().iterate()
submitted from python to write a "graph.xml" file on the Gremlin Server instance. Do you not see that file somewhere there? I'd guess looking in the directory from which you started Gremlin Server as the place to find that.Oh wow, I just looked in the wrong place! Thank you very much for this easy solution đŸ˜„