I have three tables (Oracle source), lets call them tables 1, 2, and 3.
I would like to check a boolean field in table 1, and if it is T I want only data from table 2, and if it is F, I want only table 3.
Which transformation would be the most efficient for doing so, and how would I go about implementing it?
I’m experimenting with the Filter, Java, and Expression transformations, but if the expressions are checking on a row-by-row basis, then it seems like overkill for the expression to run on every row instead of just checking once and using the appropriate table.
Both tables 2 and 3 have a field with the same name, and I want that field for just one of the tables, based on the condition.
Create a mapping similar to the following diagram:
and use the following
Source Filterconditions* in the source qualifiers:There are two source tables in the mapping and the union transformation merges data from these two pipelines. However, because of the filtering conditions at any given time data will be retrieved only from one of the source tables.
*
Source Filteris an attribute on the Properties tab of a source qualifier. The condition you set here is appended to theWHEREclause of theSELECTstatement that is sent to the database.