replace null value by '.'

Five Stars

replace null value by '.'

Hello,

 

I have one colomn for contact number some user did not enter value in that column...

Now i want to replace that value ny DOT '' . ''

 

 

 

Please reply 

 

Thanks


Accepted Solutions
Eight Stars

Re: replace null value by '.'

No need to new column, you can change the simple expression in tMap Output

i.e. row1.ColumnName to 

row1.ColumnName==null || row1.ColumnName.isEmpty()?".":row1.ColumnName


All Replies
Eight Stars

Re: replace null value by '.'

Using Ternary operator in tMap we can achieve this ,

 

row1.ColumnName==null || row1.ColumnName.isEmpty()?".":row1.ColumnName

Five Stars

Re: replace null value by '.'

this making new column ...and i want "." where column value is null
Eight Stars

Re: replace null value by '.'

No need to new column, you can change the simple expression in tMap Output

i.e. row1.ColumnName to 

row1.ColumnName==null || row1.ColumnName.isEmpty()?".":row1.ColumnName

Five Stars

Re: replace null value by '.'

ak.png

Six Stars

Re: replace null value by '.'

I believe ashifa is right, try his expression in tmap and see if that helps!
~ ````Please don't forget to give "kudos" when a reply is helpful and click "Accept the solution" when you think you're good with it. Thanks! ~
Five Stars

Re: replace null value by '.'

it's working properly...

 

 

Thank you so much..

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

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