-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[MSSQL -> Snowflake] Normalization issue with ' in columns names #4729
Comments
can you attach a catalog.json or log of your sync? Line 78 in 8b45744
|
@ChristopheDuong not sure what you're asking, the logs are there on the issue |
@philippeboyd you can access the
Could you share for your case? |
@marcosmarxm apologies, but |
Yes, I saw your logs but it's not enough info to see what was not parsed/interpreted correctly.
it would helpful to have a glance at the names of your streams and columns to see why
was not applied properly... having the full catalog.json would let us run the normalization and see the generated SQL file to debug.
Could you recreate a source database with a toy example without client information to illustrate your issue? where you can more easily share logs and catalogs? Thanks |
@ChristopheDuong from the doc of your
My issue seems to be with the data itself (the value) of the column What if my column's value contains a single quote here's the SQL i'm referring too in Same issue with the This can eventually lead to SQL injection attacks... |
So this python script manipulates only database schema definitions, it never sees actual user data (not possible to do SQL injection attacks there) It's only when the target destination engine executes the SQL-assembly code at runtime that it processes user data. As a conclusion, the generated files that you posted screenshots of are really fishy because they seem to contain actual data. (thus, I am questioning if the produced catalog.json by your source is really valid?) Do you really expect to have a table with columns named as follows?
or it should maybe rather look something like this instead:
|
@ChristopheDuong thanks for your answer as it brought up new questionings on my end... After investigating directly on our client's DB and after a few facepalms, I realized that it is indeed the columns' name that are problematic The issue remains though. I managed to retrieve the
As to why it's done like that; no clue! Apologies for my previous comments that brought up confusion. Hope this helps... |
Enviroment
Current Behavior
It seems like the issue could be link to wrongfully prepared statements, thus SQL injection. The first syntax error appears to be
syntax error line 34 at position 65 unexpected 't'
which indicates that the value is probably something likedon't
. The single quote is not escaped in the database resulting in an SQL error during normalization.Expected Behavior
The normalization process should be handled with proper prepared statements and not string injection inside the SQL queries.
Logs
LOG
Steps to Reproduce
The text was updated successfully, but these errors were encountered: