Databricks-DE-Assoc Implementing CI/CD Practice Question
A data engineering team uses Databricks Asset Bundles (DABs) to manage a job that must deploy to both a staging and a production workspace. The team wants to avoid hardcoding workspace-specific values such as the cluster ID and the storage path in databricks.yml. Which approach should they use?
⚠ Common exam trap
The trap here is assuming environment-specific values must be embedded in the bundle file or patched afterward, when DABs targets and variables are designed precisely to parameterize them at deploy time.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Define variables in the bundle and set target-specific values in databricks.yml under targets, then deploy with databricks bundle deploy -t <target>.
Databricks Asset Bundles use a declarative databricks.yml with variables and targets. Declaring variables once and overriding them per target lets one bundle deploy consistently to staging and production without hardcoded workspace-specific values. Selecting the target at deploy time applies the correct values, keeps a single source of truth in Git, and avoids drift from manual edits or post-deployment patching.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Run databricks bundle deploy once, then use the Databricks REST API to patch the job's cluster ID and storage path after each deployment.
Why it's wrong here
Post-deployment API patching makes the deployed state diverge from the bundle's declared state. The next bundle deploy would overwrite those manual changes, and the bundle would no longer be the source of truth. This approach also requires extra automation and credentials, whereas targets and variables in databricks.yml handle per-environment values natively during deployment.
- ✓
Define variables in the bundle and set target-specific values in databricks.yml under targets, then deploy with databricks bundle deploy -t <target>.
Why this is correct
DABs support variables and targets in databricks.yml. You declare variables once and override their values per target (for example, staging and prod), so the same bundle definition deploys correctly to each workspace. Running databricks bundle deploy -t <target> selects the target and applies its variable values, eliminating hardcoded cluster IDs and paths while keeping one source of truth.
- ✗
Store the cluster ID and storage path in a Databricks secret scope and reference them with dbutils.secrets.get inside the job's notebook code.
Why it's wrong here
Secrets are for sensitive values like tokens, not for general deployment configuration. Referencing a cluster ID from within notebook code does not configure the job's compute at deploy time, and it spreads environment-specific logic into runtime code. The bundle must resolve these values when deploying, so secret scopes do not address the hardcoding problem in databricks.yml.
- ✗
Create a separate Git branch for each workspace and manually edit the cluster ID and storage path in databricks.yml before each deployment.
Why it's wrong here
Branch-per-environment with manual edits defeats the purpose of a bundle as a single declarative artifact. It introduces drift because each branch carries different values, and manual edits are error-prone. DABs already provide targets and variables for exactly this need, so branching and hand-editing adds process overhead without solving the underlying configuration problem.
About these practice questions
Courseiva writes every Databricks-DE-Assoc question from scratch — 276 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Databricks exam blueprint
This Databricks-DE-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-DE-Assoc exam.