Round Robin collection

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
lkganta
Participant
Posts: 21
Joined: Wed Feb 08, 2006 4:10 pm

Round Robin collection

Post 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.
lkganta
Participant
Posts: 21
Joined: Wed Feb 08, 2006 4:10 pm

Post by lkganta »

can some one help me here?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply