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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tFileInputDelimted : fields enclosd in double quotes W pipe delimiter

Hello,
I have a csv file with all fields enclosed in double quotes and a pipe ('|') seperating the fields.
Ex:
"1001"|"234"|"0011"|"W2"|"1001-234"|"Textual field info"|"85"|"W2"|"0011"|"Smith, Joe"
I am trying to use this file and have it strip the double quotes from the fields when using it.
I have tried setting the CSV options with 'Text Enclosure' set to """ , and without it, and none strip them out.
Any suggestions?
thanks.
Labels (2)
8 Replies
Anonymous
Not applicable
Author

Hello
You need aslo set the escape char "\"".
Best regards

shong
Anonymous
Not applicable
Author

It turns out that I need to set 'Text Enclosure' to ' "\"" ' and not ' """ " as you would expect.
If my fields are already enclosed in double quotes, what is the difference in usage or definition of
' """ '
and
' "\"" '
?
Thanks.
Anonymous
Not applicable
Author

the backslash tells java to interpret the next character *literally* not as a part of the program. since double quotes are used to delimit strings in java programs, you need to backslash them when you want to refer to the double quote itself.
Anonymous
Not applicable
Author

Since my project that I have created in Talend is java, I have to select the ' "\"" ' version,
but if it was in Perl, I would choose ' """ ' version...for the same file?
Anonymous
Not applicable
Author

Hello
In perl project, set
escape char '"'
text enclosure '"'
Bes regards

shong
Anonymous
Not applicable
Author

So for the same file, I have to know how the language I select functions and handles quotes to know which escaping and enclosing method to chose?
Usability wise, it would make more sense to have the application handle that behind the scenes and allow me to just choose the actual enclosure and escape string rather than to know what is going to happen within the code.
So the choices should be just ' " ' or ' \" '
hope that makes sense.
thanks.
_AnonymousUser
Specialist III
Specialist III

\ worked for me as suggested by Shong in #2
Cheers !
Bharat
cdhemant
Contributor II
Contributor II

Hello

 

I have similar issue with below format.

 

A|B|C|D

1|"Hello <carriagereturn>

world<carriagereturn>

"bob"<carriagereturn>

welcome to<carriagereturn>

talend<carriagereturn>

testing"|77|66

 

in this case "\"" does not work

 

Thanks

Hemant