dbt-snowflake
dbt-snowflake copied to clipboard
[FEATURE] materialized views
resolves #870 docs dbt-labs/docs.getdbt.com/#
Problem
materialized views are currently not support for Snowflake. rather, dynamic tables were implemented, to be more consistent with other provider's concept of materialized views. however, there are still valid use cases for MVs, and so I figured it take a shot at implementing them.
Solution
this is my first attempt at contributing to dbt, so forgive me if this is not a great solution. i essentially reused the logic for views, with some minor changes to support the materialized version. i also added a check to the SnowflakeRelation
object to see if a relation was an MV, for support within the macros.
Checklist
- [X] I have read the contributing guide and understand what's expected of me
- [X] I have run this code in development and it appears to resolve the stated issue
- [x] This PR includes tests, or tests are not required/relevant for this PR
- [ ] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX