raf
raf

Reputation: 147

Neo4J: I try to load data with a query into a jar but the command 'periodic commit' doesn't work, how could I do to load data with a periodic commit?

I try to load data from a csv with a query into a jar but the 'periodic commit' doesn't work:

USING PERIODIC COMMIT 1000 LOAD CSV with headers from 'file:///file_name.csv' as row fieldterminator 
'|' WITH row
MERGE .....

This query works from shell, doesn't work only in a jar.

For it to work in a jar, I need to delete the command: USING PERIODIC COMMIT 1000.

Does anyone have any ideas for uploading data from a CSV with a periodic commit?

Upvotes: 0

Views: 38

Answers (1)

Dave Fauth
Dave Fauth

Reputation: 878

I believe that the USING PERIODIC COMMIT is adding another transaction which the jar file will not like. You can look at an example like: https://maxdemarzi.com/2017/12/13/stored-procedure-to-import-data/ for some ideas.

Upvotes: 1

Related Questions