How to Define Constants at Bundle Level in Databricks Asset Bundles for Use in Notebooks?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
I'm working with Databricks Asset Bundles and need to define constants at the bundle level based on the target environment. These constants will be used inside Databricks notebooks.
For example, I want a constant gold_catalog to take different values depending on the target:
For dev target → gold_dev01 For uat target → gold_tst01 For prod target → gold_prod01 Instead of setting these values using task-level parameters inside workflows or jobs, I’d prefer to define them at the bundle level, so they can be accessed globally within the asset bundle and used inside notebooks.
My Questions:
- Is there a way to define such constants at the bundle level in Databricks Asset Bundles?
- What is the best way to achieve this without defining task-level parameters?
- Would using environment variables, bundle config files, or another approach be recommended to access them in Databricks notebooks?
Any guidance or best practices would be appreciated!
0 REPLIES 0

