Skip to main content

Outputting blank values as null or fixed values

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

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!