Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-31-2021 11:58 AM
Hello, I am having a struggle trying to import a csv file. I'm running neo4j in a docker on ubuntu 20.04.1 and use this command:
sudo docker run
--name testneo4j
-p7474:7474 -p7687:7687
-v $HOME/neo4j/data:/data
-v $HOME/neo4j/conf:/conf
-v $HOME/neo4j/logs:/logs
-v $HOME/neo4j/import:/var/lib/neo4j/import
-v $HOME/neo4j/plugins:/plugins
--env NEO4J_AUTH=neo4j/test
--env NEO4J_dbms_security_allow__csv__import__from__file__urls=true
--env NEO4J_dbms_directories_import="/import"
neo4j:latest
file sample.csv is under $HOME/neo4j/import (permissions are set ok), then in the browser i do:
LOAD CSV FROM "file:///sample.csv" AS row RETURN row;
and then i get:
Couldn't load the external resource at: file:/import/sample.csv
i went through some threads (found very similar issues but to no avail), articles as well as tried possible solutions and still stuck. Not sure how to trouble shoot it and see nothing of interest in the log file. Any help would be appreciated.
Thanks
Solved! Go to Solution.
01-31-2021 02:35 PM
if you change
--env NEO4J_dbms_directories_import="/import"
to
--env NEO4J_dbms_directories_import=import
as this is the default (i.e note no leading /
and also not enclosed in double quotes ) does this address your issue
01-31-2021 02:35 PM
if you change
--env NEO4J_dbms_directories_import="/import"
to
--env NEO4J_dbms_directories_import=import
as this is the default (i.e note no leading /
and also not enclosed in double quotes ) does this address your issue
01-31-2021 02:43 PM
thanks for pointing that out! it works fine now. Thanks a lot!
07-21-2022 04:14 AM
what permissions we should set to the file..the import is not working for me..i am using docker to run neo4j..this is my query..
docker run \ --name nluneo4j \ -p 7474:7474 -p 7687:7687 \ -d \ -v /root/neo4j1/data:/data \ -v /root/neo4j1/logs:/logs \ -v /root/neo4j1/import:/root/neo4j/import \ -v /root/neo4j1/plugins:/plugins \ --env NEO4J_AUTH=neo4j/test \ --env NEO4J_dbms_security_allow__csv__import__from__file__urls=true \
--env NEO4J_dbms_directories_import=import \ neo4j:latest |
All the sessions of the conference are now available online