Filtering input rows
Often, rows can be filtered out of a flow because they do not fulfill the required criteria for processing. This example shows how this can be achieved within the tMap
component, so as to avoid costly join logic.
Tip
Note that you should not concern yourself too much with the complexity of tMap
in this recipe; rather you should concentrate on the filters. Joining is covered in later recipes in this chapter.
Getting ready
Open the job jo_cook_ch04_0050_tMapInputFilter
.
How to do it...
Run the job. You will see that there are many records read from
orderItemFile
and all are being output.Kill the job and view the output. You will see many order items being displayed, all of which are duplicates. These are the ones we will need to remove.
-
Open
tMap
and click the Activate/unactivate expression button for the customer input table. Add the filter expression
customer.customerId
==
2
||
customer.customerId
==
3
into the input expression filter, as shown in the following screenshot...