APT_CombinedOperatorController warning in DS parallel job

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sri1111
Charter Member
Charter Member
Posts: 29
Joined: Sun Nov 20, 2005 9:23 am

APT_CombinedOperatorController warning in DS parallel job

Post by sri1111 »

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...

Any help is greatly appreciated.

Sri
thumsup9
Charter Member
Charter Member
Posts: 168
Joined: Fri Feb 18, 2005 11:29 am

Post by thumsup9 »

Sri,

What do you want to do here. Do you want to insert duplicate data into the target table. If not why dont you update and insert.
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

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.
Regards,
S. Kirtikumar.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

But you cannot escape from getting warning related to this. Better do a conditional check prior to load.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
samsuf2002
Premium Member
Premium Member
Posts: 397
Joined: Wed Apr 12, 2006 2:28 pm
Location: Tennesse

Post by samsuf2002 »

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.
hi sam here
sri1111
Charter Member
Charter Member
Posts: 29
Joined: Sun Nov 20, 2005 9:23 am

Post by sri1111 »

Thanks Guys....I am thinking of truncating the data and load into the table.
Post Reply