Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

How to handle null values in expression

Highlighted
One Star

How to handle null values in expression

Hi,
I want to handle null values in my input column...
Input data for postal code is 9 digits, for this i need to display the postal code as xxxxx-xxxx like this in target table, when I try to convert like this getting some errors due to null values are there in input data, so please help me on this.

Highlighted
Six Stars

Re: How to handle null values in expression

(!Relational.isNull(row2.postalCode) && row2.postalCode.lenght >5)?true:false


by using this method you can avoid this error. 

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog