Can I redirect records that result in an "import error&

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
bobyon
Premium Member
Premium Member
Posts: 200
Joined: Tue Mar 02, 2004 10:25 am
Location: Salisbury, NC

Can I redirect records that result in an "import error&

Post by bobyon »

We are finding that our input data is not as clean as we hoped. This results in errors like:

DC_INV_FLAT,0: Field "MSTR_PK_QTY" has import error and no default value; data: {3 6 0 0 0}, at offset: 68

The entire record associated with these warning gets dropped.

Is there any way to trap this warning (error) and redirect the record to a different data path rather than just dropping it. That data path may store the record or possibly just email someone to make them aware the record was not processed.

Thank You
Bob
Bob
sri1dhar
Charter Member
Charter Member
Posts: 54
Joined: Mon Nov 03, 2003 3:57 pm

Post by sri1dhar »

Which stage are you using for sourcing data. If its a sequential file stage then in the properties tab ->Options -> you can set Reject Mode = Output and rediret these records through a reject link, and perhpas write to a sequential file. You can only get the orginal row data but not the error message.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Create a rejects link on your Sequential File stage and direct these rows where you will. At some point you will need to convert the raw record to a string for ongoing processing.

The message reports that the value is 36000. This is fine for int32 and even for int16. What is the data type of this column? Only int8 or uint8 would cause a problem with this particular value.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

The metadat for the rejected record will be automatically a chunck, like varchar, and not according to your input metadata.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If it matched input metadata it wouldn't be a reject from a Sequential File stage! You may require additional reject links in your downstream processing, for example to detect out of range values, lookup failures and the like.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply