Reputation: 147
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
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