tDenormalize - 6.3

Talend Components Reference Guide

EnrichVersion
6.3
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

Function

Denormalizes the input flow based on one column.

Purpose

tDenormalize helps synthesize the input flow.

Depending on the Talend solution you are using, this component can be used in one, some or all of the following Job frameworks:

tDenormalize Properties

Component family

Processing/Fields

 

Basic settings

Schema and Edit Schema

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

Click Edit schema to make changes to the schema. If the current schema is of the Repository type, three options are available:

  • View schema: choose this option to view the schema only.

  • Change to built-in property: choose this option to change the schema to Built-in for local changes.

  • Update repository connection: choose this option to change the schema stored in the repository and decide whether to propagate the changes to all the Jobs upon completion. If you just want to propagate the changes to the current Job, you can select No upon completion and choose this schema metadata again in the [Repository Content] window.

 

 

Built-In: You create and store the schema locally for this component only. Related topic: see Talend Studio User Guide.

  

Repository: You have already created the schema and stored it in the Repository. You can reuse it in various projects and Job designs. Related topic: see Talend Studio User Guide.

 

To denormalize

In this table, define the parameters used to denormalize your columns.

Column: Select the column to denormalize.

Delimiter: Type in the separator you want to use to denormalize your data between double quotes.

Merge same value: Select this check box to merge identical values.

Advanced settings

tStatCatcher Statistics

Select this check box to collect the log data at component level. Note that this check box is not available in the Map/Reduce version of the component.

Global Variables

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.

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.

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 can be used as intermediate step in a data flow.

Log4j

If you are using a subscription-based version of the Studio, the activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User Guide.

For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html.

Limitation

n/a

Scenario 1: Denormalizing on one column

This scenario illustrates a Job denormalizing one column in a delimited file.

  • Drop the following components: tFileInputDelimited, tDenormalize, tLogRow from the Palette to the design workspace.

  • Connect the components using Row main connections.

  • On the tFileInputDelimited Component view, set the filepath to the file to be denormalized.

  • Define the Header, Row Separator and Field Separator parameters.

  • The input file schema is made of two columns, Fathers and Children.

  • In the Basic settings of tDenormalize, define the column that contains multiple values to be grouped.

  • In this use case, the column to denormalize is Children.

  • Set the Delimiter to separate the grouped values. Beware as only one column can be denormalized.

  • Select the Merge same value check box, if you know that some values to be grouped are strictly identical.

  • Save your Job and press F6 to execute it.

All values from the column Children (set as column to denormalize) are grouped by their Fathers column. Values are separated by a comma.

Scenario 2: Denormalizing on multiple columns

This scenario illustrates a Job denormalizing two columns from a delimited file.

  • Drop the following components: tFileInputDelimited, tDenormalize, tLogRow from the Palette to the design workspace.

  • Connect all components using a Row main connection.

  • On the tFileInputDelimited Basic settings panel, set the filepath to the file to be denormalized.

  • Define the Row and Field separators, the Header and other information if required.

  • The file schema is made of four columns including: Name, FirstName, HomeTown, WorkTown.

  • In the tDenormalize component Basic settings, select the columns that contain the repetition. These are the column which are meant to occur multiple times in the document. In this use case, FirstName, HomeCity and WorkCity are the columns against which the denormalization is performed.

  • Add as many line to the table as you need using the plus button. Then select the relevant columns in the drop-down list.

  • In the Delimiter column, define the separator between double quotes, to split concanated values. For FirstName column, type in "#", for HomeCity, type in "§", ans for WorkCity, type in "¤".

  • Save your Job and press F6 to execute it.

  • The result shows the denormalized values concatenated using a comma.

  • Back to the tDenormalize components Basic settings, in the To denormalize table, select the Merge same value check box to remove the duplicate occurrences.

  • Save your Job again and press F6 to execute it.

This time, the console shows the results with no duplicate instances.

tDenormalize in Talend Map/Reduce Jobs

Warning

The information in this section is only for users that have subscribed to one of the Talend solutions with Big Data and is not applicable to Talend Open Studio for Big Data users.

In a Talend Map/Reduce Job, tDenormalize, as well as the other Map/Reduce components preceding it, generates native Map/Reduce code. This section presents the specific properties of tDenormalize when it is used in that situation. For further information about a Talend Map/Reduce Job, see Talend Big Data Getting Started Guide.

Component family

Processing/Fields

 

Basic settings

Schema and Edit Schema

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

Click Edit schema to make changes to the schema. If the current schema is of the Repository type, three options are available:

  • View schema: choose this option to view the schema only.

  • Change to built-in property: choose this option to change the schema to Built-in for local changes.

  • Update repository connection: choose this option to change the schema stored in the repository and decide whether to propagate the changes to all the Jobs upon completion. If you just want to propagate the changes to the current Job, you can select No upon completion and choose this schema metadata again in the [Repository Content] window.

 

 

Built-In: You create and store the schema locally for this component only. Related topic: see Talend Studio User Guide.

  

