0
votes

Tried to load the csv file but there is an error that pops up "Neo.ClientError.Statement.SemanticError: Cannot merge node using null property value for name". This is the error that pops up everytime.

LOAD CSV WITH HEADERS FROM "file:///C:/epl1.csv" AS result
WITH result, SPLIT(result.FT, '-') AS ft, SPLIT(result.HT, '-') as ht
MERGE (a:Team {name: result.`Team 1`})
MERGE (b:Team {name: result.`Team 2`})
CREATE (a)<-[:TEAMA {score_FT: ft[0], score_HT: ht[0]}]-(g:Game {date: result.Date, round: result.Round})-[:TEAMB {score_FT: ft[1], score_HT: ht[1]}]->(b)

All the nodes, relationships should be added into the database. That will be the result from the loading the csv file.

1

1 Answers

0
votes

Make sure your CSV file's header row actually has Team 1 and Team 2 values. And also make sure that all other rows actually have values in the appropriate "columns".