optional union transformation in Informatica developer

Viewed 34

I want to conditionally union 2 csv files using the UNION transformation.

Depending on the input parameter, the mapping would do any of the following:

Union A and B Only A goes through the union transformation. B is ignored Only B goes through the union transformation. A is ignored

1 Answers

If i understand requirement correctly,

  • For condition 1, only TableA goes to target
  • For condition 2, only TableB goes to target

You can do this using FILTERS and UNION. Pls refer to below diagram. After reading form source you can attach two filters to filter data as per requirement. And then union them together before writing into target.
Filter A will have condition like - IIF(Condition1=True, True,false)
Filter B will have condition like - IIF(Condition2=True, True,false)
Pls note, i used IIF so you can write your own complex expression if you want. Whole mapping should look like this -

Source Qualifier A --> FilterA -->
                                   | UNION --> Target
Source Qualifier B --> FilterB -->
Related