Page 1 of 1

Round Robin collection

Posted: Wed Mar 31, 2010 7:27 am
by lkganta
Hi,
I am trying to implement the roundrobin collection from below datasets.

Dataset1
-----------
10
20
30
40

Dataset2
----------
AA
BB
CC
DD

Dataset3
------------
XX
YY
ZZ
PP

Expected OUTPUT
------------------
10
AA
XX
20
BB
YY
30
CC
ZZ
40
DD
PP

Can somebody help me to implement this with help of any stage with settings? I have tried it with funnel stage but I am getting some random collection output but not in the order. Should I need to set some thing ? Or go for any other stage ?

Thank you.

Posted: Wed Mar 31, 2010 9:46 am
by lkganta
can some one help me here?

Posted: Wed Mar 31, 2010 10:02 am
by ArndW
First of all, you need to constrain your run to 1 node. Then add a column to all three streams, using the algorithm "@INROWNUM*3+{n}" where {n} has a different value in each stream, 0, 1 or 2. Then use a sort funnel to get your ordering.

Posted: Wed Mar 31, 2010 4:02 pm
by ray.wurlod
Please advise what your actual output is. This may give some clue as to the cause of whatever problem you believe exists. Are you using (Auto) or explicitly "Round Robin" as your collection algorithm?

Posted: Thu Apr 01, 2010 7:33 am
by ArndW
I think the issue is that the funnel stage doesn't have round-robin collection, so one needs to perform that ordering oneself, thus my recommendation to compute the order algorithmically in the job.

Posted: Thu Apr 01, 2010 3:52 pm
by ray.wurlod
It would if running sequentially, but I meant to use the collector in a Sequential File stage. You don't really need the Funnel - which keeps each partition of data separate.

As they teach in the DataStage Essentials class, a Funnel is not the same as a collector.