neo4j LOAD CSV返回无法加载外部资源 - neo4j在目录中丢失 [英] neo4j LOAD CSV returns Couldn't Load external resource - neo4j lost in directory
问题描述
由于我使用Neo4j 3.0.1,这个cypher查询:
使用周期性委托500
LOAD CSV WITH HEADERS
FROM>file:///home/user/Documents/links.csvAS csvLine
...
返回
无法加载外部资源:file:/home/user/Documents/neo4j-community-3.0.1/import/home/user/Documents/links.csv
Neo4j位于我的机器上(Ubuntu 14.04),在Documents文件夹中, links.csv文件。
(使用neo4j的2.xx版本,这个确切的查询是完美的)
我不下and为什么neo4j3.0尝试重建在导入文件夹中的csv文件路径...
上传文件在ftp上查询neo4j通过http协议工作,所以它不是关于import文件夹的访问权限。我的links.csv文件权限是664。
有什么想法吗?
这是一个集成在neo4j 3.0中的安全措施,以防止脚本从不需要的目录加载源代码(如 / etc / password c / c>
您可以在 conf / neo4j.conf中添加以下设置
为了绕过这个:
dbms.security.allow_csv_import_from_file_urls = true
pre>
或者只需将csv文件放入导入目录即可。
Since I use Neo4j 3.0.1, this cypher query:
USING PERIODIC COMMIT 500 LOAD CSV WITH HEADERS FROM >"file:///home/user/Documents/links.csv" AS csvLine
...
returns
Couldn't load the external resource at: file:/home/user/Documents/neo4j-community-3.0.1/import/home/user/Documents/links.csv
Neo4j is located on my machine (Ubuntu 14.04), in the "Documents" folder, as the "links.csv" file.
(with a 2.xx version of neo4j this exact query was working perfectly)
I don't undersand why neo4j3.0 try to rebuild the csv file path in the "import" folder...
Uploading the file on ftp to query neo4j through http protocol works, so it's not about access permissions of the "import "folder". My "links.csv" file permission is 664.Any idea ?
解决方案This is a security that has been integrated in neo4j 3.0 in order to prevent scripts to load sources from an unwanted directory (like
/etc/password
for example.You can add the following setting in
conf/neo4j.conf
in order to bypass this :dbms.security.allow_csv_import_from_file_urls=true
Or just put your csv files in the import directory.
这篇关于neo4j LOAD CSV返回无法加载外部资源 - neo4j在目录中丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!