-
Notifications
You must be signed in to change notification settings - Fork 158
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When creating a materialized view model, setting persist_docs to true in dbt_project.yml should add comments to the created table in Clickhouse. For materialized view models created with append = True, this works fine. However, when append = False then the table is recreated with the materialized view refresh, and doesn't keep the column descriptions.
Steps to reproduce
- Set persist_docs: true in the project yaml file
- Create a materialized view test_model.sql, with settings like the following:
{{
config(
materialized='materialized_view',
engine='ReplacingMergeTree()',
order_by=('col1'),
refreshable={
'interval': 'EVERY 1 DAY',
'append': False
},
settings={"allow_nullable_key": 1}
)
}}
--mv:begin
SELECT
now()::DateTime64 AS col1,
today()::Date AS col2
--mv:end
- Create a schema file like:
version: 2
models:
- name: test_model
description: A test model
columns:
- name: col1
type: DateTime64
description: The first column
- name: col2
type: Date
description: The second column
Expected behaviour
The column descriptions should propagate to the Clickhouse column Comment field.
I tried setting schema specifically for the materialized view so that when it recreated the table that would get passed on, but it looks like materialized view schemas aren't pushed through at all.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working