two streams into one??

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
Luk
Participant
Posts: 133
Joined: Thu Dec 02, 2004 8:35 am
Location: Poland
Contact:

two streams into one??

Post by Luk »

Hi!!

I have a question. How in DataStage server 7.5 can I make one data stream from few others streams??

For example: in one stream I have 100 rows and in another one 100 rows. Both streams have the same columns but different data. Both streams processing is parralel.
How can I make one stream with the same columns with (in this example) 200 rows??

Regards
LUK
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Luk,

this is what the MERGE stage does, it will merge your two data streams into one.
garthmac
Charter Member
Charter Member
Posts: 55
Joined: Tue Oct 21, 2003 9:17 am
Location: UK

Post by garthmac »

Hi Luk, you can use the link collector stage. This allows up to 64 inputs, and then outputs as one single stream of data.
Luk
Participant
Posts: 133
Joined: Thu Dec 02, 2004 8:35 am
Location: Poland
Contact:

Post by Luk »

this is what the MERGE stage does, it will merge your two data streams into one.
MERGE is making this with files NOT streams
am I wrong??
LUK
Luk
Participant
Posts: 133
Joined: Thu Dec 02, 2004 8:35 am
Location: Poland
Contact:

Post by Luk »

you can use the link collector stage. This allows up to 64 inputs, and then outputs as one single stream of data.
Link collector is working fine. Thanks.
I don't know why I did't see that :D
LUK
Luk
Participant
Posts: 133
Joined: Thu Dec 02, 2004 8:35 am
Location: Poland
Contact:

Post by Luk »

one more quick question!
what does derivation field in collector?? if you could give me some exemple it would be perfect :wink:
LUK
garthmac
Charter Member
Charter Member
Posts: 55
Joined: Tue Oct 21, 2003 9:17 am
Location: UK

Post by garthmac »

Hi Luk, It's possible to aggregate data in the derivation part of the output of the link collector.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
How about using a filter command that concatenates both files and gives you a single output link? (should be good if the files are not big, better then merge in any case).

using link collector will probably pose issues in this case.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Luk
Participant
Posts: 133
Joined: Thu Dec 02, 2004 8:35 am
Location: Poland
Contact:

Post by Luk »

Hi again!

I don't want merging two FILES but two data streams!!! Link collector does not support active inputs (for example from transformer stage)!!!
It works only when I'm merging data from files or database!

Is it posible to merge two streams without using files as buffers ??
LUK
garthmac
Charter Member
Charter Member
Posts: 55
Joined: Tue Oct 21, 2003 9:17 am
Location: UK

Post by garthmac »

It is actually possible to merge two streams without using files as buffers. I always use files to source and collect my data, but a quick read of the documentation tells me you can use inter process row buffering. You can find this option in the performance tab of the properties page to enable active to active links. Try this, and let us know how you get on.
Luk
Participant
Posts: 133
Joined: Thu Dec 02, 2004 8:35 am
Location: Poland
Contact:

Post by Luk »

thanks garthmac !!
It sounds reasonably! I try that and let you know.
LUK
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ArndW wrote:Luk,

this is what the MERGE stage does, it will merge your two data streams into one.
Just for the record, this is a PX answer. The confusion comes from having two stages, performing two different (yet somewhat similiar) functions, with the same name - MERGE.

The Merge in PX is similar to the Link Collector in Server, while the Merge in Server actually 'merges' two flat files by treating them like tables (behind the scenes) and allowing them to be 'joined' to create a single input source.
-craig

"You can never have too many knives" -- Logan Nine Fingers
garthmac
Charter Member
Charter Member
Posts: 55
Joined: Tue Oct 21, 2003 9:17 am
Location: UK

Post by garthmac »

Craig,

I have noticed that many people have experienced problems with the link collector stage, when enabling inter process row buffering (ds_ipcopen() - Error in open). Have you experienced issues with this method? My workaround was to not use any row buffering, instead I write data to multiple seq files as source, and output data to a seq file.

Luk, I wouldn't be surprised if you encounter this too!
Post Reply