Skip to main content Skip to complementary content

Advanced mapping with filters and different rejections

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

Procedure

  1. Take the same Job as in 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

Procedure

  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

Procedure

  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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!