Merging the content of two or more columns - 7.3

Talend Data Preparation User Guide

Version
7.3
Language
English
Product
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 Real-Time Big Data Platform
Module
Talend Data Preparation
Content
Data Quality and Preparation > Cleansing data
Last publication date
2023-11-28

In some cases, the data you want to use is split in two, three, or more columns. You can group these columns using a concatenation.

The dataset used in this example contains the first name, middle name and last name of several customers, in three distinct columns. The Concatenate columns function will be used to merge this information in a single column.

Procedure

  1. Use Ctrl + click or Shift + click to select the headers of the columns you want to use for the concatenation, First Name, Middle Name and Last Name in this case.
  2. In the Functions panel, type Concatenate columns and click the result to display the options of the associated function.
  3. In the Separator field, add a space.
    You can input any other character to act as separator for the merged data.
  4. Click the Submit button to apply the function.
    The result of the function will be output in a new column.

Results

The content of the First Name, Middle Name and Last Name columns is merged using a concatenation and you can delete the unnecessary columns.

To build the new column, the data is taken from the selected columns in a left to right order. If you insert a step that changes the original order of your columns, or add columns between columns used in the concatenation, the final result won't change.