Grouping data

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

devsonali
Premium Member
Premium Member
Posts: 155
Joined: Sun Mar 18, 2007 2:31 pm

Post by devsonali »

I think aggregator can only be used when we have standard values for example
if we are expecting all 1 s and 0 s as data values for these columns then i think its pretty straight forward (as you and others have mentioned ) but the if we get values like 'abc' , 'def' so on and so forth then I am guessing the stage variables and retaining the last row of the group logic (provided by james would work ) .

I tested both ways successfully but I am assuming using stage variables will be "best value" as you mentioned James.

Thanks all . I am marking this issue as resolved.
Last edited by devsonali on Thu Jan 10, 2013 1:27 pm, edited 1 time in total.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

So long as you understand that the approach I was suggesting is simply aimed at keeping a best or desired value, when present, over all others in the key group. That's what my use of the term "best value" means in this example.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I would aim for the most straight-forward approach that fits the requirements. If all you need is the Aggregator, use it. If you need to accomodate other values, then take a more 'complex' approach.
-craig

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