How to handle null values in expression

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.

Five 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 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch