count of columns

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
seenusr2000
Participant
Posts: 2
Joined: Fri Oct 10, 2008 3:39 am
Location: dsxchange
Contact:

count of columns

Post 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.
srinivasareddy
antonyraj.deva
Premium Member
Premium Member
Posts: 138
Joined: Wed Jul 16, 2008 9:51 pm
Location: Kolkata

Post 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.
TONY
ETL Manager
Infotrellis India

"Do what you can, with what you have, from where you are and to the best of your abilities."
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

This requires a classic fork-join design.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply