August 15, 2023

tDenormalize – Docs for ESB 6.x

tDenormalize

Denormalizes the input flow based on one column.

Depending on the Talend solution 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 generally available.

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

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.

Scenario 1: Denormalizing on one column

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

Use_Case_tDenormalizePerl1.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.

    Use_Case_tDenormalizePerl2.png

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

    Use_Case_tDenormalizePerl3.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.

    Use_Case_tDenormalizePerl4.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.
Use_Case_tDenormalizePerl5.png

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.

Use_Case_tDenormalizeJava1.png

Scenario 2: 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.

    Use_Case_tDenormalizeJava2.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.

    Use_Case_tDenormalizeJava3.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.

    Use_Case_tDenormalizeJava4.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.

    Use_Case_tDenormalizeJava5.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..
Use_Case_tDenormalizeJava6.png

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

tDenormalize MapReduce properties

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 only if you have subscribed to one
of the
Talend
solutions with Big Data.

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

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 only if you have subscribed to one
of the
Talend
solutions with Big Data.

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

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

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, 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: when using Google
    Dataproc, specify a bucket in the Google Storage staging
    bucket
    field in the Spark
    configuration
    tab; when using other distributions, use a
    tHDFSConfiguration
    component to specify the directory.

  • Standalone mode: you need to choose
    the configuration component depending on the file system you are using, such
    as tHDFSConfiguration
    or tS3Configuration.

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.

The component in this framework is available only if you have subscribed to Talend Real-time Big Data Platform or 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. 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

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

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, 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: when using Google
    Dataproc, specify a bucket in the Google Storage staging
    bucket
    field in the Spark
    configuration
    tab; when using other distributions, use a
    tHDFSConfiguration
    component to specify the directory.

  • Standalone mode: you need to choose
    the configuration component depending on the file system you are using, such
    as tHDFSConfiguration
    or tS3Configuration.

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