I have a parallel job which inserts data from .DS file to a table in sql server. Due to unique key constraints I am not able to insert the data(some records are already existing in the table) I am using a copy stage.
This is the warning which I am getting:
APT_CombinedOperatorController,1: [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PK_Key'. Cannot insert duplicate key in object 'TabelX'.
I think I need to throw an exception in parallel job like FOR EXCEPTION tableschema.tabname but don;t know how to do that...
If you want to capture the rows where the rows are rejected or violating the contrains in table, then you can create the rejected link from the target database stage and handle the rejected rows.
i used to get this error when i was inserting rows in SQL server the table already contains some rows i truncated the table and ran and it worked fine.