How to funnel multiple links into single output link ?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
coehcl
Charter Member
Charter Member
Posts: 16
Joined: Tue Oct 10, 2006 8:42 am

How to funnel multiple links into single output link ?

Post by coehcl »

Hi,
I have a transformer which provides 5 output links each having the same metadata.
I need to horinatally join all the records into a single link. Basically i am trying to achieve the funnel stage functionality of PX flavour,

I tried
TRANFORMER ===> Link Collector ==> Seq. File
, but obviously it will not work as both are active stage.

Could some one give me a pointer on this,

Warm Regards,
Coehcl
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Check this reply by Ray.Wurlod from a previous post :

Code: Select all

The Link Collector stage creates a process of its own; therefore to communicate with other active stages some form of inter-process communication mechanism is required - inter-process row buffering must be enabled (which is made very clear in the manual). If you want visibility of the buffering, you can add Inter Process Communication (IPC) stages to the job design. 
IHTH
sAM
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
coehcl
Charter Member
Charter Member
Posts: 16
Joined: Tue Oct 10, 2006 8:42 am

Post by coehcl »

Hi,
Thanks for the response.
But IPC does cannot take more than 1 input,
hence
TXF ==>(Cannot take more than 1 Input) IPC ==> Link Collector ==> Seq. File
will not work,

Any other suggestion pls.

Thanks
rejith.ry
Participant
Posts: 21
Joined: Thu Jun 08, 2006 3:37 am

Post by rejith.ry »

Use hash files before ans after the link collector. Use one hash file/per each input & output link of link collector.
Rejith R
coehcl
Charter Member
Charter Member
Posts: 16
Joined: Tue Oct 10, 2006 8:42 am

Post by coehcl »

Hi Rejith, Thanks for your thoughts, I am not sure if it will work, but I feel that the usage of hashfile (which is gonna occupy physical memory) for this scenario is not an apt and optimal solution,

can't we derive the output on the fly ??
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Five IPC stages. But these also take physical memory (for the buffers). Why can't your design take physical memory?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
coehcl
Charter Member
Charter Member
Posts: 16
Joined: Tue Oct 10, 2006 8:42 am

Post by coehcl »

We have these jobs for almost 40 countries(hence 40 jobs/module, we have number of modules and design is generic) and considering the volume of records, i personally felt that its better we have a design which occupies less phyical space, please correct me if i am wrong in my thoughts. Even though we can purge these hash files, the house keeping activity becomes an over head.

Thanks for the response.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There will always be an overhead. You cannot process large (or even small) volumes of data without demanding some resources to do so.
Simple economics.

Try a number of techniques, benchmark and measure them in your environment, and make your choice based upon those results.

"There ain't no such thing as a free lunch."
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'd be curious what 'house keeping' you are worried about. And if you really were worried about hashed files, they can be easily purged automagically - heck, you could even make that the trailing end of your job stream if you so desired.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You can also load the 5 links into 5 different flat files and in an after job subroutine, cat them all together.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

More house keeping. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
coehcl
Charter Member
Charter Member
Posts: 16
Joined: Tue Oct 10, 2006 8:42 am

Post by coehcl »

Thank You everyone for your expert suggestions,

I am closing this thread with the below solution as the optimal one,
TXF (5 o/p links)==>5 IPC ==> Link Collector ==> Seq. File TXF
Warm regards,
Post Reply