For Every unique key column value, i need to get the 1st NotNull values of every column based upon the source priority.
SOURCE File:
Key Source Col1 Col2
2000 A NULL DEF
2000 B NULL NULL
2000 C XYZ NULL
2001 A PQR NULL
2001 C NULL RXB
2001 D OIO ABC
2002 A NULL NULL
2002 B IOP NULL
2002 C NULL NULL
2002 D KEF ABE
TARGET output like below.
2000 A XYZ DEF
2001 A PQR RXB
2002 A IOP ABE
Thanks
Vcamsgc
Rows into Columns
Moderators: chulett, rschirm, roy
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard.
This is most easily accomplished, once data have been sorted by the key, in a Transformer stage using stage variables to detect whether a non-null value has already been processed for the current key. As many rows are output as are input, into a Remove Duplicates stage that allows only the last row from each group to pass.
This is most easily accomplished, once data have been sorted by the key, in a Transformer stage using stage variables to detect whether a non-null value has already been processed for the current key. As many rows are output as are input, into a Remove Duplicates stage that allows only the last row from each group to pass.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod wrote:Welcome aboard.
This is most easily accomplished, once data have been sorted by the key, in a Transformer stage using stage variables to detect whether a non-null value has already been processed for the current key. As many rows are output as are input, into a Remove Duplicates stage that allows only the last row from each group to pass.
how to check not null values passed or not in particular column for group of key values?
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
