compare values in transformer stage
Moderators: chulett, rschirm, roy
compare values in transformer stage
Hi,
how can i remove duplicates in transformer stage using stage variables?
I have only one column in my source,
payment ID
100
100
101
103
102
101
104
after sorting and hash partitioning in transformer stage, Could you please explain me the logic?
how can i remove duplicates in transformer stage using stage variables?
I have only one column in my source,
payment ID
100
100
101
103
102
101
104
after sorting and hash partitioning in transformer stage, Could you please explain me the logic?
Last edited by ravi7487 on Tue Aug 30, 2011 9:16 am, edited 1 time in total.
Re: compare values in transformer stage
Is it possible for you to use the distinct function in the Source when you are getting all these values or do you have specific requirement to do this in transformer stage..
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Is this an interview question?
WHY must you use a Transformer stage?
Have you performed a Search of DSXchange? Very similar questions have been asked and answered even quite recently, such as this one.
WHY must you use a Transformer stage?
Have you performed a Search of DSXchange? Very similar questions have been asked and answered even quite recently, such as this one.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Ray, Chulett told me to switch the order of the stage variables, so i put it as
now i gave as
If DSLink2.deptno = Lastvalue then 1 else 0 = Isdup
DSLink2.deptno= Lastvalue
constraint : Isdup=0
i still not able to remove duplicate values? could you please help? to remove the duplicate values, the comparision is always from current variable to previous variable, but, for the first current variable, what will be the previous variable?
now i gave as
If DSLink2.deptno = Lastvalue then 1 else 0 = Isdup
DSLink2.deptno= Lastvalue
constraint : Isdup=0
i still not able to remove duplicate values? could you please help? to remove the duplicate values, the comparision is always from current variable to previous variable, but, for the first current variable, what will be the previous variable?