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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
shameer1
Contributor II
Contributor II

Text Enclosure under CSV option of tfileOutputDelimited

Suppose I input file with data below (1st row as header)

Column1|Column2|Column3|Column4
XYZ||ABC|
|LMN|ADI|MLN
GHI||LLL|AAA

I am expecting the output to have value as below

Output file data :-

Column1|Column2|Column3|Column4
"XYZ"||"ABC"|
|"LMN"|"ADI"|"MLN"
"GHI"||"LLL"|"AAA"

Whereever we have some value in a field ,it should be within double quotes (""). If no value is present in that field then no double quotes required. Fields are separated by |.

I am not able to do this using Text Enclosure under CSV option of tfileOutputDelimited.

Labels (2)
2 Replies
TRF
Champion II
Champion II

You need an additional subjob to rework the outputfile after it has been produced with your actual tFileOutputDelimited.

In this new subjob, read the file with a tFileInputInputFullRow then in a tMap replace all the "" with the following expression:

row1.line.replaceAll("\"\"", "")

Then rewrite the output file with another tFileOutputDelimited component.

 

Anonymous
Not applicable

check csv options

0683p000009M51H.png