Outputting blank values as null or fixed values - Cloud - 8.0

tMap

Version
Cloud
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 Studio
Content
Data Governance > Third-party systems > Processing components (Integration) > tMap
Data Quality and Preparation > Third-party systems > Processing components (Integration) > tMap
Design and Development > Third-party systems > Processing components (Integration) > tMap
Last publication date
2024-02-20

You can output blank values as null or fixed values using expressions.

To output blank values of a column as null, use the following expression syntax:

rowName.columnName.equals("")?null:rowName.columnName

To output blank values of a column as fixed values, use the following expression syntax:

rowName.columnName.equals("")?fixValue:rowName.columnName

In the following example, any blank values in the name column will be replaced with null; any blank values in the company column will be replaced with the string Unknown.

The following two tables show the input and output of a tMap component with these two expressions applied.

Input table:

id name company
1 John Talend
2   Apple
3 Jane  

Output table:

id name company
1 John Talend
2 null Apple
3 Jane Unknown