Applying functions on multiple columns

Talend Data Preparation User Guide

author
Talend Documentation Team
EnrichVersion
6.4
2.1
EnrichProdName
Talend MDM Platform
Talend Real-Time Big Data Platform
Talend Data Services Platform
Talend Big Data
Talend Data Management Platform
Talend Data Fabric
Talend ESB
Talend Data Integration
Talend Big Data Platform
task
Data Quality and Preparation > Cleansing data
EnrichPlatform
Talend Data Preparation

Rather than applying the same function to different columns one after the other, you can perform actions on several columns at the same time.

Let's take the example of a dataset containing several columns with date data, each of them set in a different format.

The different date formats used are the following:

  • dd/mm/yyyy for the Subscription date column
  • mm/dd/yyyy for the Last rental column
  • yyyy-mm-dd for the Birthday column

You are going to harmonize the date format, and set these columns to the French standard: dd/mm/yy.

Procedure

  1. Click the Subscription date column.
  2. To select the two remaining columns, you have two options:
    • While pressing the Ctrl key, click the Last rental column and the Birthday column.
    • While pressing the Shift key, select the Birthday column.

    The Shift + click option allows you two select all the column between your first selection and your last.

    When selecting multiple columns, no charts are available for the data.

  3. In the Functions panel, type Change Date Format.
  4. From the New format drop-down list, select French standard.
  5. Click Submit to apply the function on the three columns.

Results

The date format for the three selected columns is now set ot the French standard.

In addition, three new steps are added to the recipe, one for each column.