I have a request to remove some rows from a source. This source contains 3 columns : Id, Type, Value, and containes some data like :
Id Type Value
1 Master This is the first value
1 Second This is a new value
1 Third This is not a mandatory value
2 Master Another one
2 Third And again
3 Second A new hope
3 Third A third
4 Second A single value
...
The rule to keep row is :
If single row for one Id, get the existing value
Else : If multiple rows for same Id and 'Master' exists, get the 'Master' value
If multiple rows for same Id and 'Master' not exists and 'Second' exists, get the 'Second' value
If multiple rows for same Id and 'Master' not exist and 'Second' not exists and 'Third' exists, get the 'Third' value.
In my sample so, I would like to extract only :
Id Type Value
1 Master This is the first value
2 Master Another one
3 Second A new hope
4 Second A single value
I try split into 3 different sources and join or lookup, but not found any parameter to discard the duplicate row.
How I can do that ?
Thanks in advance, BR Xavier