Hi,
I have a source file which contains duplicates in the data. I used this Derivation If Curr <> Prev Then 'Y' Else 'N' in the Stage variable and rejected the duplicate records to the sequential file which i want do it.
I tried the same logic in Parallel job but it's not working.
Why does this doesn,t work in Parllel transformer.
Removing Duplicates using stage variables in parallel job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Make sure records are sorted and partitioned by key field for your duplicate checking so that matching rows are adjacent to each other and on the same node in the transformer. Also assign stage variables in right order (Stage variables are processed in order)
svPrev = svCurr
svCurr = input.field
svDupeStatus = If svCurr = svPrev Then 'Y' Else 'N'
svPrev = svCurr
svCurr = input.field
svDupeStatus = If svCurr = svPrev Then 'Y' Else 'N'
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
Only the fairy god mother can tell why its not working. We can only guess, which is not good. JoshGeorge gave you a nice explanation. thompsonp added to it. We can only do so much sitting on this side of the screen.
A better way to do this is using the sort stage. Search the forum on the 'How to' part.
A better way to do this is using the sort stage. Search the forum on the 'How to' part.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: