A team promotes one job definition across dev, test and prod with Declarative Automation Bundles. Each environment needs a different Unity Catalog catalogue name and a different worker count on the job cluster, while the notebook code and the job structure stay identical. The team wants a single job declaration in the bundle and no hand editing between deployments. Which approach fits the requirement?
variables:
catalog_name:
description: Unity Catalog catalogue the job writes to
default: dev_catalog
worker_count:
default: 2- ADeclare the catalogue and the worker count as bundle variables, reference them in the single job declaration, set each target's values in that target's variables mapping, and deploy with the target selected by the -t flag. Correct
- BKeep one databricks.yml per environment in separate directories of the repository, each holding its own copy of the job declaration, and deploy whichever file matches the environment being promoted.
- CDeploy the bundle once with its defaults and then adjust the catalogue and the worker count on the deployed job in the workspace user interface for each environment after the deployment finishes.
- DCreate a git branch per environment, commit the environment values into the job declaration on each branch, and deploy the branch that matches the environment being promoted.
Why A is correct: Correct: one job declaration references the variables, and each target supplies its own values, so the same codebase is promoted and only the environment specific values change.
Why B is wrong: Tempting because it does give each environment its own values, but it duplicates the job declaration three times, so a structural change has to be applied in three places and the copies drift.
Why C is wrong: Tempting because the change is quick, but a later deploy reconciles the deployed job with the bundle configuration and overwrites those manual edits, so the environments drift silently between deployments.
Why D is wrong: Plausible because branches do isolate values, but promoting code then means merging between long-lived branches that differ by configuration, which is the drift the bundle target mechanism exists to remove.