Page 1 of 1

count of columns

Posted: Tue Jun 29, 2010 5:07 am
by seenusr2000
I am very new to datastage Please help in:
I have input columns
Empno,Ename,sal
10 ,aaaa,15000
10,bbbbb,20000
10,ccccc.250000
20,xxxxx,30000
20,yyyyy,24000
20,zzzz,26000

I want out put columns like
Empno,Emane,sal(total), Empno(count)
10,aaaaa,bbbbb,cccccc,60000, 3
20,xxxxx,yyyyy,zzzz,80000,3
for that what stages I have to use ? How to do that one?
Thank you.

Posted: Tue Jun 29, 2010 5:36 am
by antonyraj.deva
Hi Srinivas,

In the source data "Empno" means Employee Number as per my guess and normally Empno is unique identifier of the Employee and "Ename" would be same for a "Empno".

List down your requirements one by one and then a job design can be worked out.

Posted: Tue Jun 29, 2010 6:56 am
by chulett
So, a count of rows rather than columns. As noted, can you spell your requirements out in words for us? That will help you (and us) get to a proper solution.

Smells like a pivot with some aggregation in one column. Trivial in a Server job, btw.

Posted: Tue Jun 29, 2010 4:28 pm
by ray.wurlod
This requires a classic fork-join design.