Scenario 5: Advanced mapping with filters and different rejections - 6.1

Talend Components Reference Guide

English (United States)
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
Talend Studio
Data Governance
Data Quality and Preparation
Design and Development

This scenario is a modified version of the preceding scenario. It describes a Job that applies filters to limit the search to BMW and Mercedes owners who have two to six children and divides unmatched data into different reject output flows.

Linking the components

  1. Take the same Job as in Scenario 4: Advanced mapping using filters, explicit joins and rejections.

  2. Drop a new tFileOutputDelimited component from the Palette on the design workspace, and name it Rejects_BMW_Mercedes to present its functionality.

  3. Connect the tMap component to the new output component using a Row connection and label the connection according to the functionality of the output component.

    This connection label will appear as the name of the new output table in the Map Editor.

  4. Relabel the existing output connections and output components to reflect their functionality.

    The existing output tables in the Map Editor will be automatically renamed according to the connection labels. In this example, relabel the existing output connections BMW_Mercedes_withChildren and Owners_Other_Makes respectively.

Configuring the components

  1. Double-click the tMap component to launch the Map Editor to change the mappings and the filters.

    Note that the output area contains a new, empty output table named Rejects_BMW_Mercedes. You can adjust the position of the table by selecting it and clicking the Up or Down arrow button at the top of the output area.

  2. Remove the Expr. key filter ("BMW") from the Cars table in the input area.

  3. Click the Filters button to display the Filter field, and type in a new filter to limit the search to BMW or Mercedes car makes. The statement reads as follows: Cars.Make.equals("BMW") || Cars.Make.equals("Mercedes")

  4. Select all the columns of the main output table and drop them down to the new output table.

    Alternatively, you can also drag the corresponding columns from the relevant input tables to the new output table.

  5. Click the tMap settings button at the top of the new output table and set Catch output reject to true to collect data about BMW and Mercedes owners who have less than two or more than six children.

  6. In the Owners_Other_Makes table, set Catch lookup inner join reject to true to collect data about owners of other car makes and owners for whom the reseller information is not found.

  7. Click OK to validate the mappings and close the Map Editor.

  8. Define the properties of the output components in their respective Basic settings view.

    In this use case, simple specify the output file paths and select the Include Header check box, and leave the other parameters as they are.

Executing the Job

  1. Press Ctrl + S to save the Job.

  2. Press F6 to run it.

    The output files contain content of the main output flow shows that the filtered rows have correctly been passed on.

    For examples of how to use dynamic schemas with tMap, see: