Hello All, Good Morning.
Currently I am developing a solution and need your suggestions for this business rule. My Input data is,
INV_ID|TYPE|C_ACC_NO|I_ACC_NO
262894733|INVOICE|<NULL>|I80501
262894733|CUSTOMER|40458|<NULL>
262889640|CUSTOMER|48909|<NULL>
262890100|INVOICE|<NULL>|K7856
262890101|CUSTOMER|34890|<NULL>
262890101|INVOICE|<NULL>|J5674
.
.
.
From above input, my output should be
INV_ID|C_ACC_NO|I_ACC_NO
262894733|40458|I80501
262889640|48909|<NULL>
262890100|<NULL>|K7856
262890101|34890|J5674
From above, my source Input is Hashed file keys are INV_ID, TYPE. My target load file keys are only INV_ID. I did sort before processing data into active stage (Transformer stage) and used five stage variables as mentioned in previous solutions in this website but here the output format is different than the existing solutions in this forum. Please suggest me how to proceed. Thanks for your reply in advance.
-Venkat
Pivoting but not sure vertical/horizontal
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 38
- Joined: Sat Jan 17, 2004 12:29 am
- Location: Hamburg, Germany
This looks more like a simple aggregate than a pivot. You have four different unique INV_ID values across six different rows....it appears that you don't care about the value of TYPE..... Unless it is too early and I haven't had enough coffee, it just looks like you need to aggregate and take the maximum value for each of the other strings.
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>