Answer given by the tutorial.
LOAD CSV WITH HEADERS
FROM 'http://data.neo4j.com/v4.0-intro-neo4j/actors.csv'
AS line
MERGE (actor:Person {name: line.name})
ON CREATE SET actor.born = toInteger(trim(line.birthYear)), actor.actorId = line.id
ON MATCH SET actor.actorId = line.id
My answer:
LOAD CSV WITH HEADERS
FROM 'http://data.neo4j.com/v4.0-intro-neo4j/actors.csv'
AS line
MERGE (p:Person{actorId:toInteger((line.id)})
ON CREATE SET
p.name = line.name,
p.born = toInteger(trim(line.birthYear))
Why is this part needed?
actor.actorId = line.id
ON MATCH SET actor.actorId = line.id
Why do a second MATCH SET for actorId?