Skip to content
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

Bug in CSV encoding strings with doble quotes at the beginning #4

Open
relonger opened this issue May 15, 2017 · 0 comments
Open

Bug in CSV encoding strings with doble quotes at the beginning #4

relonger opened this issue May 15, 2017 · 0 comments

Comments

@relonger
Copy link

If you try to insert_rows with string value like:

''The String'' with continuation

(there is 2 single quotes there)
Default Ruby CSV gem encode this string without " quotes, because there isn't any characters required to be encoded. But Clickhouse consider this 2 single quotes as field quotation mark and trigger an error: "comma required before with continuation"

Now there is no way to change CSV generation mode without patching the gem. (Adding :force_quote=>true solves the problem). So the problem is quite unpleasant. Probable you should add CSV options to insert_rows() arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant