-
Notifications
You must be signed in to change notification settings - Fork 50
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
remove escape percent signs from select_sql #16
Conversation
For table and column names, % should not be written as %% in a select statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return statement
Was able to run this code against a MSSQL db with percent signs in column names after making a similar fix done here, but adding back the return stmt (line 90). Running using the code in master was getting the same error as described in the original PR comment. |
As a FYI, the escaping of the % has come from the original mysql code. Having read this change, I can see why it has been requested. I do wonder if this line to escape the % is removed, whether it will have other side effects, perhaps mysql just required the % sign to be escaped because it was getting confused with Python variable substitution? |
indeed this seems to be ported from mysq, which needed the % to be escaped to %%, whereas here the MSSQL colomn names are escape with double quotes in stead of back tick in the mysql-tap. It's clear that with the double quotes the % does not need to be replaced by %% for MSSQL-tap |
@wintersrd could you consider to add this to the V2? |
One issue that I found with using this tap is sending the singer records to target-snowflake(pipelinewise) causes a python error. At some point it does string formatting on the column names and the '%' in the column name is read as a variable, not as a literal. Rather than moving forward with this tap and target combo, I am giving up and using a different pattern. |
Closing Pull Request as this has been actioned : #39 |
For table and column names, % should not be written as %% in a select statement.
this results in an error when a column or table has a
%
character in the name.