I have an interesting issue reading a CSV file. The ‘Universal Reader’ reads the file just fine, albeit a little slow. The ‘Delimited Reader’ fails at the last record, presumably missing a line terminator…
My question is, why does one fail and not the other?
I am using the exact same Meta Data. The last field is delimited by ‘\n’, all others by ‘,’ and no record delimiter.
Any thoughts?
Thanks,
Shane
The problem was that my fields were enclosed in double quotes " and so were my delimiters, including my last delimiter “\n”. I didn’t realize that Clover treated the " in the delimiter as a literal. I removed the trailing " on the \n and everything works now.
What is the proper way to handle quoted data? Other products have an ‘enclosure’ character, something that appears before and after each field, other than the delimiter…
Thanks,
Shane
Proper way to handle quoted data is to do nothing special The Delimiter Data Reader removes leading and tailing quoting characters by default. And the Universal Data Reader has for this purpose a special parameter ‘quotedStrings’, which should be set to true.
Martin