Funnel and Merge Stage

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
dgokulakrishnan
Participant
Posts: 14
Joined: Wed May 01, 2013 1:06 pm

Funnel and Merge Stage

Post by dgokulakrishnan »

Can anyone please explain Why Funnel and Why not Merge stage to combine several files?
Thanks & Regards,

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

Post by ray.wurlod »

It depends what you mean by "combine". The analogies that you need are that the Funnel stage effects a UNION ALL of its input rows, while the parallel Merge stage effects a "master and updates" approach (which means that unmatched masters and unmatched updates may not make it into the result, depending on how you configure the stage).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

We used a funnel stage because we had multiple record types. Say you have a sequential file you want to output. It needs a header record and a trailing record. You can use a funnel stage that inputs all three as one column says 255 bytes. So you build your header record as one big string. Same on all your detail records. Then maybe the trailer wants total record count. You can build this and funnel all these together and output to one sequential file stage. Mike Stafford taught me this trick. Used to output 3 files then concatenate after job was over. This way is cleaner.
Mamu Kim
Post Reply