Scenario: Reading and matching the keys and the values of different .properties files and outputting the results in a glossary - 6.1

Talend Components Reference Guide

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 four-component Job reads two .properties files, one in French and the other in English. The data in the two input files is mapped to output a glossary matching the English and French terms.

The two input files used in this scenario hold localization strings for the tMysqlInput component in Talend Studio.

Dropping and linking the components

  1. Drop the following components from the Palette onto the design workspace: tFileInputProperties (x2), tMap, and tLogRow.

  2. Connect the component together using Row > Main links. The second properties file, FR, is used as a lookup flow.

Configuring the components

  1. Double-click the first tFileInputProperties component to open its Basic settings view and define its properties.

  2. In the File Format field, select your file format.

  3. In the File Name field, click the three-dot button and browse to the input .properties file you want to use.

  4. Do the same with the second tFileInputProperties and browse to the French .properties file this time.

  5. Double-click the tMap component to open the tMap editor.

  6. Select all columns from the English_terms table and drop them to the output table.

    Select the key column from the English_terms table and drop it to the key column in the French_terms table.

  7. In the glossary table in the lower right corner of the tMap editor, rename the value field to EN because it will hold the values of the English file.

  8. Click the plus button to add a line to the glossary table and rename it to FR.

  9. In the Length field, set the maximum length to 255.

  10. In the upper left corner of the tMap editor, select the value column in the English_terms table and drop it to the FR column in the French_terms table. When done, click OK to validate your changes and close the map editor and propagate the changes to the next component.

Saving and executing the Job

  1. Press Ctrl+S to save your Job.

  2. Press F6 or click the Run button from the Run tab to execute it.

The glossary displays on the console listing three columns holding: the key name in the first column, the English term in the second, and the corresponding French term in the third.