Page 1 of 1

Aggregator state --count on two columns

Posted: Mon Dec 23, 2013 1:29 pm
by hsahay
Hi ,

please help me how to achive this using Aggregator state

CLAIM_ID CLAIM_LINE_ID
1000 1
2000 1
2000 2

I need to get COUNT(DISTINCT CLAIM_ID) AND COUNT(CLAIM_LINE_ID) using Aggregator state

CLAIM_ID_COUNT CLAIM_LINE_ID_COUNT
2 3


Thanks in advance

Posted: Mon Dec 23, 2013 1:35 pm
by ray.wurlod
Add an artificial grouping column that has a constant value.

Posted: Thu Dec 26, 2013 9:54 am
by hsahay
thansk Ray for the replay..i Need more clarification (what are all stages and functions i need to use )

need apply aggregration on 3 columns.

Group_id is same for all rows...need distinct count of CLAIM_ID, count of CLAIM_LINE_ID and sum of amount

here is smaple data
GROUP_ID CLAIM_ID CLAIM_LINE_ID AMOUNT
1 1000 1 10
1 2000 1 20
1 2000 2 10


OUTPUT REQUIRED

GROUP_ID CLAIM_ID_COUNT CLAIM_LINE_ID_COUNT TOTAL AMOUNT
1 2 3 40



Thanks in adavnce