Skip to content

Instantly share code, notes, and snippets.

@Btibert3
Last active December 29, 2015 23:04
Show Gist options
  • Save Btibert3/cfec2c103885efeb6ba9 to your computer and use it in GitHub Desktop.
Save Btibert3/cfec2c103885efeb6ba9 to your computer and use it in GitHub Desktop.
Quick Helper Function to use Neo4j Shell for LOAD CSV. Sets the shell tool and expects a file path. Very alpha but it works.
## a function to import cypher statements into the shell
build_import = function(NEO_SHELL="~/neo4j-community-2.3.1/bin/neo4j-shell",
cypher_file) {
cmd = sprintf("%s -file %s", NEO_SHELL, cypher_file)
system(cmd)
}
## example
## import the database from scratch
## build_import(cypher_file="import-db.cql")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment