I tried to export a CSV file. I've set the delimiter to , and the quote char to ". If there's a " in the string supplied from the source, Datastage seems to not handle it correctly: The file is then read wrong (for example with view data) and in my opinion it is made wrong (no escaping done). However, I can't simply change the quote char to another one as I can't make sure that this character isn't in the input.
Doesn't Datastage support escaping of the quote chars? For example, Excel escapes the double quote with another one. So if you have a field with a
In your case you have to do preprocessing before using the CSV file in sequential stage.
Use this command to remove quotes around a string and reduce two consecutive double quotes to single double quote and remove Quote setting from Field defaults
Did you try specifying the quote character specifically at the column level? Can you try doing that? I remember doing something similar but can't recollect the exact steps.
anbu wrote:Use this command to remove quotes around a string and reduce two consecutive double quotes to single double quote and remove Quote setting from Field defaults
Of course, you may be expecting a reliable subset of the myriad quirks that various CSV implementations generate, in which case the above regex may be acceptable. Otherwise, if you want to preproces your file, you could use a Perl script with the module Text::CSV as a preprocessor.