O'Reilly logo

Talend Open Studio Cookbook by Rick Barton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Checking a column against a list of allowed values

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.

Getting ready

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.

How to do it…

  1. Open tMap and click the expression builder button (…), and add the test criteria, as shown in the following screenshot:
    How to do it…
  2. Run the job and you should see that one of the rows is rejected.

How it works…

The tMap conditions are the same as Java conditions, so the symbol || (pipe pipe) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required