Skip to content

feat: databricks tags merge behavior#1340

Open
canbekley wants to merge 3 commits intodatabricks:mainfrom
canbekley:feat/databricks-tags-merge-behaviour
Open

feat: databricks tags merge behavior#1340
canbekley wants to merge 3 commits intodatabricks:mainfrom
canbekley:feat/databricks-tags-merge-behaviour

Conversation

@canbekley
Copy link
Contributor

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:

  • because of some test overlaps, the branch here is branched off of feat/support-for-key-only-databricks-tags from pull request: feat: support key-only databricks_tags #1339
  • 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.

Signed-off-by: Can Bekleyici <can.bekleyici@deepl.com>
Signed-off-by: Can Bekleyici <can.bekleyici@deepl.com>
Signed-off-by: Can Bekleyici <can.bekleyici@deepl.com>
@canbekley canbekley changed the title Feat/databricks tags merge behavior feat: databricks tags merge behavior Feb 28, 2026
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

1 participant