Target database insert errors

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Target database insert errors

Post by snassimr »

I need help !

During insertion of rows to target I get errors . Primary key violation , datatype mismatch ... . I want to catch these error's rows and put to another table and may be create some metadata with DBMS code error.

How to do these ? For example, I see that 1000 rows are go into final odbc stage and onlu 5 are inserted to target and all others were with errors
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

From the transformer immediately in front of the ODBC stage simply add another output link per your DS manual (please read it). Simply set the constraint to have the reject box checked, and make sure the link is the last one in the execution order. Rejects from the database will come back to the tranformer stage and get directed to the [reject] link. I suggest you use a sequential file to capture the rows rather than another database table.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

You may also have to set the commit size.

Search the forum for more info.
baabi_26
Participant
Posts: 14
Joined: Mon Jan 24, 2005 5:31 pm

Post by baabi_26 »

One setting you want to make sure is that the target stage's array size should be "1" if you want to capture the rows rejected by target.
Post Reply