Btibert3
11/29/2015 - 9:02 PM

Quick Helper Function to use Neo4j Shell for LOAD CSV. Sets the shell tool and expects a file path. Very alpha but it works.

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")