Skip to content

Promoting one codebase across dev, test, and prod with bundle variables and overrides

Databricks Asset Bundles let you define one codebase and deploy it consistently across dev, test, and prod using a single databricks.yml with target-specific overrides. Variables parameterize values like cluster sizes, paths, and job schedules so each target gets appropriate settings without duplicating code. This keeps environment differences declarative and version-controlled rather than hardcoded.

1 · Learn the must-know

  • Bundle configuration is defined in databricks.yml, with a top-level variables block declaring defaults and a targets block (e.g., dev, staging, prod) that can override those variables or resource settings per environment.
  • The mode: development setting on a target enables features like resource name prefixing and auto-pausing schedules to prevent dev runs from colliding with production resources.
  • Variables can be overridden via the CLI at deploy time using --var, via environment variables, or in the target-specific variables block, with CLI/env taking precedence over file defaults.
  • Each target typically maps to a distinct workspace (via host) and run_as identity, so the same job/pipeline definitions deploy to physically separate dev/test/prod workspaces or paths.
  • Complex variables (maps/objects, e.g., cluster spec overrides) can be overridden per target, not just simple strings, allowing structural differences like node types or autoscaling between environments.
  • Running databricks bundle validate before deploy catches misconfigured variable references or target overrides early, and databricks bundle deploy -t <target> deploys to the specified environment explicitly.

2 · Check your understanding

Check this objectiveFree · always available

A data engineering team maintains one Databricks Asset Bundle repository deployed to dev, test, and prod. The prod target must run on a job cluster with 8 workers and write to catalog prod_sales, while dev must use a single-node cluster and write to dev_sales. The team wants one databricks.yml file. Which configuration approach meets these requirements?

Your objective map0 tried · 0 answered correctly · 33 untouched

What you have tried across Databricks DEA's objectives, not a readiness score.

Databricks Intelligence Platform6% of the exam0 of 2 tried
Data Ingestion and Loading21% of the exam0 of 7 tried
Data Transformation and Modeling22% of the exam0 of 7 tried
Working with Lakeflow Jobs16% of the exam0 of 4 tried
Implementing CI/CD10% of the exam0 of 4 tried
Troubleshooting, Monitoring, and Optimization10% of the exam0 of 5 tried
Governance and Security15% of the exam0 of 4 tried

3 · Keep going