-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quoting bug #37
Comments
The command option "–enclose-all(-Q)" has an effect on newly created files specified by the "--out" option and in CREATE TABLE statements, and for existing files, the information determined at the time of loading is used.
As a workaround, you can use ALTER TABLE statement to set ENCLOSE_ALL attribute for the updated file.
When saving a file with ENCLOSE_ALL set to false, the values in the file are automatically enclosed only if its value contains a character specified as a delimiter. I will fix to automatically enclose values containing double-quotes. |
I have found out that quote symbol as a first symbol of a field can break the reader, if this quote is not a field quoting, but an ordinary quote. Tested with v1.13.1.
The source data is:
This is a semicolon-separated csv. I've replaced the text with blocks for convinience.
Let's update this file
test_trgt.csv
:The file will become this:
As you can see, on the second line the field quotes and double quotes (as quoted quotes) have been removed.
Let's try to read this resulting file:
This will result an error:
[L:1 C:15] data parse error in file … test_trgt.csv: line 2, column 21: unexpected " in field
.I have tried any variants of
-k
and-Q
options, but cannot make it read again correctly. The file is correct, field does not need to be quoted, but quote mark as a first field symbol seems to be breaking it.The text was updated successfully, but these errors were encountered: