cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Apoc.export.csv.all prepending 'import\' to specified filename, causing failure

I'm using embedded neo4j 3.5.8, APOC 3.5.0.5. The database is opened in Java using:
</>
File graphDbDirectory = new File(graphDbPath);
GraphDatabaseBuilder databaseBuilder = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(graphDbDirectory);
databaseBuilder.setConfig("apoc.export.file.enabled", "true");
databaseBuilder.setConfig("dbms.security.procedures.unrestricted", "apoc.*");
graphDb = databaseBuilder.newGraphDatabase();
</>
I then register the APOC procedures, and that all goes fine. But, when I try to execute:

</>
Result result = graphDb.execute("CALL apoc.export.csv.all("c:/data/bridge/embedded_export.csv",{d:','})");
</>
I get exceptions, cascading from:
Caused by: java.io.FileNotFoundException: import\c:\data\bridge\embedded_export.csv (The filename, directory name, or volume label syntax is incorrect)

At no time did I ever specify "import" as part of any file name. This happens for both CSV and JSON export, so at least it's consistent, but that's not acceptable. Places where this needs to run do not and will not have that directory structure. How do I fix this?

1 REPLY 1

Never mind, I found the answer tucked away in the very beginning of the Export chapter. I need to set one or both of those parameters correctly for my use case.