Justin Lujan
Justin Lujan

Reputation: 21

I am getting an error using LOAD in neo4j. What's my error?

I am trying to load data into neo4j using a local csv on my system:

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

Every time I get this error: Couldn't load the external resource at: file:/var/lib/neo4j/import/Users/jlujan/Desktop/northwind/customers.csv

I think it's a URL issue, but I'm not exactly sure what. Please help!

Upvotes: 0

Views: 44

Answers (1)

Luanne
Luanne

Reputation: 19373

Looks like you're using Neo4j 3? You'll find a setting in neo4j.conf like this

# 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

If you remove this/comment it, Neo4j should allow loading files from anywhere in the system

Upvotes: 1

Related Questions