Error building models as views with no schema binding
- Dominant language
- PLpgSQL
- Stars
- 105
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
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.
```
models:
# Use late-binding views to avoid blocking referenced tables
bind: false
```
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 the `pg_catalog` schema, so fixing this is as simple as qualifying those view references like `pg_catalog.stl_wlm_query`
This is similar to this issue https://stackoverflow.com/a/54447584/1335793
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.