Databricks-GenAI-Assoc Assembling and Deploying Apps Practice Question
A generative AI engineer is packaging a retrieval-augmented generation (RAG) application so it can be deployed as a Databricks App. The app reads the vector index name and the serving endpoint name from environment configuration so the same code can run in dev and prod. Which approach correctly supplies these values at deploy time using Databricks Asset Bundles?
⚠ Common exam trap
The trap here is assuming environment-specific settings must live in application code or be entered at runtime, when the bundle's variable and target mechanism is the intended injection point.
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
✓
Declare bundle variables with defaults in databricks.yml, override them per target, and reference them in the app resource configuration.
Bundle variables with defaults in databricks.yml, overridden per target and referenced in the app resource, let one codebase deploy to dev and prod with different endpoint and index names. The bundle resolves values at deploy time and validates them, so promotion requires no source edits and each target receives the correct configuration without runtime prompts or extra lookups.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Store the values in a notebook widget and have the app prompt the user for them at startup.
Why it's wrong here
Notebook widgets are interactive parameters for notebook runs, not a deployment configuration channel for Databricks Apps. Prompting a user at startup makes the deployed app depend on manual input, which is unsuitable for automated CI/CD, cannot be validated by the bundle, and would let a wrong endpoint or index name be entered silently in production.
- ✓
Declare bundle variables with defaults in databricks.yml, override them per target, and reference them in the app resource configuration.
Why this is correct
Bundle variables declared in databricks.yml with per-target overrides are the supported mechanism for environment-specific values. Referencing those variables inside the app resource passes the resolved endpoint and index names into the deployed app at deploy time, so the same source is promoted across targets without code edits and each target receives its own values.
- ✗
Hard-code the dev and prod values in the app source and select a branch during deployment.
Why it's wrong here
Hard-coding both environments into source forces code changes or branch switching for every promotion, which breaks the bundle's declarative model and risks shipping dev endpoints to prod. Databricks Asset Bundles are designed so that environment-specific values are injected as variables, not baked into application code, and branch-based selection is not how bundle targets resolve configuration.
- ✗
Write the values into a Delta table and have the app query that table on every request.
Why it's wrong here
Using a Delta table as a configuration store adds a query to every request path, introduces a failure dependency on Unity Catalog permissions and table availability, and still does not give the bundle a way to validate or promote environment-specific values. It solves a configuration problem with runtime data plumbing, which is more complex and less reliable than bundle variables.
Visual reference
About these practice questions
One of 330 original Databricks-GenAI-Assoc practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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-GenAI-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-GenAI-Assoc exam.