1

I have a lot of graphml files and I'm trying to create separate neo4j database using each file.

Right now I'm using Gephi to export graphml to neo4j database but that it would take me to much time for so many files.

I've found this import-graphml [-i in.xml] [-r REL_TYPE] [-b 20000] [-c] [-t]

Is it possible somehow to import this using Python and then export complete neo4j database?

2 Answers 2

1

I could not write in to "comment" section due to my low amount reputation so please assume this is not a clear answer but a comment..

I didn't experience so much, but I don't suggest exporting Neo4j db via a pythonic way. For my case, it took so much time. Instead I run an AJAX code and it was quite fast. Or you can run any cypher query with py2neo. To import data, I can refer the networkx which can read graphml files. To push into the Neo4j, there is another library here. I don't have a comparison in terms of performance, but good to have a look. Check this answer as well.

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

1 Comment

Thanks for the hint! Let me check this solution!
1

Why do you need it in python?

You can use neo4j-shell tools to import the graphml and also export it to csv with

import-cypher -o file.csv MATCH (m)-[r]-(n) return id(m),id(r),id(n); 

1 Comment

And how to do it for 1 000 graphml files?

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.