Aggregation Unknown Failure

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
ippie02
Participant
Posts: 14
Joined: Tue Aug 16, 2005 2:13 pm

Aggregation Unknown Failure

Post by ippie02 »

I am trying to perform an aggregation of a 2M record flat file and fail everytime around the 1.5M mark with an unknown error:

"Abnormal termination of stage srcDmSalesRepCanvPerfFDeltaTrAgg..Aggregate_Metrics detected"

I added a pre-exec sort which helped me go from 1.2M to 1.5 but when I added the sort order in the aggregator, it failed on this error

"srcDmSalesRepCanvPerfFDeltaTrAgg..Aggregate_Metrics: Row out of sequence
At row 60, link "toTempSrc"
Row out of sequence"

Now I group by the first 6 fields and do a combination of max() and sum() for my last 40 columns.

I have validated that the source file is not corrupted and fields are all ok. Is this a performance issue? What steps should I take to resolve this issue?

thank you
<h3>Consulting</h3>
If you're not part of the solution, There's good money to be made in prolonging the problem.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Aggregation Unknown Failure

Post by chulett »

ippie02 wrote:I added a pre-exec sort which helped me go from 1.2M to 1.5 but when I added the sort order in the aggregator, it failed on this error

"srcDmSalesRepCanvPerfFDeltaTrAgg..Aggregate_Metrics: Row out of sequence
At row 60, link "toTempSrc"
Row out of sequence"
This means the sort order you declared in the Aggregator doesn't match how you are actually sorting the file. Make sure they match and you'll be able to handle your volume.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ippie02
Participant
Posts: 14
Joined: Tue Aug 16, 2005 2:13 pm

Post by ippie02 »

Thx for the reply. I do believe they match...

pre-exec sort:



in the input, i specified my sort for the first 6 fields then group by the first 6 fields in the output

Code: Select all

sort  -k 1 -k 2 -k 3 -k 4 -k 5 -k 6  -T #tempDir#DM_SALES_REP_CANV_PERF_F_DELTA -o #sourceDir#DM_SALES_REP_CANV_PERF_F_DELTA/DM_SALES_REP_CANV_PERF_F.tr #sourceDir#DM_SALES_REP_CANV_PERF_F_DELTA/DM_SALES_REP_CANV_PERF_F.tr
input columns:

sorts ascending on rows 1 to 6

output columns:

group by checked for first 6 fields
[/img][/code]
<h3>Consulting</h3>
If you're not part of the solution, There's good money to be made in prolonging the problem.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If they matched, you wouldn't get that particular error. :wink:

Presorting is pretty much the only way to have the Aggregator support that volume. It allows it to push rows through at each group change, rather than having to hold onto them all before outputting anything.

It can be tough to track down issues like this. Try looking at the sorted input file at the line it mentioned and see if you can tell where the sorting goes awry. It could be something like doing string sorts (which is the default) on numeric fields that you haven't zero padded to the same length. At least one of your fields isn't 'ascending' properly.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Your issue is probably that the keys need the "n" to force numeric as Craig mentioned. They will left justify instead of right justify sort. "sort -k 1,1n 2,2n" would sort fields 1 and 2 numerically.
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