Try this:
LOAD CSV WITH HEADERS FROM "file:///relations.csv" AS row
MATCH (f:Node), (s:Node)
WHERE f.Name = row.FromNode
AND s.Name = row.ToNode
CALL apoc.create.relationship(f, row.R1,{}, s) YIELD rel
REMOVE rel.noOp
Follow this link:
GraphAcademy
CUP
Learn graphs.
Score for your country.
Represent your country in the GraphAcademy Cup.
Complete courses, earn points, and win weekly prizes.
Try this:
LOAD CSV WITH HEADERS FROM "file:///relations.csv" AS row
MATCH (f:Node), (s:Node)
WHERE f.Name = row.FromNode
AND s.Name = row.ToNode
CALL apoc.create.relationship(f, row.R1,{}, s) YIELD rel
REMOVE rel.noOp
Follow this link:
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Making relationship of two node in same row in csv | 3 | 188 | July 26, 2022 | |
| Import csv and create relations between product nodes | 6 | 390 | September 2, 2021 | |
| Populating database from CSV file with relations | 3 | 408 | December 1, 2020 | |
| Reading Relationships As Line From CSV | 3 | 250 | January 11, 2023 | |
| How to load csv in matrix form and create relationship | 10 | 699 | March 3, 2020 |