cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Make all to all relationship among the element present in list

I have csv file with two column as source and target.
I need to make all to all relationship between all the element in the target column of each respective source.

here is my query, I am not able to make all to all relationship.

LOAD CSV with headers FROM 'file:///sample.csv' AS row

unwind (split(row.target,'|'))  as target

merge (n:MyNode{name:row.source})
merge (m:MyNode{name:target})
merge (m) -[:TO{weight:row.weight}]->(n)

merge (m) -[:r]-(m)  // not sure about this line
1 REPLY 1