CALL apoc.export.csv.query. Where the exported file is located

Hello, i have the following problem
I have spring boot application which is running in docker along with neo4j image.
In database i have 10mln records and i want export it to csv file but i don't know where the exported file is located or how i can set path where it should be exported.
I use apoc.export.csv.query as below

CALL apoc.export.csv.query("MATCH (n:Rating) RETURN n", "ratings.csv", {})

Im starting application and all services through docker-compose.yaml file

path for import in volumes works fine but for export i cant set in this way.

Where is the exported file ratings.csv?

Surprisingly the export functions by default write to the import folder, see


I added this line with dbms.directiories.import=import.

I have the following settings and that does not work still.

The exported file is not in this directory :confused:

Your volume shouldn't be mounted to /import but instead to /var/lib/neo4j/import - I've just verified that the exported file does end up there.

I did as you ordered but it didn't help
This volume for import works good but the second does not :frowning:


I've used that command to start a container. Once it's up and I do an export I see the csv file produced in the mounted import folder:

docker run --rm \
--name neo4j \
-e NEO4J_AUTH=neo4j/123 \
-e NEO4J_apoc_import_file_enabled=true \
-e NEO4J_apoc_export_file_enabled=true \
-e NEO4J_apoc_import_file_use__neo4j__config=true \
-e NEO4J_dbms_security_procedures_unrestricted=apoc.\\\*,algo.\\\* \
-e NEO4J_dbms_backup_address= \
-e NEO4JLABS_PLUGINS=\[\"apoc\"\] \
-v $PWD/data:/data \
-p 7474:7474 \
-p 7687:7687 \
-p 6362:6362 \
-v $PWD/import:/var/lib/neo4j/import \
--user=$(id -u):$(id -g) \