August 15, 2023

tDataShuffling – Docs for ESB 6.x

tDataShuffling

Shuffles the data from in an input table to protect the actual data while having a
functional data set. Data will remain usable for purposes such as testing and
training.

tDataShuffling replaces original values with other
values for the same column from a different row.

If you define one or several columns as the partition group, the whole
table is split into a given number of partitions. These partitions share
the same values in the columns partitioned. Then, the shuffling process
is applied independently to each partition. All partitions are merged
into one output table.

If you do not set columns as the partition group, the shuffling
process is applied to the whole input table.

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

tDataShuffling Standard properties

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

The Standard
tDataShuffling component belongs to the Data Quality family.

The component in this framework is available when you have subscribed to one of
the Talend Platform products 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 Sync columns to retrieve the schema from
the previous component connected in the Job.

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.

Shuffling columns

Define the groups of columns to be shuffled:

  • Column: Select the columns to be shuffled.

  • Group ID: Select the group identifier to group
    columns. The columns having the same group identifier are shuffled together.

    This field is set to 0 by default. This means that the column
    is not part of the shuffling process.

Advanced settings

Seed for random generator

Set a random number if you want to shuffle the data in the same order in each execution of
the Job. This field is set to 12345678 by default.

Repeating the execution with a different value for this field will shuffle the data in a
different order. Keep this field empty if you want the data to be shuffled in random order
each time you execute the Job.

Buffer size

Type in the size of physical memory, in number of rows, you want to
allocate to processed data.

Partitioning columns

Add the columns used for partitioning the data.

The selected columns separate the shuffling process into small partitions. Only the rows
within a partition can be shuffled together.

tStat
Catcher
Statistics

Select this check box to gather the Job processing metadata at the Job level
as well as at each component level.

Usage

Usage rule

This component is usually used as an intermediate component, and it requires an
input component and an output component.

Scenario: Shuffling data values to restrict the use of actual sensitive data

This scenario applies only to a subscription-based Talend Platform solution or Talend Data Fabric.

With the tDataShuffling component, you can shuffle
sensitive information to replace it with other values for the same column from a different
row, allowing production data to be safely used for purposes such as testing and
training.

This scenario describes a Job which uses:

  • the tFixedFlowInput component to generate
    personal data including credit card numbers,

  • the tDataShuffling component to shuffle original
    data and replace values with other values for the same column from a different
    row,

  • the tFileOutputExcel component to output the
    shuffled data set.

use_case-tdatashuffling.png

Setting up the Job

  1. Drop the following components from the Palette onto the design workspace: tFixedFlowInput, tDataShuffling and
    tFileOutputExcel.
  2. Connect the three components together using the Main links.

Configuring the input component

  1. Double-click tFixedFlowInput to open its
    Basic settings view in the Component tab.

    use_case-tdatashuffling2.png

  2. Create the schema through the Edit Schema
    button.

    use_case-tdatashuffling3.png

    In the open dialog box, click the [+] button
    and add the columns that will hold the initial input data: customer
    id
    , credit_card, lname,
    fname, mi,
    address1, city,
    state_province, postal_code,
    country, phone and
    email.
  3. Click OK.
  4. In the Number of rows field, enter
    1.
  5. In the Mode area, select the Use Inline Content option.
  6. In the Content table, enter the customer data
    you want to shuffle, for example:

Configuring the tDataShuffling component

  1. Double-click tDataShuffling to display the
    Basic settings view and define the component
    properties.

    use_case-tdatashuffling4.png

  2. Click Sync columns to retrieve the schema
    defined in the input component.
  3. In the Shuffling columns table, click the
    [+] button to add four rows, and then:

    • in the Column, select the columns
      where data will be shuffled,

    • in the Group ID, select the group
      identifier for each column. The columns having the same group identifier
      are shuffled together.

    In the above example, there are two groups of columns to be
    shuffled:

    • Group ID 1: credit_card

    • Group ID 2: lname, fname and mi

    The Job will replace credit card numbers within the credit_card column with values from different rows. It will also keep
    last names, first names and middle initial values, from the lname, fname and mi
    columns together and replace them with values from different rows.

  4. Click the Advanced settings tab.

    use_case-tdatashuffling5.png

    In the Partitioning columns table, click the
    [+] button to add one row.
    The Job will shuffle the original data rows sharing the same value for the
    partitioning columns.
    In the above example, the component is configured to apply the shuffling
    process to the rows sharing the same value for the country column.

Configuring the output component and executing the Job

  1. Double-click the tFileOutputExcel component
    to display the Basic settings view and define
    the component properties.

    use_case-tdatashuffling6.png

  2. Set the destination file name as well as the sheet name and then select the
    Define all columns auto size check box.
  3. Save your Job and press F6 to execute
    it.

    The tDataShuffling component shuffles data in
    the selected columns and writes the result in an output file.
  4. Right-click the output component and select Data
    Viewer
    to display the shuffled data.

    use_case-tdatashuffling7.png

    tDataShuffling outputs shuffled data.
    tDataShuffling shuffles values within the first
    group of columns (credit_card) and within the second group
    of columns (lname, fname and
    mi).
    The shuffling process only applies to the rows sharing the same values for the
    country column, as defined in the component advanced settings.
    Sensitive personal information in the input data has been shuffled but data
    still looks real and consistent. The shuffled data is still usable for purposes
    other than production.

Further restricting the use of sensitive data

When shuffling data, it is still advised to mask sensitive data. Remember also to
consider relationships between the columns when shuffling data and make sure the
original data set cannot be reconstructed.

In this scenario, last names and first names are grouped together but the email
adresses are not in the same group. Consequently, the email column
does not relate to the lname and fname
columns. Since the email column usually contains information about
first names and last names, it may help attackers to reconstruct the original
data.

Additionally, the address1, city and
email columns are not in any group, so they were not shuffled. This
means it is possible to infer, for example, that Robert Damstra lives at 1619 Stillman
Court, Lynnwood.

Using this scenario, you can restrict the use of actual sensitive data even more:

  • To avoid the use of real credit card numbers, you can mask credit card numbers
    using the tDataMasking component.

  • To avoid the identification of customers with their email addresses, you can
    mask email addresses using the tDataMasking
    component.

  • To make it more difficult to read real addresses, you can add the
    address1 and city columns in other
    groups.

Note:

As tDataShuffling is supported on the Spark
framework, you can convert this standard Job to a Spark Batch Job by editing the Job
properties. This way you do not need to redefine the settings of the components in
the Job.

tDataShuffling properties for Apache Spark Batch

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

The Spark Batch
tDataShuffling component belongs to the Data Quality family.

The component in this framework is available when you have subscribed to any Talend Platform product with Big Data 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 Sync columns to retrieve the schema from
the previous component connected in the Job.

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.

Shuffling columns

Define the groups of columns to be shuffled:

  • Column: Select the columns to be shuffled.

  • Group ID: Select the group identifier to group
    columns. The columns having the same group identifier are shuffled together.

    This field is set to 0 by default. This means that the column
    is not part of the shuffling process.

Advanced settings

Seed for random generator

Set a random number if you want to shuffle the data in the same order in each execution of
the Job. This field is set to 12345678 by default.

Repeating the execution with a different value for this field will shuffle the data in a
different order. Keep this field empty if you want the data to be shuffled in random order
each time you execute the Job.

Partitioning columns

Add the columns used for partitioning the data.

The selected columns separate the shuffling process into small partitions. Only the rows
within a partition can be shuffled together.

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.


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