-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Materialized Views not updating cache #9959
Conversation
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 1.7.latest #9959 +/- ##
==============================================
- Coverage 86.69% 86.67% -0.02%
==============================================
Files 179 179
Lines 26662 26662
==============================================
- Hits 23115 23110 -5
- Misses 3547 3552 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -39,7 +39,7 @@ | |||
on {{ relation }} {% if index_config.type -%} | |||
using {{ index_config.type }} | |||
{%- endif %} | |||
({{ comma_separated_columns }}); |
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.
removing ;
as it doubles up with one at end of statement causing error
…c versions incase we are not catching the dispatch as a layer of call or in drop case of it being a explicit return call
plugins/postgres/dbt/include/postgres/macros/relations/materialized_view/rename.sql
Outdated
Show resolved
Hide resolved
core/dbt/include/global_project/macros/relations/materialized_view/drop.sql
Outdated
Show resolved
Hide resolved
core/dbt/include/global_project/macros/relations/materialized_view/rename.sql
Outdated
Show resolved
Hide resolved
…m renabmeable (takes us back to previous functionality)
The current fix seems to be to remove ability of the cause seems to be a dependency between renaming |
linked issue: https://github.com/dbt-labs/adapters-team-private/issues/127
this pr would eventually need to be backported to 1.6 and have similar changes made in
dbt-adapters
Problem
We do not appear to be updating cache for MV functionality like drops, renames, adds which is causing catalog mismatch errors in runs especially between MV's that are dependent on each other
Solution
Current:
we will remove
materialized_view
from therenameable_relation
variable thus reverting us to the create and drop functionality that we were seeing before the introduction in #9682Attempted:
Update our various macros to either use commonly used Python functions from the base
impl.py
such asdrop_relation
, andrename_relation
or use the more primitive version designed in the base adapter e.gcache_dropped
andcache_renamed
to ensure we are maintaining parity with database expectation.TODO:
Checklist