I've already use APOC code to export all the data to one csv or json. But when I import to MySQL csv is fine, but after import the data looks not right. Cause node has id, so all the node data are perfect. But relationship data just have start_id and end_id etc.. So MySQL database just add a new columns to save all the relationship data.
The json file, if I import to MySQL, can't import it. And it says "Not a valid json"
How do I export or do something can make it looks good? Should I export all the nodes as a table and export all the relationship as the other table ? Or do Neo4j has a kind of code to match with id and start_id and just append relationship data after nodes' data.
By the way, if all the problems are solved, do use the MySQL data to rebuild a graph? In this case, it can be showed on website etc..
Please help me. Thanks!
Can you share the APOC queries that you executed? It sounds like you might have exported the data in a CSV format that's designed for the Neo4j Import Tool, which probably isn't what you want for your use case.
I just use these two queries to export CSV and json data:
CALL apoc.export.json.all("/graph_db.json",{useTypes:true})
CALL apoc.export.csv.all('/graph_db.csv',{stream:true,batchSize:12000}) and also change true to false as well. But after export it's no changed.
I've no idea how to export the csv file and json file can support MySQL database. Could you show me how to do that?
I just use these two queries to export CSV and json data:
CALL apoc.export.json.all("/graph_db.json",{useTypes:true})
CALL apoc.export.csv.all('/graph_db.csv',{stream:true,batchSize:12000}) and also change true to false as well. But after export it's no changed.
I've no idea how to export the csv file and json file can support MySQL database. Could you show me how to do that?