Skip to content

feat: databricks tags merge behavior#1340

Merged
sd-db merged 3 commits intodatabricks:1.12.latestfrom
canbekley:feat/databricks-tags-merge-behaviour
Apr 28, 2026
Merged

feat: databricks tags merge behavior#1340
sd-db merged 3 commits intodatabricks:1.12.latestfrom
canbekley:feat/databricks-tags-merge-behaviour

Conversation

@canbekley
Copy link
Copy Markdown
Contributor

@canbekley canbekley commented Feb 28, 2026

Resolves #1184
Resolves #1188

Description

defining databricks_tags on a lower configuration level currently completely replaces/clobbers any tag configuration defined at higher level (e.g. in dbt_project.yml). this is very unintuitive for dictionary type configurations and is usually solved with additive dictionary merging behaviour (e.g. meta, tags, grants etc.).

dbt-common implements the MergeBehavior enum that can be used to set the meta_data of the dataclass fields in DatabricksConfig, which is handled by the BaseConfig. defining MergeBehavior.Update for databricks_tags basically makes it an additive dictionary field.

Note:

  • this implementation could probably be extended to the tblproperties configuration as well, as those suffer the same limitations at the moment. I could add it in here if you like.

Checklist

  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt-databricks next" section.

@canbekley canbekley changed the title Feat/databricks tags merge behavior feat: databricks tags merge behavior Feb 28, 2026
@canbekley canbekley force-pushed the feat/databricks-tags-merge-behaviour branch from 13b6cdd to 7efe749 Compare March 10, 2026 19:52
@sd-db sd-db requested a review from jprakash-db as a code owner April 23, 2026 12:48
@sd-db sd-db changed the base branch from main to 1.12.latest April 23, 2026 13:58
Signed-off-by: Can Bekleyici <can.bekleyici@deepl.com>
@sd-db sd-db force-pushed the feat/databricks-tags-merge-behaviour branch 3 times, most recently from 07f6d2f to 7d2bbe5 Compare April 28, 2026 06:12
@sd-db sd-db force-pushed the feat/databricks-tags-merge-behaviour branch from 7d2bbe5 to fd45c61 Compare April 28, 2026 06:20
@sd-db
Copy link
Copy Markdown
Collaborator

sd-db commented Apr 28, 2026

/integration-test

@github-actions
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  dbt/adapters/databricks
  impl.py
Project Total  

This report was generated by python-coverage-comment-action

@github-actions
Copy link
Copy Markdown

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

Run details.

@sd-db sd-db self-assigned this Apr 28, 2026
@sd-db sd-db merged commit f6a8593 into databricks:1.12.latest Apr 28, 2026
10 checks passed
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.

Feature Request: Databricks tags in a project level Databricks Tags - Parity with dbt Tags

2 participants