diff --git a/core/dbt/adapters/base/relation.py b/core/dbt/adapters/base/relation.py index dccfdb3d534..fa35df241c9 100644 --- a/core/dbt/adapters/base/relation.py +++ b/core/dbt/adapters/base/relation.py @@ -10,11 +10,13 @@ class BaseRelation(APIObject): Table = "table" View = "view" CTE = "cte" + MaterializedView = "materializedview" RelationTypes = [ Table, View, - CTE + CTE, + MaterializedView ] DEFAULTS = { diff --git a/plugins/snowflake/dbt/include/snowflake/macros/adapters.sql b/plugins/snowflake/dbt/include/snowflake/macros/adapters.sql index 2870448b22a..8593b735e7f 100644 --- a/plugins/snowflake/dbt/include/snowflake/macros/adapters.sql +++ b/plugins/snowflake/dbt/include/snowflake/macros/adapters.sql @@ -58,6 +58,7 @@ table_schema as schema, case when table_type = 'BASE TABLE' then 'table' when table_type = 'VIEW' then 'view' + when table_type = 'MATERIALIZED VIEW' then 'materializedview' else table_type end as table_type from {{ information_schema }}.tables