Formatting phone numbers - 8.0

Talend Data Preparation User Guide

Version
8.0
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
2024-03-26

You can use the Format phone number function to easily modify the way phone numbers are formatted in your datasets.

Tip: This transformation can also be performed by using the Magic fill function.

You can either use this function to harmonize all your phone numbers to the same format, or dynamically format those numbers, according to the information contained in another column.

In this example, you are working on a dataset where each row contains basic customer information, such as names, email addresses, phone number and country. You can see that the phone numbers all follow the same formatting. However, what you would like is to have each phone number follow the formatting standard of the country where the customer comes from. To achieve this, you are going to use the information contained in the country_code column. The Format phone number function is compatible with ISO2 country codes.

Procedure

  1. Click the header of the phone_number to select its content.
  2. In the functions panel, type Format phone number and click the result to open the options for the associated function.
  3. In the Use with drop-down list, select Other column.
    This option is used in order to benefit from the country code information also contained in your dataset, but you can also select Value to choose from a list of predetermined standards (American, French, British, or German).
  4. In the Column drop-down list, select the country_code column so that each phone number is formatted according to the standard of its corresponding country.
  5. In the Format type drop-down list, select National.
  6. Click Submit.

    You have the possibility to output the result of this function in a new column by selecting the Create new column check box.

Results

You have efficiently formatted the phone numbers contained in your dataset, by using the information of a second column.