-
Notifications
You must be signed in to change notification settings - Fork 5
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
When a table is not expressed as alias the referencing isn't correct later #43
Comments
As far as I can tell this helper function is only designed to replace the table reference and not prefixed references to columns in that table, which wouldn't be necessary when using an alias anyway. I can't readily think of a solution to this one, ideas welcome! |
Easiest would be to add documentation to always alias your tables but a fix that considers this in the package would be best. |
Thanks for filing that bug @fgarzadeleon! |
@thecasper2 I got some response from Tobiko Data (the maintainers of sqlglot). Seems that |
@thecasper2 @fgarzadeleon I might have found a solution: #44 |
Using a simple query:
With models:
Because table
a
does not havea AS a
this fails. Because the table has now been replaced withslq_mock__a
but it is still being referenced asa
ina.col1
.The text was updated successfully, but these errors were encountered: