Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-22-2022 08:13 AM - edited 08-22-2022 08:25 AM
Hi,
I need your help: the code doesn't create any relationships:
LOAD CSV WITH HEADERS FROM("file:///test.csv") AS row
MATCH (p1:City {DS:row.from}), (p2:City {DS:row.to})
CREATE (p1)-[:NB]->(p2);
The nodes:
CREATE (a:City {DS: 'AAA'})
CREATE (b:City {DS: 'BBB'})
CREATE (c:City {DS: 'CCC'})
CREATE (d:City {DS: 'DDD'})
The csv file
test.csv
from, to
"AAA","BBB"
"CCC","DDD"
Thanks a lot in advance,
Michel
Solved! Go to Solution.
08-22-2022 10:02 AM
08-22-2022 09:49 AM - edited 08-22-2022 09:50 AM
Looks like csv header column has a space before 'to'. You can remove the space before 'to' or use backtick.
08-22-2022 10:02 AM
Check the csv header. There is a space before 'to'.
08-22-2022 10:11 AM
You saved my day ....
All the sessions of the conference are now available online