Advice on Data Importing - Desktop

Hi all,

I'm still quite new to Neo4J, and to be honest it has taken me little while to get my head around syntax.

A frustration I'm running in to is the deletion of duplicated data. I have two data sets, Group A and Group B. The aim is to find overlaps between the two groups via current and historical addresses further split up into residential or postal.

Below is a representation of what I'm after. The nuance is required hence the horrible overcomplication.

The lack of data manipulation from the importer is a pain point as with these addresses I (conditionally) need to create relationships where there is an overlap in each individual's residence timeframe.

How can I best approach this without losing detail?

If you have the two datasets as .csv files, you can use LOAD CSV and write the Cypher queries in your desired schema. This way you will have a better control in your implementation.

Did you use MERGE when creating nodes to avoid duplicates?

LOAD CSV WITH HEADERS FROM 'file:///large_file.csv' AS row
CALL {
  WITH row
  MERGE (n:Label {id: row.id})
  ON CREATE SET n.name = row.name
} IN TRANSACTIONS OF 1000 ROWS;

I am far from being proficient in using Neo4j, but I will take the liberty to express some opinions about your (interesting!) problem:

  1. Data importer is aimed just for importing, not for further data manipulation.

  2. Anyway, in my opinion, for every node type (label) in the graph you should designate one property as "node key" that is an unique node identifier, something like a primary key for an RDB table. It is strongly advisable, even if Neo4j does not state it as compulsory.

  3. I did not understand your model very well, partly because the relations do not have any information attached (type, properties). This is, in my opinion, an important clarity advantage Neo4j offers that relationships between RDB tables do not.

Maybe your model needs some refactoring.