Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Fixes

- Truncate (128 charactesr max) and escape special characters for default query tag values
- Fix bug where persist_docs did not update existing comments on materialized views ([#1275](https://github.com/databricks/dbt-databricks/discussions/1275))

## dbt-databricks 1.11.2 (Nov 18, 2025)

Expand Down
3 changes: 2 additions & 1 deletion dbt/include/databricks/macros/adapters/persist_docs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
{% endmacro %}

{% macro alter_relation_comment_sql(relation, description) %}
COMMENT ON {{ relation.type.render().upper() }} {{ relation.render() }} IS '{{ description | replace("'", "\\'") }}'
{#- ignore relation type; correct keyword is always `TABLE`: https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-comment -#}
COMMENT ON TABLE {{ relation.render() }} IS '{{ description | replace("'", "\\'") }}'
{% endmacro %}

{% macro alter_column_comments(relation, column_dict) %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@
{% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}
{% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}

{%- do persist_docs(target_relation, model) %}

{{ run_hooks(post_hooks, inside_transaction=True) }}

{% endmacro %}