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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Tmap from Sql to tfilidelimited

Hello.
The problem is that the csv file creates new line if ascii_char(13) and ascii_char(10) is found on adress column
I want to replace all ascii_char(13) and ascii_char(10) from that string.
row1.ADRESS.replaceAll(" "," "); How can I express Ascii Char here?
File is ISO-8859-15.
Thanks in advance.
Labels (2)
1 Solution

Accepted Solutions
ytuzet
Creator
Creator

re-plug your tMap and test with row1.ADDRESS.replaceAll("\r\n"," ").replaceAll("\n"," ");

View solution in original post

24 Replies
Anonymous
Not applicable
Author

Hi
Do the transform on tMap, type in the following expression in the expression field of column of output table.
row1.ADRESS.replaceAll("\\your Ascii char ","new string")
Best regards
Shong
Anonymous
Not applicable
Author

Hello Shong.
Thanks for your reply.
Not working yet. I am using the folloing expression on the tmap: row1.address.replaceAll("\\ASCII_CHAR(13)","-");
I also try: row1.address.replaceAll("\\CR","-"); for carriage return, but not supported.
Thanks again
ytuzet
Creator
Creator

If your purpose is to replace all carriage return test:
row1.ADRESS.replaceAll("\r"," ");
janhess
Creator II
Creator II

you'll need \n for new line as well
Anonymous
Not applicable
Author

Hello and many thanks for your reply.
Not working: on tmap: row1.ADDRESS.replaceAll("\\r\\n"," ");
result:
Name;address;etc
Ruben;Street
name;etc
I want:
Name;address;etc
Ruben;Street name;etc
Thanks again
ytuzet
Creator
Creator

try row1.ADDRESS.replaceAll("\r\n"," "); instead
Anonymous
Not applicable
Author

Hello and thanks for your reply.
Yes, that almost worked.
For this:
Name;address;etc
Ruben;Street
name;etc
The result is:
Name;address;etc
Ruben;Street name;etc
And now it's ok! Thanks.
For:
Name;address;etc
Ruben;Street
name
and number;etc
Not ok. And I don't understand beacause we are using a "replaceall"
For more than 1 Carriage return it's not working.
Sorry, I am new In Talend.
Thanks again
ytuzet
Creator
Creator

Can you post a screenshot with component properties of the component behind row1?
the replaceAll will not work if you put "\n" as row separator because it will do a replaceAll for each line
Anonymous
Not applicable
Author

Yes,
That's what i was thinking