Skip to content

fix: apply column_tags on V1 incremental materialization#1520

Merged
sd-db merged 2 commits into
mainfrom
sd-db/fix/v1-incremental-column-tags
Jun 18, 2026
Merged

fix: apply column_tags on V1 incremental materialization#1520
sd-db merged 2 commits into
mainfrom
sd-db/fix/v1-incremental-column-tags

Conversation

@sd-db

@sd-db sd-db commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Description

V1 (use_materialization_v2: false, the default) incremental models silently dropped column-level databricks_tags. The V1 branch of incremental/incremental.sql never called apply_column_tags on its create, full-refresh/recreate, or merge-changeset paths — while V1 table create (fixed in #1307) and the entire V2 path both apply them. The model builds successfully but system.information_schema.column_tags stays empty, with no error or warning.

This applies column tags on all three V1 incremental paths, mirroring table.sql and apply_config_changeset. Follow-up to #1307, which fixed the identical gap for the table materialization only.

Tests

  • column_tags/test_column_tags.py::TestColumnTagsIncrementalV1 — create (run 1) + merge-change (run 2); fails on main, passes here.
  • column_tags/test_column_tags.py::TestColumnTagsIncrementalV1FullRefresh — column tags survive a dbt run --full-refresh.
  • tests/unit/macros/relations/components/test_column_tags_macros.pyapply_column_tags / alter_set_column_tags render (incl. the view → ALTER TABLE special case) and the empty-diff no-op (idempotency).

Checklist

  • Changelog entry added (### Fixes)
  • Functional + unit/macro tests added

@sd-db sd-db requested a review from jprakash-db as a code owner June 15, 2026 13:44
@sd-db sd-db force-pushed the sd-db/fix/v1-incremental-column-tags branch from ac5c07f to 0b556e3 Compare June 15, 2026 13:45
V1 (use_materialization_v2=false, the default) incremental models silently dropped column-level databricks_tags: the V1 branch of incremental.sql never called apply_column_tags on create, on full-refresh/recreate, or in the merge configuration changeset, while V1 table create and the V2 path both apply them.

Apply column tags on all three V1 incremental paths, mirroring table.sql and apply_config_changeset. Follow-up to #1307, which fixed the same gap for tables only. (Note: on Delta, full-refresh uses CREATE OR REPLACE which already preserves column tags, so that hunk is defensive/consistency; the observable bug was create + config-change.)

Tests: TestColumnTagsIncrementalV1 (create + merge-change) and TestColumnTagsIncrementalV1FullRefresh in the column_tags functional suite; test_column_tags_macros.py pins the apply/alter render and the empty-diff no-op (idempotency).
@sd-db sd-db force-pushed the sd-db/fix/v1-incremental-column-tags branch from 0b556e3 to ba11357 Compare June 15, 2026 14:22
@github-actions

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@sd-db

sd-db commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

/integration-test

@github-actions

Copy link
Copy Markdown

Integration tests dispatched for PR #1520 by @sd-db. Track progress in the Actions tab.

@github-actions

Copy link
Copy Markdown

Integration results for PR #1520 — UC cluster ✅ success · SQL warehouse ❌ failure · All-purpose cluster ✅ success · Shard coverage ✅ success

Run details.

@github-actions

Copy link
Copy Markdown

Integration results for PR #1520 — UC cluster ✅ success · SQL warehouse ✅ success · All-purpose cluster ✅ success · Shard coverage ✅ success

Run details.

@sd-db sd-db merged commit ce47403 into main Jun 18, 2026
9 checks passed
@sd-db sd-db deleted the sd-db/fix/v1-incremental-column-tags branch June 18, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants