Using neo4j-admin to import csv created using apoc.export.csv.all

(Thecolburns Michael) #1

When using the APOC plugin, if one exports the entire database using apoc.export.csv.all, is it possible to load an empty database using the exported csv as input to neo4j-admin import? One of the problems is that the import expects separate files for nodes and relationships. The apoc.export.csv.all creates a single file.

(Michael Hunger) #2

Yes, that's something that would need to be added.
And then also generating the appropriate header files, but it's a good idea.

Can you add a github issues to the APOC repository about it?

Otherwise you could combine db.labels and db.relationshipTypes with an apoc.export.csv.query where you create the query appropriately to export the right format for the CSV loader.
Let me know if you need help with that.

(Thecolburns Michael) #3

Yes, I will add to Github issues!

Thanks for responding!