Suppose I have a tFileInputDelimited file with data as below (1st line header) :-
Job design as below :-
escape char "@"
Text encloser """
then the tLogRow will give below output:-
escape char """
Text encloser "@"
then the output in tLogrow
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.
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 :-)
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Learn how to use an API-First Approach to Modernize your Applications
Take a look at this technical overview video of Talend API Designer
Find out how to get started with APIs