2016-06-21 2 views
0

Ich versuche, Daten in Neo4j zu laden eine lokale CSV auf meinem System:Ich bekomme einen Fehler mit LOAD in neo4j. Was ist mein Fehler?

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}); 

Jedes Mal wenn ich diesen Fehler: Könnte laden die externe Ressource nicht an: file:/var/lib/neo4j/import/Users/jlujan/Desktop/northwind/customers.csv

finde ich es ist URL-Problem, aber ich weiß nicht genau was. Bitte helfen Sie!

+0

wo Ihre csv liegt für local musst du "file: /// C: /" verwenden, starte von der C – Mvde

+0

mein csv ist auf meinem Desktop. Ich habe das versucht und ich bekomme immer noch das Gleiche. –

Antwort

1

Sieht aus, als ob Sie Neo4j 3 verwenden? Sie erhalten eine Einstellung in neo4j.conf wie diese

# 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 

finden Wenn Sie diese abnehmen/kommentieren, sollte Neo4j ermöglichen Einladung Dateien von überall im System

Verwandte Themen