Six Stars

ORA-00001: unique constraint violated

Hi ,


I am trying to insert an existing record into target table, where there is a primary key, even though when i try to insert a record which is already present, is there any way in talend to ignore the below erro in run console and process the other records. i have unchecked die on error option still i am getting the below error at each row in run console

ORA-00001: unique constraint (project.SYS_C005268) violated




Fifteen Stars

Re: ORA-00001: unique constraint violated

There are a couple of ways to avoid this. You can use the "insert or update" option for "Action on data" of your db component. To do this you will also need to switch on "Field options" on the Advanced Settings tab. This will update any records that already exist.


If you do not want to update any records you can use a tMap and the table you are writing to as a lookup for the tMap. When your data comes into the tMap you can check to see if it can be joined on the primary key. If it can't then it can be loaded. If it can be joined, it means the data is already there and should be filtered out.


Both of those ways are better than just ignoring error messages.

Rilhia Solutions
Four Stars

Re: ORA-00001: unique constraint violated

 Basic Setting --> Uncheck the Die on Error.

 Advanced Setting --> Uncheck the Batch Size.