how to use max function in transformer without 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
monaz
Participant
Posts: 98
Joined: Sat Aug 23, 2008 3:14 am

how to use max function in transformer without aggregator

Post by monaz »

Hi can anyone guide me how to use max function in the stage variable of the transformer.

I dont want to use aggregator for this i wanted to know is it possible to implement in the transformer stage

example:-if input is
1 m
1 m
1 o
1n

Output i am loking for
1 mmon
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Nowhere in what you have described is there any need for any kind of Max() function. You are performing a vertical pivot.

It is possible to implement what you have described in Transformer stage (ideally with an upstream Sort stage generating a Key Change column and a downstream Remove Duplicates stage.
Last edited by ray.wurlod on Thu Apr 23, 2009 1:28 am, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Pagadrai
Participant
Posts: 111
Joined: Fri Dec 31, 2004 1:16 am
Location: Chennai

Re: how to use max function in transformer without aggregato

Post by Pagadrai »

Hi,
Is there any specific reason why you dont want to use aggregator stage?

You can defnitely use a transfomer stage to find out the max value.
But the data must be sorted before and sent to the transfomer in a sequential order.
There are some resolved posts where similar logic has been discussed.

Try and let us know.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted, the example shows a need for a pivot, not a max() or any kind of aggregation. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply