Changing the number format - 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

As the number formats used across the world are not the same, you may need to change the format used in a column containing numbers.

To ensure good performances of the application, the maximum value of numbers that can be formatted with the function is set by default to the Java MAX_VALUE, in other words 1.7976931348623157E308.

You can however change this value by editing the following parameters of the <Installation_Path>/dataprep/transformation/actions/configuration/math/math.properties file:

# Set a String value compatible with the BigDecimal constructor
max.number.value=1.7976931348623157E308
# If you set this value to TRUE and the the above "max.number.value" is not valid
# the default value from sun.misc.FloatingDecimal.Double.MAX_VALUE will be used
max.number.limit=true
# If you set "max.number.value" to TRUE and "max.number.value.replace" to true
# the cell with too big numbers will be fill by "max.number.value.replacement"
max.number.value.replace=false
max.number.value.replacement=

Procedure

  1. Select the column for which you want to change the number format.
  2. In the Functions panel, type Format Number and click the result to open the options for the associated function.
  3. In the Current separators list, select the number format used in the selected column. You can:
    • Use a predefined separator.
    • Define it yourself with custom.
    • Let Talend Data Preparation automatically guess the format.
  4. In the Target Format list, choose the number format you want to use in the selected column.
  5. 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

The number format is changed in the selected column.