Seperate dupes using one transfomer

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
krisp321
Participant
Posts: 39
Joined: Thu Mar 04, 2010 12:39 am

Seperate dupes using one transfomer

Post by krisp321 »

Hi
I have a question

I want to seperate all dupes into one file and without duples into other file only just by using transformer. Can we do that. We can seperate duplicates using two stage variables which is easy but in this case I have a diff. requirement
Let us take an example

Input OutFile1 OutFile2
A A A
A B A
A C B
B D D
B E D
C
D
D
D
E

This can be done easily with two stage variables
But my requirement is

Input OutFile1 OutFile2
A A C
A A E
A A
B B
B B
C D
D D
D D
D
E

Can we achieve this using only one transformer and any number of stage variables?

Thanks in advance
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

Why do you want to achieve this using only one transformer?

Regards
Sreeni
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Start by describing, in English, the algorithm that gets from the input to the output. For example, how does A A C come about?

Then answer the "why" question. This would be much more easily accomplished using two Transformer stages, it seems to me.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
krisp321
Participant
Posts: 39
Joined: Thu Mar 04, 2010 12:39 am

Post by krisp321 »

Sreenivasulu wrote:Why do you want to achieve this using only one transformer?
Using Transformer and Lookup stage we can achieve this, but I have this requirement multiple times for a particular accounting. So, I was trying to reduce the number of stages rather than whole bunch of stages using again and again.

Just wondering if that is possible, from my end i tried but i couldnt figure out. So, just looking for any possibility from here.
Post Reply