Hi All
I am getting a problem while doing the aggregating .
My Input is :
User_ID|Level1|Level2|Level3|Level4
1|A|||
1||B||
1|||C|
1||||D
2|H|||
2||G||
2|||F|
2||||E
My Output Should be :
User_ID|Level1|Level2|Level3|Level4
1|A|B|C|D
2|H|G|F|E
I am using Aggregator , but the actual output is :
User_ID|Level1|Level2|Level3|Level4
1|0|0|0|0
2|0|0|0|0
I have tried with SUM and MAX function aggregator , I am getting the above output .and getting following error .
Implicit conversion from source type "string[max=2]" to result type "dfloat": Converting string to number.
The same logic was working fine in Server by Using FIRST or LAST fucntion in aggregator stage .
Pls suggest how to use First(server ) function in PX to get the expected output.
Thanks In Advance
Kiran
Problem with Aggregator
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 25
- Joined: Fri Jan 11, 2008 12:49 am
- Location: Pune, India
-
- Participant
- Posts: 25
- Joined: Fri Jan 11, 2008 12:49 am
- Location: Pune, India
I think that the Aggregator may not work in this case because of the data type. DS Gurus,correct me if I am wrong.
You can try this approach:
Pass the input file to a transformer and get the output as
1|A
1|B
1|C
1|D
by applying some logic in the transformer.
Then pass it to a Pivot stage to get it in a single row.
You can try this approach:
Pass the input file to a transformer and get the output as
1|A
1|B
1|C
1|D
by applying some logic in the transformer.
Then pass it to a Pivot stage to get it in a single row.