Maybe this example will help: row[4] here contains a collection (which 
length varies between lines from 0 to some N) of primary keys (stored 
inside nodes in corresponding string properties) separated by ';' and 
builds relationships from the node which has primary key eq row[0] to every 
node from that collection

LOAD CSV FROM "file:///home/stesin/preprocessed.csv" AS row
WITH row[0] AS key, SPLIT(row[4], ';') AS k0
UNWIND k0 AS k
WITH key, k
MATCH
 (o:P {primary_key: key}), (oo:P {primary_key: k})
MERGE
 (o)<-[r:KNOWS]-(oo);


-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to