Page 1 of 1

Find count Each department Number.

Posted: Fri Jan 31, 2014 3:13 am
by vijayasarathi7
Hi All,

I have a job, I want the count of the Each department number.
Source File:
DEPTNO, SAL
10, 1000
10, 1100
10, 1200
20, 1100
20, 1200
30, 1200
30, 1300
30, 1400

Target File:
Count
1
2
3
1
2
1
2
3


Thanks,
Vijayasarathi

Posted: Fri Jan 31, 2014 4:31 am
by ray.wurlod
Why "without using Aggregator"?

This can be done simply using key change detection techniques and stage variables, as has been discussed many times on DSXchange.

Posted: Fri Jan 31, 2014 4:42 am
by RPhani
Hi,

You can get the required o/p by If -Then- Else with KeyChangeColumn(1 and 0) and StageVariables.

----------------------------
RPhani

Posted: Fri Jan 31, 2014 8:45 am
by rkashyap
I would imagine that you will also need DEPTNO in the Target File for the output to be useful.

Posted: Thu Feb 06, 2014 7:17 am
by priyadarshikunal
interview question?