📅  最后修改于: 2022-03-11 14:45:40.087000             🧑  作者: Mango
CREATE CONSTRAINT ON (u:User) ASSERT u.ourid IS UNIQUE;
USING PERIODIC COMMIT
LOAD CSV WITH HEADERS FROM "file:///some/path/neo4jplayground/initdata/fullset.csv" AS row
WITH row LIMIT 30
MERGE(u:User {ourid:row.user})
FOREACH (f IN split(row.friends, ",") |
MERGE(u2:User {ourid:f})
MERGE(u)-[:FRIEND]->(u2))