replacing null values

Highlighted
Five Stars

replacing null values

Hello folks , I am new with Talend and I have faced a problem when I was trying to replace Null values with this string value "cnam".

Before replacing null values contained in the column "CodeMutuelle" , I have to check that the value of the column "MontantCnam" is different than 0.00. 

I have made the following condition in my t_map component : 

row1.MontantCnam != null && ( row1.CodeMutuelle == null) ? "cnam" : row1.CodeMutuelle 

 

As a result, all null values are replaced by "cnam" , even if the "MontantCnam" is null (0,000) .

PS:   MontantCnam has the BigDecimal data type.

 

You can find bellow a vue of my data before and after transformation.

Thanks in advance !

 

 

Talend problem.png

 

 

 

 

 


Accepted Solutions
Community Manager

Re: replacing null values

0.00 is not null.

 

You need to use.....

 

row1.MontantCnam != null && row1.MontantCnam.doubleValue()!=0 && row1.CodeMutuelle == null ? "cnam" : row1.CodeMutuelle 

All Replies
Community Manager

Re: replacing null values

0.00 is not null.

 

You need to use.....

 

row1.MontantCnam != null && row1.MontantCnam.doubleValue()!=0 && row1.CodeMutuelle == null ? "cnam" : row1.CodeMutuelle 

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

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

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog