3
votes

I know that we can use

LOAD CSV WITH HEADERS FROM 'file:///nodes.csv' AS row

in Neo4j, but seems the default folder is import directory under current Neo4j DB. If the DB is under disk D, how can I load the csv file under disk E using LOAD CSV (on Windows)? I have tried 'file:///e:/XXX.csv', 'file:e:/xxx.csv'. None of them can works...

1

1 Answers

5
votes

You'll find a setting in neo4j.conf like this

# This setting constrains all `LOAD CSV` import files to be under the `import` directory. Remove or uncomment it to
# allow files to be loaded from anywhere in filesystem; this introduces possible security problems. See the `LOAD CSV`
# section of the manual for details.
dbms.directories.import=import

If you remove this/comment it, Neo4j should allow loading files from anywhere in the system