Hai
How can i remove duplicates using STAGE Variables in Transformer?
hai
Wow - a double whammy. Perhaps one of the least informative subject lines ever used in DSXChange coupled with a posting in the wrong forum.
Try right-mouse click on the stage variable, then choose 'delete'
Try right-mouse click on the stage variable, then choose 'delete'
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I don't think the question was about removing stage variables: I think it was about removing duplicates using stage variables. Then again, it could have been about showing understanding in Japanese, who knows? As far as I am aware there are no such things as stage variables in TX.
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.
I figured that with an original question like that in this forum, I could afford to misinterpret his question so that the answer would be easy.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Ray - I missed that that it was the first post.
Mah - I'm sorry sorry about being so harsh, but the FAQs that are recommended reading plus many other posts from members here recommend using descriptive subject lines and posting in the appropriate forums. Plus, the use of the recommended search function would have shown very many threads describing how to do exactly what you are asking about.
p.s. a belated welcome to DSXchange
Mah - I'm sorry sorry about being so harsh, but the FAQs that are recommended reading plus many other posts from members here recommend using descriptive subject lines and posting in the appropriate forums. Plus, the use of the recommended search function would have shown very many threads describing how to do exactly what you are asking about.
p.s. a belated welcome to DSXchange
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Solution:
Make sure records are sorted and partitioned by key field/s 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'
Make sure records are sorted and partitioned by key field/s 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'
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>