Null pointer exception in tMap

Highlighted
Five Stars

Null pointer exception in tMap

I am trying to read data from ldap and load it into sql server table. While loading IAM checking the phone(us format) and email format using code routines in tMap. In source, phone and email columns may having null or empty values. Code routines return null if the format doesn't match. In database, these two columns are nullable. Whenever null or empty comes from source, job is throwing null pointer exception in tMap
Highlighted
Six Stars

Re: Null pointer exception in tMap

Any field that you use code to manipulate needs to do null checks before the manipulation if null values are being passed. Try:
!Relational.ISNULL(fieldName) && fieldName.length() > 0 ? codeToDo :null

Employee

Re: Null pointer exception in tMap

Hi,

 

   The NULL check and empty value verification can be done by above post. There are two specialized components in Talend which can perform Data Quality checks for email and Telephone numbers.

 

    Please utilize them for data quality checks before inserting data to target table. The links for both components are as below.

 

https://help.talend.com/reader/hCrOzogIwKfuR3mPf~LydA/8_Q4WAzPdmlNfO5mdguPVg

 

https://help.talend.com/reader/hCrOzogIwKfuR3mPf~LydA/A9mfddr8XFdjPzBpQu6Izw

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

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 2

Part 2 of a series on Context Variables

Blog

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