using DB2 connector to load a table

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
koojo
Premium Member
Premium Member
Posts: 43
Joined: Sun Jul 11, 2004 1:30 pm
Location: USA

using DB2 connector to load a table

Post by koojo »

I am using a DB2 connector to load a table. The table has a decimal field. When I load the decimal with a character it loads a 0.0 in that field. I want it to throw a database error so that I can trap this on the DB2 connector reject link. Is there a variable or setting that I can enable to make this happen?
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

Use the IsValidfunction in a transformer to test them and constraints to route bad ones to a separate link as rejects. That will give you better performance than waiting for it to be returned from the database.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
koojo
Premium Member
Premium Member
Posts: 43
Joined: Sun Jul 11, 2004 1:30 pm
Location: USA

Post by koojo »

Would like to avoid using the IsValid function and another reject link. Will need to use IsValid on many tables and fields. There willl be very little to no impact on performance as there will be very few records go down the db2 reject link.
bart12872
Participant
Posts: 82
Joined: Fri Jan 19, 2007 5:38 pm

Post by bart12872 »

Waiting the end point to check that a column have the good format is in my opinion not a good thing to do.
Using the isvalid function may involve a lot of coding.
In your case, I'll check when reading the source with a column import and reject lines with wrong format if your source is a file.
If you have lot of tables or process you can factorize using one job and multiple schema files.
Post Reply