I'm trying to merge a new CSV on top of an existing graph, where it merges in new relationships and if the node isn't there yet then it creates one. I tried this but I still get a "source" is missing error.
LOAD CSV WITH HEADERS FROM "file:///crowdfunds_graph.csv" as row
OPTIONAL MATCH (source:Voter {eth: row.source})
OPTIONAL MATCH (target:Voter {eth: row.target})
MERGE (source)-[:crowdfund {contribution: toInteger(row.CF_contribution)}]-(target)
ON CREATE SET source.eth=row.source
ON CREATE SET target.eth=row.target
I'm fairly new to cypher, thanks in advance for any help!