Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Suppose I have a tFileInputDelimited file with data as below (1st line header) :-
Column1;column2;column3
@111@;@xxx@;@987@@
@222@;@YYY@;@874@@
Job design as below :-
tfileInputDelimited--> tLogRow
escape char "@"
Text encloser """
then the tLogRow will give below output:-
Column1|column2|column3
@111@|@xxx@|@987@@
@222@|@YYY@|@874@@
escape char """
Text encloser "@"
then the output in tLogrow
Column1|column2|column3
111|xxx|987
222|YYY|874
In the above example, it seems like whatever text Encloser is mentioned its expecting the value of the field within that characters followed by delimiter.
Then can you please let me know what is the use of Escape char option in this. And how this can be used with an example.
Hi @shameer ,
Lets clear the fog with these terms.
Field Separator - This is the most important value which will separate the values between columns for a csv file. In your case, it will be semicolon.
Text Enclosure - Even if there is a break in the value like more than one word or a big paragraph with lot of line breaks, this value will help the csv reader to understand that all the data within that character set is one block. Generally double quotes is the most popular character set used for this variable.
Escape character - Imagine a case where you are getting text enclosure character itself as part of data. In this case, we need to inform the reader by adding a prefix with another character that it is indeed part of data. This is called escape character.
e.g:- "I would like to test loading of double quotes character "" and it seems to be working!"
If you add " as the escape character, it will check for the combination and will add the " in between sentence. If you are using some other symbol like @, you need to add the combination as @" to do the escape character.
Hope I cleared your query 🙂 Please spend a second to mark the topic as resolved if you do not have any further queries.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