Databricks asset bundles in Python: referencing variables
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2025 08:04 AM
Hey,
I am using DAB's and in my .yml files I can reference my variables set in my databricks.yml like this:
git_branch: ${var.branch}
I would like to do the same thing in my DAB's written in Python but I cannot find any documentation on how to do this.
I would like to do the same thing in my DAB's written in Python but I cannot find any documentation on how to do this.
How can I do this?
Thanks!
Thanks!
Labels:
- Labels:
-
Workflows
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2025 10:11 AM
Hi @daan_dw ,
To reference variables defined in your databricks.yml in Python DAB code, define your variables class and use bundle.resolve_variable
https://docs.databricks.com/aws/en/dev-tools/bundles/python/#access-bundle-variables