2017-08-04 207 views
1

我只是在我的Windows笔记本上安装neo4j 3.2.3,并尝试加载csv文件。在Windows上Neo.ClientError.Statement.ExternalResourceFailed

LOAD CSV WITH HEADERS FROM 'file:///test.csv' AS line 
WITH toUpper(line.TEST_NAME) AS TEST_NAME 
CREATE(TEST); 

我得到了以下错误:

Neo.ClientError.Statement.ExternalResourceFailed: Couldn't load the external resource at: file:/C:/Users/*****/Documents/Neo4j/default.graphdb/import/test.csv 

我无法找到在default.graphdb目录neo4j.conf或礼文件。

有人可以帮忙吗?


我在Windows 10上neo4j 3.2.3。 我可以从网址加载。但是具有相同的文件格式,我无法从本地加载。

LOAD CSV FROM "https://gist.githubusercontent.com/jexp/d788e117129c3730a042/raw/a147631215456d86a77edc7ec08c128b9ef05e3b/people_leading_empty.csv" 
AS line 
WITH line LIMIT 4 
RETURN line 

成功

具有相同的文件另存为.../Neo4j的/ default.graphdb /进口/ test1.csv

LOAD CSV WITH HEADERS FROM "file:///test1.csv" AS line 
WITH line LIMIT 4 
RETURN line 

我得到错误:

Neo.ClientError.Statement.ExternalResourceFailed: Couldn't load the external resource at: file:/C:/Users/....../Documents/Neo4j/default.graphdb/import/test.csv 

从错误消息中,它可以找到该文件。但不能从本地执行LOAD。

+0

的可能的复制[Cypher支架的Neo4j不能载入外部资源(https://stackoverflow.com/questions/28398778/cypher-neo4j-couldnt-load-the-external-resource) – Alex

+0

我可以从url加载,但不能从本地加载相同的文件。 – jass

回答

0

I cannot locate the neo4j.conf or propriety files in the default.graphdb directories.

按照Neo4j docs,该neo4j.conf文件所在的目录<neo4j-home>\conf\neo4j.conf对于ZIP包和%APPDATA%\Neo4j Community Edition\neo4j.conf桌面安装。

您应该找到配置文件并设置以下行。

dbms.security.allow_csv_import_from_file_urls=true