Filter stage clarification

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
vamsi_4a6
Participant
Posts: 95
Joined: Wed Jun 04, 2014 12:06 am

Filter stage clarification

Post by vamsi_4a6 »

Filter stage is not working properly in my case..design is as follows:
sequential file -->filter-->two sequential files(where1 and where2)

i/p:
EmpNo,EmpName,DeptNo
1,ABC,10
2,BCD,20
1,ABC,10

filter properties:

where1=DeptNo=10--link0
where2=EmpName='ABC'--link1
outputrowsonlyonce=false

i am excepting two rows for both where1 ans where2 sequential files.but i got below output

where1:
no rows

where2:
"1","ABC","10"
"1","ABC","10"
boxtoby
Premium Member
Premium Member
Posts: 138
Joined: Mon Mar 13, 2006 5:11 pm
Location: UK

Post by boxtoby »

Might be for one of several reasons:

Your expression DeptNo=10 might need to be DeptNo="10" if the column is a varchar

There may be trailing/leading spaces in the column. Insert a transformer before the filter and trim() the column

If the file came from a windows system the last character in the last column will be a carriage return. Set the stage to read the file as a DOS file.

Hope that helps.
Bob Oxtoby
vamsi_4a6
Participant
Posts: 95
Joined: Wed Jun 04, 2014 12:06 am

Post by vamsi_4a6 »

Tried all the above options but still facing same Issue.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What is your link execution order?

In any case, in your example both rows should have gone to both outputs. Therefore check that your values actually match - in particular that there are no leading or trailing space characters.

Prefer a Transformer stage for filtering, since you can apply Trim() functions within the constraint expressions.
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