-
Notifications
You must be signed in to change notification settings - Fork 36
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: columns that match SQL reserved words cause failure during insert #7
Labels
bug
Something isn't working
Comments
aaronsteers
changed the title
airbyte-lib: Escape field names in SQL cache loading
Escape field names in SQL cache loading
Feb 6, 2024
aaronsteers
changed the title
Escape field names in SQL cache loading
Bug: columns that match SQL reserved words cause failure during insert
Feb 6, 2024
aaronsteers
changed the title
Bug: columns that match SQL reserved words cause failure during insert
🐛 Bug: columns that match SQL reserved words cause failure during insert
Feb 6, 2024
Resolved by: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When the final table is created in SQL caches, field names matching SQL keywords cause the query to break.
For example when reading from the pokeapi connector, the following query is issued:
As
order
is also a SQL keyword, the query fails.This is a problem throughout the SQLCacheBase class which uses string concatenation to interface with the SQL database.
As a stopgap solution the individual places in the code can be patched by escaping field names one by one to avoid having to refactor the whole class:
However, mid term the refactor to sqlachemy should be performed, also to avoid security issues via SQL injection.
The text was updated successfully, but these errors were encountered: