Page 1 of 1

hai

Posted: Tue Aug 21, 2007 12:33 am
by mah
Hai

How can i remove duplicates using STAGE Variables in Transformer?

Posted: Tue Aug 21, 2007 1:30 am
by ArndW
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'

Posted: Tue Aug 21, 2007 1:49 am
by ray.wurlod
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.

Posted: Tue Aug 21, 2007 1:55 am
by ArndW
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.

Posted: Tue Aug 21, 2007 2:05 am
by balajisr
Try right-mouse click on the stage variable, then choose 'delete'
:lol:

Posted: Tue Aug 21, 2007 2:35 am
by ray.wurlod
But just a tad unreasonable for someone with a post count of 1 (at the time).

Posted: Tue Aug 21, 2007 4:14 pm
by ArndW
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

Posted: Tue Aug 21, 2007 7:02 pm
by JoshGeorge
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'