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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to delete blank spaces in 1 string (talend open studio)

Hello
I have an error message "for input string: 14 789" when i would like transfer 1 file .csv to a table mysql.
I used Treplace ( replace " " with "") et tmap (StringHandling.EREPLACE(row1.Montant,"\\s","")
but my pbroblem always exists .
Thanks
Tha
Labels (2)
7 Replies
Anonymous
Not applicable
Author

Hi,
There is also an option "Trim all columns" in Advanced Settings of tFileInputDelimited component.
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Tha
Just try this code in tJava and apply at rowlevel if you are using file component
String foo = " 14 789";
System.out.println("value = "+foo.replace(" ", ""));
System.out.println("value = "+foo.replaceAll("\\s", ""));

thanks
Anil Kumar Burri
http://anilkumarburri.wordpress.com/
Anonymous
Not applicable
Author

Hi,
Tk your solutions.
I tried your both 2 solutions: code java and "Trim all columns" in Advanced Settings of tFileInputDelimited. But no success.
For anilmca4u, there are 200 different lines "for input string" avec 200 values when i run my jobs:
For input string: "2 725"
For input string: "2 725"
For input string: "2 725"
For input string: "2 725"
For input string: "12 489"
For input string: "12 489"
For input string: "12 489"
For input string: "12 489"
For input string: "1 050" ...
TKs
Tha
Anonymous
Not applicable
Author

String foo = "2 725".replaceAll(" ", "");
Hope this will work for you..
Anonymous
Not applicable
Author

For umeshrakhe,
It didn't work. Sorry
Anonymous
Not applicable
Author

Hi Tha
Sorry but for me it is working fine for every value u given, for your reference find the screen shot

thanks
Anil Kumar Burri
http://anilkumarburri.wordpress.com/
0683p000009MEh0.png
RA6
Creator
Creator