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.
Take the same Job as in Scenario 4: Advanced mapping using filters, explicit joins and rejections.
Drop a new tFileOutputDelimited component from the Palette on the design workspace, and name it Rejects_BMW_Mercedes to present its functionality.
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.
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.
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.
Remove the Expr. key filter ("BMW") from the Cars table in the input area.
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")
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.
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.
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.
Click OK to validate the mappings and close the Map Editor.
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.