diff --git a/CHANGELOG.md b/CHANGELOG.md index 1031aca48..d582ddcb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - Warn when `contract.enforced: true` is set on a `materialized_view` model ([#1279](https://github.com/databricks/dbt-databricks/issues/1279)) - Fix `materialized_view` models with `databricks_tags` silently going stale on `dbt run`. `MaterializedViewAPI._describe_relation` was not fetching `information_schema.tags`, so existing tags always parsed as empty, producing a spurious tag diff that routed the materialization to `ALTER ... SET TAGS` instead of `REFRESH MATERIALIZED VIEW` ([#1419](https://github.com/databricks/dbt-databricks/issues/1419)) - Fix `dbt docs generate` failing with `RuntimeError: Tables contain columns with the same names ... but different types` during catalog merge across schemas ([#1392](https://github.com/databricks/dbt-databricks/issues/1392)) +- Fix snapshots not applying databricks_tags on columns ([#1441](https://github.com/databricks/dbt-databricks/issues/1441)) ## dbt-databricks 1.11.7 (Apr 17, 2026) diff --git a/dbt/include/databricks/macros/materializations/snapshot.sql b/dbt/include/databricks/macros/materializations/snapshot.sql index c0af068c3..d00a80d20 100644 --- a/dbt/include/databricks/macros/materializations/snapshot.sql +++ b/dbt/include/databricks/macros/materializations/snapshot.sql @@ -106,6 +106,11 @@ {%- do apply_tags(target_relation, tags) -%} {%- endif -%} + {% set column_tags = adapter.get_column_tags_from_model(config.model) %} + {% if column_tags and column_tags.set_column_tags %} + {{ apply_column_tags(target_relation, column_tags) }} + {% endif %} + {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %} {% do persist_docs(target_relation, model) %}