-
Notifications
You must be signed in to change notification settings - Fork 41
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
Error building models as views with no schema binding #26
Comments
Thanks @davehowell - are you able to send through a PR for this fix? |
@drewbanin If I I noticed that some of the macros already include the |
This Discourse article outlines the best workflow for contributing to packages: https://discourse.getdbt.com/t/contributing-to-a-dbt-package/657 |
PR Added. I also looked at the macros that are missing schema qualification. Some are referenced in the view models so are being indirectly tested that way, but many don't have existing tests; there is no embedded "integration_tests" project in this package as there is in the Some other macros have AWS dependencies; I might look at adding a barebones integration_test later, but this works for now. |
In my
dbt_project.yml
I specify that all views should not use schema binding i.e. "late binding views" which is recommended for redshift to avoid errors.This is because if dbt has a view that depends on a table materialization model, it will error when trying to drop/create the view.
The problem here is that the views https://github.com/fishtown-analytics/redshift/tree/master/models/views do not specify schemas in the underlying ephemeral models. The system views like
stl_wlm_query
live in thepg_catalog
schema, so fixing this is as simple as qualifying those view references likepg_catalog.stl_wlm_query
This is similar to this issue https://stackoverflow.com/a/54447584/1335793
The text was updated successfully, but these errors were encountered: