July 30, 2023

tDenormalize – Docs for ESB 7.x

tDenormalize

Denormalizes the input flow based on one column.

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

tDenormalize Standard properties

These properties are used to configure tDenormalize running in the Standard Job framework.

The Standard
tDenormalize component belongs to the Processing family.

The component in this framework is available in all Talend
products
.

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. When you create a Spark
Job, avoid the reserved word line when naming the
fields.

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.

 

Repository: You have already created the schema and stored it in the
Repository. You can reuse it in various projects and Job designs.

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

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

Usage rule

This component can be used as intermediate step in a data
flow.

Limitation

Note that this component may change the order in the incoming
Java flow.

Denormalizing on one column

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

tDenormalize_1.png

Denormalizing on one column

  1. Drop the following components: tFileInputDelimited, tDenormalize, tLogRow
    from the Palette to the design
    workspace.
  2. Connect the components using Row
    main
    connections.
  3. On the tFileInputDelimited
    Component view, set the filepath to the
    file to be denormalized.

    tDenormalize_2.png

  4. Define the Header,
    Row Separator and Field Separator parameters.
  5. The input file schema is made of two columns, Fathers and Children.

    tDenormalize_3.png

  6. In the Basic settings of
    tDenormalize, define the column that
    contains multiple values to be grouped.
  7. In this use case, the column to denormalize is Children.

    tDenormalize_4.png

  8. Set the Delimiter to
    separate the grouped values. Beware as only one column can be
    denormalized.
  9. Select the Merge same
    value
    check box, if you know that some values to be grouped are
    strictly identical.
  10. Save your Job and press F6 to execute it.
tDenormalize_5.png

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

Denormalizing on multiple columns

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

tDenormalize_6.png

Denormalizing on multiple columns

  1. Drop the following components: tFileInputDelimited, tDenormalize, tLogRow
    from the Palette to the design
    workspace.
  2. Connect all components using a Row
    main
    connection.
  3. On the tFileInputDelimited
    Basic settings panel, set the filepath to
    the file to be denormalized.

    tDenormalize_7.png

  4. Define the Row and
    Field
    separators, the Header and other information if required.
  5. The file schema is made of four columns including: Name, FirstName, HomeTown,
    WorkTown.

    tDenormalize_8.png

  6. 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.
  7. Add as many line to the table as you need using the plus
    button. Then select the relevant columns in the drop-down list.

    tDenormalize_9.png

  8. 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
    “¤”.
  9. Save your Job and press F6 to execute it.

    tDenormalize_10.png

    The result shows the denormalized values concatenated using a
    comma.
  10. Back to the tDenormalize
    components Basic settings, in the To
    denormalize table, select the Merge same
    value
    check box to remove the duplicate occurrences.
  11. Save your Job again and press F6 to execute it..
tDenormalize_11.png

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

tDenormalize MapReduce properties (deprecated)

These properties are used to configure tDenormalize running in the MapReduce Job framework.

The MapReduce
tDenormalize component belongs to the Processing family.

The component in this framework is available in all subscription-based Talend products with Big Data
and Talend Data Fabric.

The MapReduce framework is deprecated from Talend 7.3 onwards. Use Talend Jobs for Apache Spark to accomplish your integration tasks.

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. When you create a Spark
Job, avoid the reserved word line when naming the
fields.

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.

 

Repository: You have already created the schema and stored it in the
Repository. You can reuse it in various projects and Job designs.

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

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

Usage rule

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 Open Studio for 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.

Related scenarios

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

tDenormalize properties for Apache Spark Batch

These properties are used to configure tDenormalize running in the Spark Batch Job framework.

The Spark Batch
tDenormalize component belongs to the Processing family.

The component in this framework is available in all subscription-based Talend products with Big Data
and Talend Data Fabric.

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. When you create a Spark
Job, avoid the reserved word line when naming the
fields.

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.

 

Repository: You have already created the schema and stored it in the
Repository. You can reuse it in various projects and Job designs.

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

Usage rule

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

In the Spark
Configuration
tab in the Run
view, define the connection to a given Spark cluster for the whole Job. In
addition, since the Job expects its dependent jar files for execution, you must
specify the directory in the file system to which these jar files are
transferred so that Spark can access these files:

  • Yarn mode (Yarn client or Yarn cluster):

    • When using Google Dataproc, specify a bucket in the
      Google Storage staging bucket
      field in the Spark configuration
      tab.

    • When using HDInsight, specify the blob to be used for Job
      deployment in the Windows Azure Storage
      configuration
      area in the Spark
      configuration
      tab.

    • When using Altus, specify the S3 bucket or the Azure
      Data Lake Storage for Job deployment in the Spark
      configuration
      tab.
    • When using Qubole, add a
      tS3Configuration to your Job to write
      your actual business data in the S3 system with Qubole. Without
      tS3Configuration, this business data is
      written in the Qubole HDFS system and destroyed once you shut
      down your cluster.
    • When using on-premise
      distributions, use the configuration component corresponding
      to the file system your cluster is using. Typically, this
      system is HDFS and so use tHDFSConfiguration.

  • Standalone mode: use the
    configuration component corresponding to the file system your cluster is
    using, such as tHDFSConfiguration or
    tS3Configuration.

    If you are using Databricks without any configuration component present
    in your Job, your business data is written directly in DBFS (Databricks
    Filesystem).

This connection is effective on a per-Job basis.

Related scenarios

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

tDenormalize properties for Apache Spark Streaming

These properties are used to configure tDenormalize running in the Spark Streaming Job framework.

The Spark Streaming
tDenormalize component belongs to the Processing family.

This component is available in Talend Real Time Big Data Platform and Talend Data Fabric.

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. When you create a Spark
Job, avoid the reserved word line when naming the
fields.

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.

 

Repository: You have already created the schema and stored it in the
Repository. You can reuse it in various projects and Job designs.

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

Usage rule

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

In the Spark
Configuration
tab in the Run
view, define the connection to a given Spark cluster for the whole Job. In
addition, since the Job expects its dependent jar files for execution, you must
specify the directory in the file system to which these jar files are
transferred so that Spark can access these files:

  • Yarn mode (Yarn client or Yarn cluster):

    • When using Google Dataproc, specify a bucket in the
      Google Storage staging bucket
      field in the Spark configuration
      tab.

    • When using HDInsight, specify the blob to be used for Job
      deployment in the Windows Azure Storage
      configuration
      area in the Spark
      configuration
      tab.

    • When using Altus, specify the S3 bucket or the Azure
      Data Lake Storage for Job deployment in the Spark
      configuration
      tab.
    • When using Qubole, add a
      tS3Configuration to your Job to write
      your actual business data in the S3 system with Qubole. Without
      tS3Configuration, this business data is
      written in the Qubole HDFS system and destroyed once you shut
      down your cluster.
    • When using on-premise
      distributions, use the configuration component corresponding
      to the file system your cluster is using. Typically, this
      system is HDFS and so use tHDFSConfiguration.

  • Standalone mode: use the
    configuration component corresponding to the file system your cluster is
    using, such as tHDFSConfiguration or
    tS3Configuration.

    If you are using Databricks without any configuration component present
    in your Job, your business data is written directly in DBFS (Databricks
    Filesystem).

This connection is effective on a per-Job basis.

Related scenarios

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


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