Courseiva

Databricks-GenAI-Assoc Assembling and Deploying Apps Practice Question

An engineer is preparing to deploy a Mosaic AI Agent application with Databricks Asset Bundles. The bundle defines the agent, the serving endpoint, and a job that refreshes the vector index. The engineer wants the deployment to target a staging workspace and a production workspace with different endpoint names and different Unity Catalog catalog names, without editing files between deployments. Which approach should the engineer use?

⚠ Common exam trap

The trap here is reaching for secrets or duplicate projects to handle environment differences, when bundle variables overridden per target are the built-in mechanism for non-sensitive, deployment-time values.

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 bundle variables for the endpoint name and catalog name, and set their values per target in the bundle's databricks.yml targets section.

Databricks Asset Bundles let a single declarative project target multiple workspaces through targets, and variables can be given different values per target. Defining variables for the endpoint and catalog names and overriding them in each target lets the same bundle deploy correctly to staging and production without editing files. This preserves one source of truth and matches the scenario's requirement.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Hard-code the production endpoint and catalog names and use a post-deployment notebook to rename resources in staging.

    Why it's wrong here

    Hard-coding production values and mutating them after deployment makes the deployed state diverge from the declared state, so the next bundle deploy may revert or conflict with the renames. It also requires extra custom code that is hard to test. This approach fights the declarative model instead of using its built-in parameterization.

  • ✓

    Define bundle variables for the endpoint name and catalog name, and set their values per target in the bundle's databricks.yml targets section.

    Why this is correct

    Databricks Asset Bundles support variables that can be overridden per target, so the same bundle definition can deploy to staging and production with different endpoint and catalog names. This keeps a single source of truth while allowing environment-specific values, which is exactly what the scenario requires. The engineer selects a target at deploy time and no files are edited.

  • ✗

    Maintain two separate bundle projects, one per workspace, and keep them synchronized manually.

    Why it's wrong here

    Duplicating the bundle per environment creates drift, since every change must be applied twice and the two copies inevitably diverge. It also defeats the purpose of a declarative bundle as a single source of truth. The scenario explicitly wants to avoid editing files between deployments, and manual synchronization is error-prone.

  • ✗

    Store the environment-specific values in a secrets scope and read them at runtime inside the agent code.

    Why it's wrong here

    Secrets are for sensitive values such as tokens, not for resource names that the bundle must resolve at deploy time to create the correct endpoint and reference the correct catalog. The bundle needs these values during deployment, before any agent code runs. Using secrets here adds runtime complexity and still leaves the deployment-time naming problem unsolved.

About these practice questions

Courseiva writes every Databricks-GenAI-Assoc question from scratch — 330 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 →

How Courseiva writes practice questions · Editorial policy

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.