Aggregator - doubt

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
raj_cipher
Participant
Posts: 90
Joined: Mon Dec 08, 2003 4:48 am
Location: Chennai

Aggregator - doubt

Post by raj_cipher »

Hi,

I am using an aggregator in my job.The no. of fields is around 200.
I want to do a aggrgate funtion(Last) on some 10 fields.But DS expects all fields need to be done atleast one aggregate function.Since more number of aggregators are to be followed,making every field an aggregator function is too cubersome.Any other means to avoid this problem?

I tried XML export/import.It works but still i need to give field names in the tag.So this process is also cubersome.

Any way for my pblm. ?
Think Ahead,
Raj.D
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Hi Raj,

the Aggregator is like his name tells us for aggregating. If you don't want to aggregate: don't use the aggregator!!!

In a Datebase you cannot use the group by without telling to all fields in the output how they shall be delt.

So don't blame DS and its Aggregator.

Buy a SQL book and learn about the group by and when you are fit in this basics you can start reading the DS Aggregator manual and then you may have learnt your lessons.

Wolfgang
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Columns, during aggregation, either are group-by columns or have an aggregate function. If your data looks like this:

Code: Select all

x 1 2 3 4
x 1 2 3 4
x 1 2 3 4
And you group by the first column, sum the second, and pass thru the third and fourth, you are in effect using the LAST value for the third and fourth. So, your issue doesn't matter. If you're not GROUPING BY it, you have to decide if you want first, last, whatever.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply