2016-06-21 61 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的應該從系統中的任何地方允許加載文件

相關問題