hi, can any one give me some idea how to get the below output.
Input
Name,Sal,Month
Hari,2000,Jan
Hari,1000,March
Gokul,3000,Jan
Ganesh,4000,Feb
Jagadish,5000,Jan
Jagadish,6000,Feb
Output
Name, Jan , Feb, March
Hari, 2000, 0 , 1000
Gokul, 3000, 0 , 0
Ganesh , 0 ,4000, 0
Jagadish, 5000,6000, 0
how to transform the given input to output format
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 8
- Joined: Mon Jun 18, 2007 11:08 pm
- Location: chennai
use your pivot
use your pivot stage
-
- Participant
- Posts: 8
- Joined: Mon Jun 18, 2007 11:08 pm
- Location: chennai
Won't work as the Pivot stage does 'Columns to Rows'. I'd use a hashed file here, keyed by Name where you read and write to it in the same transformer. The first 'miss' gets the whole record written out with two of the three fields set to zero. Each 'hit' after that updates whatever month you are processing.
Afterwards, source from the hashed file to get the final results.
Afterwards, source from the hashed file to get the final results.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers