python neo4j driver examples
Example: import file to neo4 with python ode
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))