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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Gunner49
Contributor
Contributor

Escape and Text Enclosure for csv

Hi All,

I'm currently facing an issue while reading an input csv file where the data is enclosed within double quotes.

Below is a scenario where the data is as follows :

id;name;desc

1;"Mark";"Test Data"

2;"David";"Test Data Ha.""

3;"Steven";"\"

Here , within the data there are double quotes and a backslash within the desc column and I'm unable to escape both and hence the data is being shifted.

Ex : Escape char -

"""

Text Enclosure -

"""0693p00000AaIGBAA3.png

Escape char - "\\" Text Enclosure - """

0693p00000AaIGaAAN.png

Also, the input files are huge (30+ GB) so would like to avoid having to use script. Other escape characters were also tried , but with no success. ("\"")

Any suggestions?

Thanks

Labels (3)
2 Replies
manodwhb
Champion II
Champion II

@Nauman Hussain​ , you do one thing after tfileinputdelimited use the tJavarow or tMap to replace " with empty ,so that you can avoid the extra " .

 

Thanks,

Manohar

Gunner49
Contributor
Contributor
Author

Hi @Manohar B​ ,

 

Thank you.

That's an option for the 2nd record , but the 3rd record with desc column "\" is being shifted.

I can remove the double quote, but is there a way to handle the 3rd record ?

Here, the escape character and text enclosure are used as """

 

Input :

 

Output :

Thanks

Nauman