by tmap job replace"null" per 0 as BigDecimal

Highlighted
Four Stars

by tmap job replace"null" per 0 as BigDecimal

HI, i need a little help.....after to my TMAp job, some fields are "default". That is also correct according to mapping. Zero means empty. However, I want to write a variable that says if zero then replace the field with a number0. I tried Replace but it can only replace string and not big decimal. Is there a solution for this? Many thanksSnag_24aa996b.pngSnag_24ac612b.png


Accepted Solutions
Eight Stars

Re: by tmap job replace"null" per 0 as BigDecimal

Hi @nero0x0,

Please mark the answer of @TRF as accept as solution so that others can use it later


All Replies
Fifteen Stars TRF
Fifteen Stars

Re: by tmap job replace"null" per 0 as BigDecimal

In your tMap, try this to replace null values by 0:

row1.AgencyNetwork == null ? new BigDecimal(0) : row1.AgencyNetwork

 


TRF
Four Stars

Re: by tmap job replace"null" per 0 as BigDecimal

thx a lot. now is running :-)

Fifteen Stars TRF
Fifteen Stars

Re: by tmap job replace"null" per 0 as BigDecimal

Great!

Thank's to mark your case as solved (Kudos also accepted).


TRF
Eight Stars

Re: by tmap job replace"null" per 0 as BigDecimal

Hi @nero0x0,

Please mark the answer of @TRF as accept as solution so that others can use it later

Fifteen Stars TRF
Fifteen Stars

Re: by tmap job replace"null" per 0 as BigDecimal

@nero0x0, it seems you know how to open a case, but not how to close it!!!!

@abhi90 is probably happy of that Smiley Wink


TRF

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch