August 17, 2023

tAddCRCRow – Docs for ESB 5.x

tAddCRCRow

tAddCRCRow.png

tAddCRCRow properties

Component family

Data Quality

 

Function

tAddCRCRow calculates a surrogate
key based on one or several columns and adds it to the defined
schema.

Purpose

Providing a unique ID helps improving the quality of processed
data.

Basic settings

Schema and Edit
Schema

A schema is a row description. it defines the number of fields to be processed and
passed on to the next component. The schema is either Built-in or stored remotely in the
Repository.

Since version 5.6, both the Built-In mode and the Repository mode are
available in any of the Talend solutions.

In this component, a new CRC column is automatically added.

 

 

Built-in: The schema will be
created and stored locally for this component only. Related topic:
see Talend Studio User Guide.

 

 

Repository: The schema already
exists and is stored in the Repository, hence can be reused in
various projects and Job designs. Related topic: see
Talend Studio User
Guide
.

 

Implication

Select the check box facing the relevant columns to be used for
the surrogate key checksum.

Advanced Settings

CRC type

Select a CRC type in the list. The longer the CRC, the least
overlap you will have.

 

tStat
Catcher
Statistics

Select this check box to collect log data at the component
level.

Global Variables

NB_LINE: the number of rows read by an input component or
transferred to an output component. This is an After variable and it returns an
integer.

ERROR_MESSAGE: the error message generated by the
component when an error occurs. This is an After variable and it returns a string. This
variable functions only if the Die on error check box is
cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable
functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl +
Space
to access the variable list and choose the variable to use from it.

For further information about variables, see Talend Studio
User Guide.

Usage

This component is an intermediary step. It requires an input flow
as well as an output.

Limitation

Due to license incompatibility, one or more JARs required to use this component are not
provided. You can install the missing JARs for this particular component by clicking the
Install button on the Component tab view. You can also find out and add all missing JARs easily on
the Modules tab in the Integration perspective
of your studio. For details, see https://help.talend.com/display/KB/How+to+install+external+modules+in+the+Talend+products
or the section describing how to configure the Studio in the Talend Installation and Upgrade
Guide
.

Scenario: Adding a surrogate key to a file

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

Use_Case_tAddCRCRow1.png

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.

    Use_Case_tAddCRCRow2.png
  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.

    Use_Case_tAddCRCRow3.png

    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.

    Use_Case_tAddCRCRow4.png
  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.

Use_Case_tAddCRCRow5.png

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


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x