Using LOAD CSV to import a local file to Neo4j in

2019-02-18 06:47发布

So I've been trying to import an external CSV file into my graphdb. My neo4j is stored in a Docker container. I placed the file in NEO_HOME/import, as implied. I called the LOAD CSV command with "file:///mycsv.csv" as an argument, and got the followng in return

Couldn't load the external resource at: file:/var/lib/neo4j/import/mycsv.csv

Since I'm running the Docker container on a Windows environment, I don't see where the /var directory should be. Even when browsing the container itself via the Docker Quickstart Terminal. I still cannot find /var/lib...

When trying to change the .conf file to a different import directory, it didn't help as well.

Did somebody have this before?

1条回答
疯言疯语
2楼-- · 2019-02-18 07:41

You have to explicitly mount your import folder when invoking docker:

docker run -e NEO4J_AUTH=none -p 7474:7474 -p 7687:7687 -v $PWD/plugins:/plugins -v $PWD/import:/var/lib/neo4j/import neo4j:3.1.3-enterprise
查看更多
登录 后发表回答