Page 1 of 1

Generating a control report with more than 2-3 group by calc

Posted: Wed Jul 11, 2007 11:47 am
by ds_debasis
Hi
I've to generate a control report using DS 7.5.1. There are 6 col (1-6 suppose). The report should have :
Group by
1) col1
and
2) (if col2=-999 than catagory1 else if col2=-998 catagory2 else catagory3 (there are lot more value for this column).
Problem: how to categorize this.
Solution : I'm using a Trans. stage and inserting a column which I'm assigning 'A' for -999 'B' for -998 and 'C' for rest all values. so that I can group by on the new column added in the trans. ( any better idea suggest)


Report output needed :
1) number of unique records in col 3 ( it has contains repeated records for the group )
2) Number of records encountered in each group
3) subtotal and grand total of Col 5 and col6.

Resolutions: I'm trying to use 3 different aggregator stage and then merge them into one file using inner join. ( Not Sure is it the right approach or not). Please help me if any batter idea which improve performance.

Thanks & Regards
debasis
[/i][/b]

Posted: Wed Jul 11, 2007 1:16 pm
by ray.wurlod
Does your approach work? Be happy. Moderate your expectations; to aggregate a large number of records (which is necessary in your requirement) takes system resources. About the only suggestion I have is to sort your data by the grouping columns and preserve that sorting with Sort stages specifying "don't sort (previously sorted)" between the Aggregator stages (which, of course, must use Sort rather than Hash as their aggregation method).