Page 1 of 1

Case statement in Aggregator stage

Posted: Mon Jun 25, 2012 1:02 pm
by vishu19aug
Hi,

I need to do the following Oracle functionality in Datastage -
sum(case when field1 = 'X' then 1 else 0) countx,
sum(case when field1 = 'Y' then 1 else 0) county

Is it possible to do this in aggregator stage or i need to put this logic in transformer stage before the aggregator.

Thanks,
Vishal

Posted: Mon Jun 25, 2012 1:05 pm
by chulett
Transformer before then sum in the Aggregator.

Posted: Mon Jun 25, 2012 5:05 pm
by ray.wurlod
Or do the summing in the Transformer itself.

Posted: Tue Jun 26, 2012 1:24 am
by zulfi123786
ray.wurlod wrote:Or do the summing in the Transformer itself.
summations in transformer Vs summations in aggregator

Could you please highlight the performance trade off amongst the two choices ?

Posted: Tue Jun 26, 2012 4:11 am
by ray.wurlod
No idea. Define what you understand by "performance" in an ETL context.

Posted: Tue Jun 26, 2012 7:12 am
by zulfi123786
Performance - Faster computation with least resources consumed :D

Posted: Tue Jun 26, 2012 5:05 pm
by ray.wurlod
In that case, try both while monitoring or gathering performance statistics.