📜  使用 python ode 将文件导入 neo4 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:40.087000             🧑  作者: Mango

代码示例1
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))