Reject

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
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Reject

Post by I_Server_Whale »

Hi All,

I have blank rows of data in a table I'm accessing. How do I reject these rows? Is there any in-built GUI function which does this or do I have to mention it in the constraint?

Your help is very much appreciated,

Thanks,
Naveen.
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post by pnchowdary »

Hi NaveenD,

As far as I know, there is no such in built GUI function in server jobs that lets you skip blank rows.

Therefore, I think that you need to use some sort of constraint to achieve it.

There are a lot of ways you can achieve this, one way to do it is to check the length of a key column after trimming the spaces and send the row to the output only if its greater than zero.

Code: Select all

Len(TrimB(InLink.InCol)) > 0 
Thanks,
Naveen
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It might be interesting to ask how they got in there in the first place.

The easiest thing to do is to filter them out when extracting - add another WHERE condition in the SQL so that "blank rows of data" (whatever that means) are not selected.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

I would filter them out in the initial SQL select if you don't want them involved in your job in any way, I would filter them out in the job via a constraint if you don't want to process them but you want to write them to a reject file for data quality investigation.
Post Reply