Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
TestColumn1;TestColumn2;"TestColumn3:1;TestColumn3:2";TestColumn4
the above sample data contains delimiter as data in the 3rd column and i wish to fetch the data as
TestColumn1
TestColumn2
"TestColumn3:1;TestColumn3:2
TestColumn4
the main concern here is to understand the working of "Text Enclosure and Escaping Character" option in tfileInputdelimited .
it would be really helpful if someone can explain this in detail that what these 2 options works and how they works.
@CK395,for input :< TestColumn1;TestColumn2;"TestColumn3:1;TestColumn3:2";TestColumn4> you will get the below output.
.-----------+-----------+---------------------------+-----------.
| tLogRow_1 |
|=----------+-----------+---------------------------+----------=|
|newColumn |newColumn1 |newColumn2 |newColumn3 |
|=----------+-----------+---------------------------+----------=|
|TestColumn1|TestColumn2|TestColumn3:1;TestColumn3:2|TestColumn4|
'-----------+-----------+---------------------------+-----------'
if you wan to know more about these,try to create metadata in the repository by using CSV option and you can play with option and get to know how the would be extracted form that csv.
@CK395,since when you enable CSV option,in tFileInputDelimited,you can set those two options.
check the below link,you will understand the use case.
https://stackoverflow.com/questions/43512095/usage-of-escape-char-and-text-enclosure
Hi @manodwhb ,
I am through that link already and it did not perform as it mention.
it would be helpful if you can explain it.
Regards
Chandra Kant
@CK395,for Text Enclosure,for suppose your filed data is in like "Hello" then you will specify the """ .
for Escaping Character,which you want to be print as part of the data.
Hi @manodwhb,
You mean if the data contains inverted commas <"$$$$$$"> then only data<$$$$$$$> can be fetched using TextEnclosure """ and to keep some symbol within the data that must be specified as Escape Character.
can you specify the <Text Enclosure> and <Escape Character> for case given below and please test it in a job.
input :< TestColumn1;TestColumn2;"TestColumn3:1;TestColumn3:2";TestColumn4>
output :
Column1 | Column2 | Column3 | Column4 |
TestColumn1 | TestColumn2 | TestColumn3:1;TestColumn3:2 | TestColumn4 |
or
Column1 | Column2 | Column3 | Column4 |
TestColumn1 | TestColumn2 | "TestColumn3:1;TestColumn3:2" | TestColumn4 |
i think it would clear some doubts.
Regards
Chandra Kant
@CK395,for input :< TestColumn1;TestColumn2;"TestColumn3:1;TestColumn3:2";TestColumn4> you will get the below output.
.-----------+-----------+---------------------------+-----------.
| tLogRow_1 |
|=----------+-----------+---------------------------+----------=|
|newColumn |newColumn1 |newColumn2 |newColumn3 |
|=----------+-----------+---------------------------+----------=|
|TestColumn1|TestColumn2|TestColumn3:1;TestColumn3:2|TestColumn4|
'-----------+-----------+---------------------------+-----------'
if you wan to know more about these,try to create metadata in the repository by using CSV option and you can play with option and get to know how the would be extracted form that csv.
hi @manodwhb,
this one simply worked with Escape<"""> and Enclosure<"""> once I restarted the Talend but was not working previously ,
Talend might be having some processing issues.
I appreciate your helpful replies and patience.
Thanks and Regards
Chandra Kant
@CK395,great, Please provide Kudos also