I'm new to Neo4j and Cypher and have just imported two csvs - one is a list of places and the other is a list of people.
Each place has multiple peopleIDs for the people that have visited it stored as integers in an array.
Similarly, Each person has multiple placeIDs for the places they have visited stored as integers in an array.
I'm struggling when creating the relationships between the people and place nodes in my graph. I have tried the following, which works for individual IDs, but it doesn't create any relationships from an array of IDs:
MATCH (p1:People),(p2:Place)
WHERE p1.placeID = p2.placeID
CREATE (p1)-[:VISIT]->(p2)
The headers for the People csv file are as follows:
The headers for the Places csv file are as follows:
I guess that I need to use FOREACH
or UNWIND
or both but I can't find any good examples of how to achieve what I'm after