Skip to content
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

Fix/qualify base model schemas #27

Merged
merged 3 commits into from
Jul 31, 2020

Conversation

davehowell
Copy link

This PR adds the pg_catalog schema to all the base models to cope with the requirement of "late binding views" (with no schema binding) that all objects must be qualified by schema, e.g. from <schema>.<objectname> rather than just from <objectname>

see #26

For consistency, I also added a base model stv_partitions , because the underlying system view was being directly referenced by the redshift_admin_table_stats view.

Testing

All of the models in the ./base directory are ephemeral as specified in the dbt_project.yml file, so they aren't directly tested by their instantiation, however, all of these base models are referenced by models in the ./views directory in this package which are instantiated. These views are effectively serving as integration tests when they are run.

I ran this both with a global bind: false (all views will be created without schema binding) in the dbt_project.yml file and without, and it now runs successfully with that specification.

@Limess
Copy link

Limess commented Jul 27, 2020

👋🏻 This seems like a sensible change, is there a reason it hasn't been merged or has it just been forgotten about?

Copy link
Contributor

@clrcrl clrcrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this out locally today and it all seems to work

@clrcrl clrcrl merged commit 93eb900 into dbt-labs:master Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants