Rollback COPY on ANY failure to load ALL records
We are having an issue where the COPY command is not loading all records yet the rejected records are showing up in the logs rather than the base table. We need to find a way to get the COPY command to commit only when ALL records are loaded. Any failure to load should cause a rollback of the entire copy. Is that possible?
0
Comments
Use the REJECTMAX parameter.
See https://my.vertica.com/docs/9.0.x/HTML/index.htm#Authoring/AdministratorsGuide/BulkLoadCOPY/CapturingLoadExceptionsAndRejections.htm
It also looks like "ABORT ON ERROR" will do the same thing. Im not exactly sure what the difference is between REJECTMAX and "ABORT ON ERROR" though, so I may specify both.
Hi @usao,
I believe for your case, where you said:
... "REJECTMAX 1" is the same as "ABORT ON ERROR", except for the error message...
Example:
This has been resolved. The "ABORT ON ERROR" seems to do what I need.