Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
RAJ6
Contributor III
Contributor III

how to remove white space for integer column values in talend

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

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Yes, this is pretty straight forward. Just place the following code in a tMap (or similar)....

 

row.columnWithSpaces.replaceAll(" ", "")

View solution in original post

6 Replies
Anonymous
Not applicable

Yes, this is pretty straight forward. Just place the following code in a tMap (or similar)....

 

row.columnWithSpaces.replaceAll(" ", "")
RAJ6
Contributor III
Contributor III
Author

Hi

I tried it's not working for integer column

 

row1.S_NO.replaceAll(" ","") 

Anonymous
Not applicable

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. 

RAJ6
Contributor III
Contributor III
Author

Hi

Thank you for your help

Muhammad_irtiza
Contributor
Contributor

Hey @Richard Hall​  can you please guide me to remove whites spaces in float type column?

 

Anonymous
Not applicable

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.