One Star

Replace 0 (zero) by NULL with treplace (or other component)

Hello,
i want to replace the value 0 by NULL with treplace, but this dosn´t work.
I'm on talend 4.0
I try 0 to null > error
I try "0" to null > error
I try 0 to > no error but nothing happens the zero still appears in tlog
I try "0" to > no error but nothing happens the zero still appeas in tlog
Please help me to find my mistake.
Thanks
Sebastian1234
3 REPLIES
Community Manager

Re: Replace 0 (zero) by NULL with treplace (or other component)

Hello
What's the data type of this column? You can replace it on tMap:
Assuming the data type is String,
row1.value.equals("0")?null:row1.value

Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Replace 0 (zero) by NULL with treplace (or other component)

Hello,
ok i will have a try.
It is a integer so i think it musst be
row1.value.equals(0)?null:row1.value
Thanks a lot!
Sebastian1234
Community Manager

Re: Replace 0 (zero) by NULL with treplace (or other component)

Hello
If it is a Integer, try
row1.value==0?null:row1.value

Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business