tAddCRCRow
Provides a unique ID which helps improving the quality of processed
data. CRC stands for Cyclical Redundancy Checking.
tAddCRCRow calculates a surrogate key based on one or
several columns and adds it to the defined schema.
tAddCRCRow Standard properties
These properties are used to configure tAddCRCRow running in the Standard Job framework.
The Standard
tAddCRCRow component belongs to the Data Quality family.
The component in this framework is available in all Talend
products.
Basic settings
Schema and Edit |
A schema is a row description. it defines the number of fields to be processed and In this component, a new CRC column is automatically added. |
 |
Built-in: The schema will be |
 |
Repository: The schema already |
Implication |
Select the check box facing the relevant columns to be used for |
Advanced Settings
CRC type |
Select a CRC type in the list. The longer the CRC, the least |
tStat |
Select this check box to collect log data at the component |
Global Variables
Global Variables |
NB_LINE: the number of rows read by an input component or
ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see |
Usage
Usage rule |
This component is an intermediary step. It requires an input flow |
Limitation |
Due to license incompatibility, one or more JARs required to use |
Adding a surrogate key to a file
This scenario describes a Job adding a surrogate key to a delimited file
schema.
Setting up the Job
- Drop the following components: tFileInputDelimited, tAddCRCRow and tLogRow.
-
Connect them using a Main row
connection.
Configuring the input component
-
In the tFileInputDelimited
Component view, set the File Name path and all related properties in case
these are not stored in the Repository. -
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
-
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. -
Select CRC32 as CRC
Type to get a longer surrogate key. -
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).