Scenario: Adding a surrogate key to a file - 6.1

Talend Components Reference Guide

EnrichVersion
6.1
EnrichProdName
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
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

This scenario describes a Job adding a surrogate key to a delimited file schema.

Setting up the Job

  1. Drop the following components: tFileInputDelimited, tAddCRCRow and tLogRow.

  2. Connect them using a Main row connection.

Configuring the input component

  1. In the tFileInputDelimited Component view, set the File Name path and all related properties in case these are not stored in the Repository.

  2. Create the schema through the Edit Schema button, if the schema is not stored already in the Repository. Remember to set the data type column and for more information on the Date pattern to be filled in, visit http://docs.oracle.com/javase/6/docs/api/index.html.

Configuring the tAddCRCRow component

  1. In the tAddCRCRow Component view, select the check boxes of the input flow columns to be used to calculate the CRC.

    Notice that a CRC column (read-only) has been added at the end of the schema.

  2. Select CRC32 as CRC Type to get a longer surrogate key.

  3. In the Basic settings view of tLogRow, select the Print values in cells of a table option to display the output data in a table on the Console.

Job execution

Then save your Job and press F6 to execute it.

An additional CRC Column has been added to the schema calculated on all previously selected columns (in this case all columns of the schema).