Skip to content

Instantly share code, notes, and snippets.

@johnymontana
Created December 23, 2018 01:18
Show Gist options
  • Save johnymontana/59c492c04367e1510d6da5fd73cf34eb to your computer and use it in GitHub Desktop.
Save johnymontana/59c492c04367e1510d6da5fd73cf34eb to your computer and use it in GitHub Desktop.
CALL apoc.load.json("file:///Users/lyonwj/Desktop/issue_comments_000001.json") YIELD value
WITH value WHERE value.issue IS NOT NULL
MERGE (ic:IssueComment {url: value.url})
SET ic += value {.body, created_at: DateTime(value.created_at)}
MERGE (u:User {url: value.user})
MERGE (u)-[:AUTHORED]->(ic)
MERGE (r:Issue {url: value.issue})
MERGE (r)-[:HAS_COMMENT]->(ic)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment