2

I am trying to import multiple CSVs, exported from multiple different Neo4j databases with APOC's export, into one big database. Some of the nodes are shared.

There is a problem that relationships in the CSV use the Neo4j's internal IDs for the _start and _end, instead of the nodes' "primary key" -- is the @Index with primary = true (same as @Id) a thing of the Neo4j or the Neo4j's Java OGM?. This is bad because these multiple exports could (and will) have same internal IDs for different nodes and the merged graph will be a mess. The same applies for nodes, I want to merge them based on the primary key during the import instead of creating duplicates.

Is there a way to export a Neo4j database with APOC in a way that it relies on primary keys instead of internal IDs? I need a CSV or JSON file, no CQL. Or is there another way of exporting a Neo4j database in a way that I can import multiple exports and they will merge seamlessly? ...something different than writing my CSV exporter and imported, this will be the very last option.

shelll
  • 3,234
  • 3
  • 33
  • 67

0 Answers0