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

1 ACCEPTED SOLUTION

Accepted Solutions
Six 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

6 REPLIES
Six 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
Six 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

Five Stars

Re: replace null value by '.'

I believe ashifa is right, try his expression in tmap and see if that helps!
Five Stars

Re: replace null value by '.'

it's working properly...

 

 

Thank you so much..