Configuring mappings and executing the Job - 8.0

Talend Data Integration Getting Started Guide

Version
8.0
Language
English
Operating system
Data Integration
Product
Talend Data Integration
Module
Talend Administration Center
Talend Installer
Talend Runtime
Talend Studio
Content
Design and Development
Installation and Upgrade
Last publication date
2024-04-15

The procedure below shows how to configure mappings and an inner join to output movies information with valid director IDs.

Procedure

  1. Double-click the tMap component to open the map editor.

    The map editor shows three tables, named row1, row2 and Valid_movies in this example, corresponding respectively to the movies file schema, the directors file schema, and the schema of the output for valid movies information, and columns in the row1 table are already mapped to the columns in the Valid_movies table.

  2. Select the directorID column in the row1 table, and drop it onto the directorID column in the row2 table to create a join between the two input data sets based on the director IDs.
  3. Click the tMap settings button, then click Value field for Join Model, and then click the [...] button that appears to open the Options dialog box. In the dialog box, select Inner Join and click OK to define the join as an inner join.

    With this setting, only the movie records with the director IDs matching with those in the reference file will be passed to the output.

  4. In the Schema editor at the bottom of the map editor, select directorID column of the output schema, Valid_movies in this example, and click the X button to remove it.
  5. Click the [+] button beneath the output table to add a new column, name it directedBy, set its length to 20, and move it up so that it's between the title and releaseYear columns.
  6. Select the directorName column in the row2 table, and drop it to the Expression field corresponding to the directedBy column in the output table.

    A new mapping is created between lookup table and the output table.

  7. Click OK to validate the mappings and close the map editor, and click Yes when asked whether to propagate the changes.

    The mapping configurations are saved and the output schema is synchronized to the output component tLogRow.

  8. Press F6 or click the Run button on the Run view to execute your Job.

Results

Only movie records with valid director information are displayed on the Run console.