我知道我们可以使用
LOAD CSV WITH HEADERS FROM 'file:///nodes.csv' AS row
在Neo4j中,但似乎默认文件夹是当前Neo4j DB下的导入目录。如果数据库位于磁盘D下,如何使用LOAD CSV(在Windows上)在磁盘E下加载csv文件?我尝试过'file:///e:/XXX.csv'
,'file:e:/xxx.csv'
。它们都不能起作用......
答案 0 :(得分:5)
你会在neo4j.conf中找到像这样的设置
# 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
如果你删除它/注释它,Neo4j应该允许从系统中的任何地方加载文件