Skip to content

Instantly share code, notes, and snippets.

@johnymontana
Created December 23, 2018 00:17
Show Gist options
  • Save johnymontana/149eff5159e0fc4e6a6736375b9a03d4 to your computer and use it in GitHub Desktop.
Save johnymontana/149eff5159e0fc4e6a6736375b9a03d4 to your computer and use it in GitHub Desktop.
CALL apoc.load.json("file:///Users/lyonwj/Desktop/issues_000001.json") YIELD value
MERGE (i:Issue {url: value.url})
SET i += value {.title, .body, created_at: DateTime(value.created_at), closed_at: DateTime(value.closed_at)}
MERGE (u:User {url: value.user})
MERGE (u)-[:OPENED]->(i)
MERGE (r:Repository {url: value.repository})
MERGE (i)<-[:HAS_ISSUE]-(r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment