Creating a filter using a validation rule - 7.3

Talend Data Mapper Functions Reference Guide

Version
7.3
Language
English
Product
Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Design and Development > Designing Jobs
Last publication date
2023-01-05

Use a ValidateGroup function to filter out rows containing an invalid element.

In this example, create a filter to display only the employee in the Denver location.

Procedure

  1. Select the row (0:*) element from the Input (XML) table and open the Validate tab.
  2. From the Functions tab, select ValidateGroup and drop it in the Validate tab.
  3. Double-click on ValidateGroup.
    1. Enter TEST in the Message field.
    2. Enter a number, for example, 11.
  4. In the Data section, drag-and-drop the input element that you want to validate. In this example, use Location.
  5. Select Location from the Input (XML) table and open the Validate tab.
  6. Insert a validation function that returns a Boolean. In this example, select the Contains function from the Functions palette.
  7. Double-click Contains and enter Denver.
  8. Drag-and-drop the Location element from the Input (XML) table in the Input Value section.
  9. Select the row (0:*) element from the Output (XML) tab.
  10. In the SimpleLoop, add the IsValid function in Filter section.
  11. Click Test Run to display the employee in Denver.