Repository: You have already created the schema and stored it in the Repository. You can reuse it in various projects and Job designs. Related topic: see Talend Studio User Guide.

 

To denormalize

In this table, define the parameters used to denormalize your columns.

Column: Select the column to denormalize.

Delimiter: Type in the separator you want to use to denormalize your data between double quotes.

Merge same value: Select this check box to merge identical values.

Global Variables

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.

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.

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 in Map/Reduce Jobs

In a Talend Map/Reduce Job, this component is used as an intermediate step and other components used along with it must be Map/Reduce components, too. They generate native Map/Reduce code that can be executed directly in Hadoop.

For further information about a Talend Map/Reduce Job, see the sections describing how to create, convert and configure a Talend Map/Reduce Job of the Talend Big Data Getting Started Guide.

Note that in this documentation, unless otherwise explicitly stated, a scenario presents only Standard Jobs, that is to say traditional Talend data integration Jobs, and non Map/Reduce Jobs.

Limitation

n/a

Related scenarios

No scenario is available for the Map/Reduce version of this component yet.

tDenormalize properties in Spark Batch Jobs

Component family

Processing/Fields

 

Basic settings

Schema and Edit Schema

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

Click Edit schema to make changes to the schema. If the current schema is of the Repository type, three options are available:

  • View schema: choose this option to view the schema only.

  • Change to built-in property: choose this option to change the schema to Built-in for local changes.

  • Update repository connection: choose this option to change the schema stored in the repository and decide whether to propagate the changes to all the Jobs upon completion. If you just want to propagate the changes to the current Job, you can select No upon completion and choose this schema metadata again in the [Repository Content] window.

 

 

Built-In: You create and store the schema locally for this component only. Related topic: see Talend Studio User Guide.

  

Repository: You have already created the schema and stored it in the Repository. You can reuse it in various projects and Job designs. Related topic: see Talend Studio User Guide.

 

To denormalize

In this table, define the parameters used to denormalize your columns.

Column: Select the column to denormalize.

Delimiter: Type in the separator you want to use to denormalize your data between double quotes.

Merge same value: Select this check box to merge identical values.

Usage in Spark Batch Jobs

This component is used as an intermediate step.

This component, along with the Spark Batch component Palette it belongs to, appears only when you are creating a Spark Batch Job.

Note that in this documentation, unless otherwise explicitly stated, a scenario presents only Standard Jobs, that is to say traditional Talend data integration Jobs.

Spark Connection

You need to use the Spark Configuration tab in the Run view to define the connection to a given Spark cluster for the whole Job. In addition, since the Job expects its dependent jar files for execution, one and only one file system related component from the Storage family is required in the same Job so that Spark can use this component to connect to the file system to which the jar files dependent on the Job are transferred:

This connection is effective on a per-Job basis.

Log4j

If you are using a subscription-based version of the Studio, the activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User Guide.

For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html.

Related scenarios

No scenario is available for the Spark Batch version of this component yet.

tDenormalize properties in Spark Streaming Jobs

Warning

The streaming version of this component is available in the Palette of the Studio only if you have subscribed to Talend Real-time Big Data Platform or Talend Data Fabric.

Component family

Processing/Fields

 

Basic settings

Schema and Edit Schema

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

Click Edit schema to make changes to the schema. If the current schema is of the Repository type, three options are available:

  • View schema: choose this option to view the schema only.

  • Change to built-in property: choose this option to change the schema to Built-in for local changes.

  • Update repository connection: choose this option to change the schema stored in the repository and decide whether to propagate the changes to all the Jobs upon completion. If you just want to propagate the changes to the current Job, you can select No upon completion and choose this schema metadata again in the [Repository Content] window.

 

 

Built-In: You create and store the schema locally for this component only. Related topic: see Talend Studio User Guide.

  

Repository: You have already created the schema and stored it in the Repository. You can reuse it in various projects and Job designs. Related topic: see Talend Studio User Guide.

 

To denormalize

In this table, define the parameters used to denormalize your columns.

Column: Select the column to denormalize.

Delimiter: Type in the separator you want to use to denormalize your data between double quotes.

Merge same value: Select this check box to merge identical values.

Usage in Spark Streaming Jobs

This component is used as an intermediate step.

This component, along with the Spark Streaming component Palette it belongs to, appears only when you are creating a Spark Streaming Job.

Note that in this documentation, unless otherwise explicitly stated, a scenario presents only Standard Jobs, that is to say traditional Talend data integration Jobs.

Spark Connection

You need to use the Spark Configuration tab in the Run view to define the connection to a given Spark cluster for the whole Job. In addition, since the Job expects its dependent jar files for execution, one and only one file system related component from the Storage family is required in the same Job so that Spark can use this component to connect to the file system to which the jar files dependent on the Job are transferred:

This connection is effective on a per-Job basis.

Log4j

If you are using a subscription-based version of the Studio, the activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User Guide.

For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html.

Related scenarios

No scenario is available for the Spark Streaming version of this component yet.