After the joiner you can add a router transformation in which you can add 2 groups.
Group1: Key2 is null
Group2: Key2 is not null
The ports of F1 should be dragged from Group1 to next router where you join with T1
The required ports of F1 F2 should be connected to next transformation depending on your further requirements.
Hope this helps.
The idea is to bring resultant outcome of both the sets of data to one common tranformation (like union) -> and from there we have to implement
- return all matching rows in F1 and F2
- the remaining unmatched rows of F1 should be joined with Table T1
- Finally the resultant outcome of the above 2 sets should be routed to one common tranformation (like union) -> and from there we have one common logic.
1) I have used joiner transf. to bring matching rows in F1 and F2 ->
2) used filter transf. with cond. to identify all unmatched rows of F1 with cond. Key2 is null ->
3) used joiner transf. to link table T1 with the records that were indetified as part of filter ->
4) The result identified as part of step1 and step3 are routed to Union
THere is an issue when we merge data using union transf. as we bringing data based on join type "Detail outer join" (due to which the data seem to get duplicated). How to get rid of this issue?
Are you sure you don't have any duplicates in the sources?
Especially the flat files could be investigated for it but also the table T1 if there isn't a primary key defined on it.