In a Windows environment, I\'m trying to load a .csv file with statement:
LOAD CSV WITH HEADERS FROM \"file:///E:/Neo4j/customers.csv\" AS row
On (Arch) Linux + neo4j-community-3.4.0-alpha09
, edit $NEO4J_HOME/conf
/neo4j.conf
:
dbms.security.allow_csv_import_from_file_urls=true
#dbms.directories.import=import
Restart neo4j (in terminal: neo4j restart
), and reload the Neo4j Browser (http://localhost:7474/browser/
) if you are using a web browser as your Neo4j interface/GUI.
Then, you should be able to load a csv from outside your $NEO4J_HOME/...
directory
E.g.,
LOAD CSV WITH HEADERS FROM "file:///mnt/Vancouver/Programming/data/metabolism/practice/a.csv" AS ...
where my $NEO4J_HOME/
is /mnt/Vancouver/apps/neo4j/neo4j-community-3.4.0-alpha09/
LOAD CSV WITH HEADERS FROM "file:/mnt/Vancouver/Programming/data/metabolism/practice/a.csv" AS ...
also works, but not
LOAD CSV WITH HEADERS FROM "file://mnt/Vancouver/Programming/data/metabolism/practice/a.csv" AS...
or
LOAD CSV WITH HEADERS FROM "/mnt/Vancouver/Programming/data/metabolism/practice/a.csv" AS...
i.e. use ...file:/...
or ...file:///...