Funnel and Merge Stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 14
- Joined: Wed May 01, 2013 1:06 pm
Funnel and Merge Stage
Can anyone please explain Why Funnel and Why not Merge stage to combine several files?
Thanks & Regards,
Gokula Krishnan
Gokula Krishnan
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
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