Skip to content

Instantly share code, notes, and snippets.

@davebshow
Created February 12, 2015 01:58
Show Gist options
  • Save davebshow/aeac2fc56e4775c6b600 to your computer and use it in GitHub Desktop.
Save davebshow/aeac2fc56e4775c6b600 to your computer and use it in GitHub Desktop.
CREATE INDEX ON :Author(id);
CREATE INDEX ON :Paper(id);
USING PERIODIC COMMIT
LOAD CSV FROM "file:///home/davebshow/git/projx/data/opsahl-collaboration/out.opsahl-collaboration"
AS line FIELDTERMINATOR " "
MERGE (author:Author {id: line[0]})
MERGE (paper:Paper {id: line[1]})
MERGE (author)-[:WROTE]-(paper);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment