You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Column-level databricks_tags are emitted as one ALTER ... ALTER COLUMN ... SET TAGS statement per tagged column. Several materialization paths replay the full configured column-tag map, even on reruns where the relation may retain its existing column tags. With many tagged columns, these writes can dominate model runtime.
Column tags are currently applied by the table, incremental, view, materialized_view, streaming_table, and snapshot materializations.
Incremental full refresh, Snapshot reruns, View replacement, and Materialized View or Streaming Table build paths call apply_column_tags with the full model configuration.
Materialized View and Streaming Table relation configs do not currently include ColumnTagsProcessor, so column tags are not part of their configuration changesets.
This should be tracked independently from relation-level databricks_tags, because the preservation and update behavior is per column and can differ by materialization lifecycle.
Expected behavior
For each supported materialization and lifecycle operation:
Verify through server-observable functional tests whether the operation preserves existing column tags.
When tags are preserved, fetch column-tag metadata only when column tags are configured and apply only new or changed keys.
When the relation is newly created or dropped and recreated, apply the full desired column-tag map without fetching stale metadata.
Preserve remote-only tags under the existing set-only reconciliation semantics.
Ensure an unchanged rerun emits no column-tag writes when preservation is guaranteed.
Incremental ordinary rerun and in-place full refresh.
Snapshot rerun of the retained target table.
View replace and view_update_via_alter paths.
Materialized View refresh, alter, and replace paths.
Streaming Table refresh, alter, and replace paths.
View, Materialized View, and Streaming Table optimization should only be enabled after tests prove that the relevant Databricks operation retains column tags. Existing tests reapply the configured tags after lifecycle operations, so they do not establish preservation by themselves.
Fresh creates and drop-and-recreate paths are explicitly out of the optimization: they must continue to apply all configured column tags.
Describe the problem
Column-level
databricks_tagsare emitted as oneALTER ... ALTER COLUMN ... SET TAGSstatement per tagged column. Several materialization paths replay the full configured column-tag map, even on reruns where the relation may retain its existing column tags. With many tagged columns, these writes can dominate model runtime.Column tags are currently applied by the
table,incremental,view,materialized_view,streaming_table, andsnapshotmaterializations.Current reconciliation is inconsistent:
ColumnTagsConfigthrough a relation changeset. perf: emit only changed column databricks_tags keys in ALTER COLUMN SET TAGS #1668 narrows that diff to new or changed tag keys.apply_column_tagswith the full model configuration.ColumnTagsProcessor, so column tags are not part of their configuration changesets.This should be tracked independently from relation-level
databricks_tags, because the preservation and update behavior is per column and can differ by materialization lifecycle.Expected behavior
For each supported materialization and lifecycle operation:
The test matrix should cover:
view_update_via_alterpaths.View, Materialized View, and Streaming Table optimization should only be enabled after tests prove that the relevant Databricks operation retains column tags. Existing tests reapply the configured tags after lifecycle operations, so they do not establish preservation by themselves.
Fresh creates and drop-and-recreate paths are explicitly out of the optimization: they must continue to apply all configured column tags.
Related