Read Rejected Rows and Format the Rows

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
anil411
Premium Member
Premium Member
Posts: 53
Joined: Thu Aug 11, 2005 8:34 am

Read Rejected Rows and Format the Rows

Post by anil411 »

I am reading Sequential File of 27000 Records of which 25000 Records MetaData is matching and processing the 25000 records.

While Reading Sequential File, We are using Reject mode option and writing Rejected records output to Sequential File.All the Rejected records (arround 2000) are written to Reject File.

I would like to Fix the 2000 records of Data.How do i format the data or Read the Reject File and try to find which column is causing the issue.

Please let me know.
paultechm
Participant
Posts: 27
Joined: Wed Jul 25, 2007 2:09 am

Re: Read Rejected Rows and Format the Rows

Post by paultechm »

Read as a single varchar column(with out column length) correct each line in a transformer ,use column import to split the data into actual meta data
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There's no "reject reason" recorded so (AFAIK) this is strictly a manual process. Compare the rejected rows to the metadata you've defined in the stage to see which fields have data that do not fit their metadata, for example a date column with an invalid date in it.

If you want them processed rather than rejected, make sure all of the fields are defined as a string and then do the data validation yourself inside the job. That way you may be able to 'correct' any issues found rather than have them simply rejected. Worst case, you can manually reject them and at the same time record the reason.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

After capturing the rejected rows from the Sequential File stage using a reject link, re-parse them for example using a Column Import stage or Transformer stage.
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