How to get 10% records out of Aggregator Stage.

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
pradeep5
Participant
Posts: 9
Joined: Mon Jun 29, 2009 1:46 pm

How to get 10% records out of Aggregator Stage.

Post by pradeep5 »

I have a file with 100 records and out of those records I need to get 10% of records in file 1 and 90% of records in file 2. Please advise me on how to achieve this.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If it doesn't matter which records go where, I'd look into the MOD function based on the record number... which you can generate if needed. Mod by 10 and assign any one of the remainder values to the 10% link and the other nine to the 90% link.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pradeep5
Participant
Posts: 9
Joined: Mon Jun 29, 2009 1:46 pm

Post by pradeep5 »

Thanks Craig for the info.
Post Reply