Page 1 of 1

Filter stage clarification

Posted: Fri Sep 11, 2015 1:56 am
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"

Posted: Fri Sep 11, 2015 2:33 am
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.

Posted: Fri Sep 11, 2015 3:26 am
by vamsi_4a6
Tried all the above options but still facing same Issue.

Posted: Fri Sep 11, 2015 3:31 pm
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.