How to handle duplicate key errors as REJECTED DATA during COPY

joergschaberjoergschaber Vertica Customer

Hi,

is there a way to handle duplicate key errors during COPY the same way as parsing errors, i.e. load them into the REJECTED DATA TABLE?
Currently, I catch the exception, create a tmp table without constraints re-run the COPY statement and then INSERT the distinct rows into the original table. However, that is not possible when I want to automatically run COPY using a scheduler.

best,

Jörg

Answers

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file