Often it is necessary to ensure that a column contains only values as defined in a list. This recipe shows how this can be achieved using a tMap
expression.
Open the job jo_cook_ch03_0040_tMapValuesInList
. You will notice that the job is very similar to the previous recipe Rejecting rows using tMap.
Open
tMap
and click the expression builder button (…), and add the test criteria, as shown in the following screenshot:Run the job and you should see that one of the rows is rejected.
The tMap conditions are the same as Java conditions, so the symbol || (pipe pipe) is a logical OR.
Thus, the condition checks for the value being UK or USA or France.