How to join two aggregator

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
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

How to join two aggregator

Post by kumar_s »

Hi,
I have 2 aggregator coming, each has a summed up column. i just need to add these two col value after finding abs.
eg: abs(DSLinkn.col)+abs(DSLinkn.col)
Can any one suggest me, what stage can be used to accomplish this.(without using much of resource like intermediate file stage....).
Since most of stage cant hadle 2 inputs.
Thanks in advance
-kumar
bchau
Charter Member
Charter Member
Posts: 46
Joined: Tue Jan 18, 2005 7:39 am
Location: Japan
Contact:

Post by bchau »

From my limited experience with EE, I think you have to use an intermediate stage. Using a lookup stage would be the faster as it loads the information in memory. Use the lookupstage to merge the two outputs from the aggregators so you have a record with 2 columns. Then fire the output of your lookup stage into a transformer where you can sum the two columns.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Try using join stage.
bchau
Charter Member
Charter Member
Posts: 46
Joined: Tue Jan 18, 2005 7:39 am
Location: Japan
Contact:

Post by bchau »

Isn't a lookup stage faster? Or is the difference negligible because it is only 1 record?
ashwin2912
Participant
Posts: 57
Joined: Wed Jan 26, 2005 10:22 pm
Location: India

Post by ashwin2912 »

What exactly are you aggregating on...if its on a same key value...then you can do it in 1 aggregator itself....then you can directly use a transformer stage for adding the 2 cols.

or if you are having both o/ps from aggregators of same format then use:

Code: Select all

agg1
	>funnel	>agg3
agg2
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Thanks to all,
Thanks ashwin, i used joiner and Transformer instead of funnel and agg3.
Post Reply