Hello!
I am new to Neo4j and attempting to bring over another graph database that I have structured in a database as, Name1, Entity1, Relationship1, Relationship2, Name2, Entity2, Source. As an example, it might say: Julie, Person, has employer, has employee, Company, Costco, www.linkedin.com.
I have been toying with different ways of importing the data and the best I have found is to load a CSV file with each entity type/name. For example, one file for all the Person nodes with their labels and then one with Company nodes.
Then loaded a CSV with the relationships using the following CSV Load in attempts to get the following to get a basic structure of:
Name1, Relationship 1, Name2
Or
Julie has employer Costco
LOAD CSV FROM "http://localhost:11001/project-ba2a314e-1c09-4a9b-b568-3bc04a75ad42/COMPLETE.csv" AS line
MERGE (n1:Name1 {name:line[1]})
MERGE (n2:Name2 {name:line[5]})
WITH n1, n2, line
CALL apoc.merge.relationship(n1,line[1],{},{},n2) YIELD rel
RETURN n1, n2, line
Problem is, even with this basic load I am getting a duplicate node for both Julie and Costco. I am not sure how to correct this issue or if there is an entirely better way to load the data. I have nearly 30,000 nodes structured this way so I would prefer to not have to do any massive data massaging in possible.