-
Notifications
You must be signed in to change notification settings - Fork 189
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
Ft Add materialization for Snowflake materialized view object type #181
Conversation
This reverts commit e71e4ce.
Hi @dbt-labs/oss-maintainers, hoping to get a review here. I would like feedback on whether any of these changes should go to Getting this change merged in would allow my organization to have all of our snowflake objects managed in one place. Currently, our materialized views are managed in a way that is disjoint and prone to failure. It would also address issue dbt-labs/dbt-core#1162 and add the feature that has been desired since 2018. Thanks! |
@leahtessem Thanks for the PR, and sorry for the delay! I owe you a response here. To make a long story short, I think we're unlikely to merge this into I'd like to say more about that, though. It's always worth reexamining our long-standing assumptions. I'll plan to swing back in the next few days with a fuller explanation. |
Closing as my current thinking is that we won't support Snowflake's Materialized Views, but Dynamic Tables instead. Thanks a lot for your contribution, it will inspire our work going forward on that topic. |
Resolves #1162
This is an issue opened for dbt-core repository, but because the code I have written is specific to (and only tested on Snowflake), I feel that it fits in this repository. This PR (or parts of it) can be adapted and moved to live in
dbt-core
if desired.Description
cluster_by
config entrySnowflakeRelationType
with materialized view type (including space)SnowflakeRelation
to determine if relation is MVsnowflake__list_relations_without_caching
macro to include materialized viewsshow terse objects
so it now has to be two calls (one for tables & one for views)create or replace
-ing materialized view similar to how the base view macro was built out indbt-core
Handling switching between view types
dbt-core
)Added MVs in the switching relation type tests as well as their own test file
Checklist
CHANGELOG.md
and added information about my change to the "dbt-snowflake next" section.