2016-06-21 38 views
0

我想用我的系统上的本地CSV将数据加载到的Neo4j:我在neo4j中使用LOAD时出现错误。我的错误是什么?

USING PERIODIC COMMIT 
    LOAD CSV WITH HEADERS FROM "file:/Users/jlujan/Desktop/northwind/customers.csv" AS row 
    CREATE (:Customer {CustomerID: row.CustomerID, CompanyName: row.CompanyName, 
    ContactName: row.ContactName, ContactTitle: row.ContactTitle, 
    Address: row.Address, City: row.City, Region: row.Region, PostalCode: row.PostalCode, Country: row.Country, Phone: row.Phone, Fax: row.Fax}); 

每次我得到这个错误:未能加载在外部资源:file:/var/lib/neo4j/import/Users/jlujan/Desktop/northwind/customers.csv

我认为这是一个网址问题,但我不完全确定。请帮忙!

+0

哪里是你的CSV什么位置?对于本地你必须使用“file:/// C:/”从C – Mvde

+0

开始,我的csv在我的桌面上。我试过了,我仍然得到同样的东西。 –

回答

1

看起来你使用的是Neo4j 3? 你会发现在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的应该从系统中的任何地方允许加载文件

相关问题