För att ha detta som referens sparar jag det här
nodes.csv innehåller noder
name
adam
bertil
ceasar
relations.csv innehåller relationer
one,theother
adam,bertil
bertil,adam
adam,ceasar
LOAD CSV WITH HEADERS FROM ’file:///nodes.csv’ AS row
CREATE (n:Node {name:row.name,title:row.name});
LOAD CSV WITH HEADERS FROM ’file:///relations.csv’ AS row
MATCH
(a:Node),
(b:Node)
WHERE a.name = row.one AND b.name = row.theother
CREATE (a)-[r:RELTYPE]->(b)
MATCH p=()–>() RETURN p