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

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
ds_debasis
Participant
Posts: 17
Joined: Fri May 25, 2007 11:59 am

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

Post 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]
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply