How can i use a Count Distinct in an Aggregator Stage??

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
avidal18
Participant
Posts: 10
Joined: Wed Apr 19, 2006 4:20 pm
Location: Mexico

How can i use a Count Distinct in an Aggregator Stage??

Post by avidal18 »

I have a problem i'm tring to use a count distinct in an aggregator stage but i don't know how, because it is not a option in this stage, is there any other way to do this?? thnx
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

From what I understand from your question, you need to GROUP BY on your key column and then COUNT the records. If, this is not what you are looking for, as per me, you need to post more details. Also, what is your source stage, is it a table or flat file.

HTH
Kris
Kris

Where's the "Any" key?-Homer Simpson
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

You can acheive this by inserting any dummy field with a value 1. And sum it up in the Aggregator for each group to get the distince count for each group.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply