Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Talend Folks,
I want to remove white space for integer column values in database using talend.
whether it is possible or not ?
input
s.no
0000
output
s.no
0000
Yes, this is pretty straight forward. Just place the following code in a tMap (or similar)....
row.columnWithSpaces.replaceAll(" ", "")
Yes, this is pretty straight forward. Just place the following code in a tMap (or similar)....
row.columnWithSpaces.replaceAll(" ", "")
Hi
I tried it's not working for integer column
row1.S_NO.replaceAll(" ","")
This is not an Integer column if it has a space in it or starts with a 0. A number cannot start with a 0 unless it is 0. What you have is a String column which holds your data as " 0000 ". You need to remove the spaces in the way I demonstrated, and that will leave "0000". If you convert that to an Integer it will leave 0.
Hi
Thank you for your help
Hey @Richard Hall can you please guide me to remove whites spaces in float type column?
Is this in a database? Is it a float column? Can you give an example of what you are seeing? This question was a but misleading (the original question) as they were actually talking about a String representation of a number.