-
Notifications
You must be signed in to change notification settings - Fork 120
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
check-script-has-no-table-name is failing when using lateral flatten #7
Comments
Hi Martin, thanks for bug reporting! I appreciate you are trying
Can you try to run tldr; I do not think it is needed to use the presence of
|
Glad to hear that the parsing is actually CTE-aware. My apologies, I made assumptions and oversimplified the example model in the bug report. Upon closer inspection, I found the root cause. The error is actually caused by the usage of a lateral flatten function (Snowflake), I had not noticed the comma in the error message:
The code of that model looks like this:
When I remove the lateral flatten, the script passes successfully. |
Ahhh it seems it parse table name as |
Fixed in #11. If you do not wait for a new version of |
hi @tomsej ,
|
Describe the bug
See updated description of the bug.
Thecheck-script-has-no-table-name
pre-commit hook is confusing CTEs with tables, and fails with code like this:It reports that "source" and "renamed" are tables even though they are not, even though it looks the same from a code perspective.I think this hook should perhaps fail only at the presence ofschema.table
ordatabase.schema.table
references, unless we can make this hook smarter by being aware of the CTEs defined in the model.Version:
v0.1.1
The text was updated successfully, but these errors were encountered: