-
Notifications
You must be signed in to change notification settings - Fork 235
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
support contracts on models materialized as view #670
Conversation
Part of dbt-labs/dbt-core#7120 |
create temporary view {{ relation }} as | ||
create temporary view {{ relation }} | ||
{% if config.get('contract', False) -%} | ||
{{ get_assert_columns_equivalent(sql) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The argument coming in is compiled_code
whereas sql
is getting passed in here. Is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I dug in here because of concern for python models (not currently supported) and this code is only hit for incremental models that already exist as tables. dbt-labs/dbt-core#6755 is the task to make sure those cases are covered so I'm removing this logic as it does not directly relate to models materialized specifically as view.
resolves #654
Description
Support contracts for view materializations.
Checklist
changie new
to create a changelog entry