Skip to content

Instantly share code, notes, and snippets.

@mbusch
Last active January 28, 2016 08:29
Show Gist options
  • Save mbusch/b22631aec3ed547c5658 to your computer and use it in GitHub Desktop.
Save mbusch/b22631aec3ed547c5658 to your computer and use it in GitHub Desktop.
Fixed version of importing snippet (tested with Neo4j 2.3.2)
USING PERIODIC COMMIT 500
LOAD CSV WITH HEADERS FROM 'file:///home/mbusch/neo4j-playground/beginning_neo4j_example.csv' AS row
MATCH (p:Person {id: row.id})
MATCH (friend:Person {id: row.friend_id})
WHERE row.friend_id IS NOT NULL
MERGE (p)-[f:FRIENDS_WITH]->(friend);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment