CertSafari
    Databricks Certified Data Engineer Professional - October 9 onwards· Lessons

    Domain 8 · Lesson 43/46

    Deploying Bundles: bundle deploy, Deployment State, Development vs Production Modes and Bind

    Deploy Databricks resources using Declarative Automation Bundles (formerly Databricks Asset Bundles).

    10 min read
    2% of exam
    2 sources
    Published 2 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Explain how databricks bundle deploy chooses a target and how a bundle's identity and deployment state decide whether resources are created, updated or removed
    • Choose the right deploy flag: --auto-approve, --cluster-id, --fail-on-active-runs, --force, --force-lock or --select
    • Compare development and production deployment modes, and work out how mode, presets and per-resource settings combine
    • Bring an existing workspace job or pipeline under bundle management with bundle deployment bind

    1.bundle deploy, bundle identity and deployment state

    databricks bundle deploy pushes a bundle to a remote workspace. Pass -t (or --target) to choose a target. If you pass no target, the CLI uses the bundle's default target. The same bundle can go to development, staging and production workspaces, and each of those deployments has its own identity. That identity comes from root_path, which defaults to ~/.bundle/${bundle.name}/${bundle.target}. So by default a deployment is identified by who deployed it, the bundle name and the target name. If two bundles share all three, their deployments will interfere with each other.

    A deployment stores state in the workspace file system that records the ID of each resource it created. On every deploy, a resource that is in the configuration but not in the workspace is created. A resource that is in both is updated. A resource that was deployed before but has since been removed from the configuration is deleted from the target workspace. The only way to make a deployment forget a resource is to change the bundle name, the target, or the workspace. databricks bundle validate prints a summary of those values.

    Checkpoint 1 of 7· Check yourself

    An engineer removes a job definition from resources.jobs in a bundle that was already deployed to staging, then runs databricks bundle deploy -t staging. What happens to the job in staging?

    Checkpoint 2 of 7· Exam question

    A platform team maintains a Declarative Automation Bundle with the following `databricks.yml` targets block: ``` targets: dev: default: true workspace: host: https://dev-workspace.cloud.databricks.com prod: workspace: host: https://prod-workspace.cloud.databricks.com ``` An engineer runs `databricks bundle deploy` from the repository root without passing a `-t` flag. Which target receives the deployment?

    Sources1

    2.Deploy flags and when to use each

    databricks bundle deploy options
    FlagWhat it doesCaution
    --auto-approveSkips interactive approvals that deployment might requireUseful in non-interactive CI
    -c, --cluster-idOverrides the cluster in the deployment with the given cluster IDNot allowed in production mode (see next section)
    --fail-on-active-runsFails if jobs or pipelines in the deployment are runningProtects in-flight runs
    --forceOverrides validations that block a deployment, including the Git branch check; overwrites dashboards modified in the workspaceRemote dashboard edits are lost
    --force-lockForces acquisition of the deployment lockOnly after a crashed or interrupted deploy left a stale lock
    --selectDeploys only the named resources and their upstream dependenciesDevelopment workspaces only; downstream resources are not updated

    --force and --force-lock are easy to mix up. --force gets past validations, such as deploying from a branch other than the target's configured git.branch. --force-lock is about the deployment lock, which stops concurrent deployments from interfering with each other. --select takes resource keys, optionally qualified by type, and you can repeat it or comma-separate the keys:

    Partial deployment with --selectbash
    databricks bundle deploy --select my_job
    databricks bundle deploy --select jobs.my_job --select pipelines.my_pipeline
    databricks bundle deploy --select my_job,my_pipeline

    Checkpoint 3 of 7· Check yourself

    A CI deploy crashed halfway. Every new deploy now fails because a lock is held. Which flag is meant for this situation?

    Sources1

    3.Development and production deployment modes

    A target can set mode, which applies a group of default behaviours that match a stage of CI/CD. Modes are optional, and you can deploy without one. The two modes behave very differently:

    What databricks bundle deploy -t <target> does in each mode
    Behaviourmode: developmentmode: production
    Resource namesPrefixed with [dev ${workspace.current_user.short_name}] and tagged devUnchanged
    Lakeflow pipelinesMarked development: trueValidated to be development: false
    Cluster override--cluster-id or cluster_id overrides all cluster definitionsOverriding existing cluster definitions is not allowed
    Schedules and triggersPausedNot paused by the mode
    Concurrent runs / lockConcurrent runs enabled; deployment lock disabledNot listed as mode behaviours
    Git branchNo checkCurrent branch must equal the target's git branch (bypass with --force)

    Checkpoint 4 of 7· Fill the gap

    Which value makes this target prefix resource names, pause schedules and allow --cluster-id overrides?

    targets:
      dev:
        mode:  ? 

    Databricks recommends service principals for production deployments, enforced by setting run_as to a service principal. Without one, production mode adds extra checks. artifact_path, file_path, root_path and state_path must not be overridden to a specific user, and run_as and permissions must be specified. Deploying to an immutable, read-only folder means non-admin users can't change deployed assets and running jobs aren't affected by a deployment in progress.

    Presets let you change individual mode behaviours. Unless a preset documents an exception, presets override the mode, and a resource's own settings override the presets:

    Custom presets on a dev targetyaml
    targets:
      dev:
        presets:
          name_prefix: 'testing_' # prefix all resource names with testing_
          pipelines_development: true # set development to true for pipelines
          trigger_pause_status: PAUSED # set pause_status to PAUSED for all triggers and schedules
          jobs_max_concurrent_runs: 10 # set max_concurrent runs to 10 for all jobs
          tags:
            department: finance

    Checkpoint 5 of 7· Check yourself

    A job sets max_concurrent_runs: 10. Its target sets the preset jobs_max_concurrent_runs: 20 and also uses mode: development. What is the job's maximum number of concurrent runs after deployment?

    Checkpoint 6 of 7· Exam question

    A data engineer deploys a bundle to a target configured with `mode: development` and no `presets` overrides. Reviewing the deployed workspace objects afterward, which behaviors should the engineer expect to see applied automatically? (Select all that apply.)(Select 3)

    Sources2

    4.Bringing existing resources under a bundle with bind

    Jobs and pipelines created in the UI or through the API can be adopted rather than recreated. databricks bundle generate writes YAML for an existing resource, and databricks bundle deployment bind KEY RESOURCE_ID links a bundle resource key to the existing object. After the next bundle deploy, the workspace resource is updated to match the bundle's configuration. Bind does not recreate data. For example, a bound pipeline keeps its data and its materialized views don't have to be recomputed. Use bind with --target. It prints a diff and asks you to confirm unless you pass --auto-approve. databricks bundle deployment unbind KEY removes the link.

    Bind the bundle key hello_job to an existing job by its numeric IDbash
    databricks bundle deployment bind hello_job 6565621249

    Checkpoint 7 of 7· Match them up

    Match each resource type to the RESOURCE_ID format bind expects

    Tap a term, then the definition that fits it.

    Sources1

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.Renaming a job's name field in the YAML detaches it from the deployed job, so the next deploy creates a fresh job.Why is that wrong?

      The deployment tracks resources by ID in its state, not by name. A deployment forgets a resource only if the bundle name, target or workspace changes.

      Covered in bundle deploy, bundle identity and deployment state

    2. 2.--select is a safe way to push one hotfixed job to production without redeploying the whole bundle.Why is that wrong?

      --select is recommended for development workspaces only. It deploys the selected resources and their upstream dependencies but leaves downstream resources stale, which can cause dependency errors.

      Covered in Deploy flags and when to use each

    3. 3.Production mode, like development mode, lets you point every job at a different cluster with --cluster-id at deploy time.Why is that wrong?

      Cluster overrides are a development-mode behaviour. Production mode does not allow overriding the cluster definitions in the configuration.

      Covered in Development and production deployment modes

    Practise it for real

    Create a bundle from a template, deploy it to a development target, and run its job.

    1. 1.Run databricks auth login --host <workspace-url> and accept the suggested profile name.

      Why: The CLI needs an authenticated profile for the target workspace; U2M is fine for interactive work.

      You should see: A browser login, after which a configuration profile is saved.

    2. 2.Run databricks bundle init and choose the default Python template.

      Why: Templates are the quickest way to get a valid databricks.yml, a notebook and a job definition.

      You should see: A new project folder containing databricks.yml and resource files.

    3. 3.From the project folder, run databricks bundle validate.

      Why: Validation catches configuration errors and warns about unknown resource properties before anything is deployed.

      You should see: A summary of the bundle name, target and workspace, plus any warnings.

    4. 4.Run databricks bundle deploy -t dev.

      Why: This deploys to the development target; if it uses mode: development, resources get the [dev <your name>] prefix and schedules are paused.

      You should see: The job appears in the workspace with the dev prefix.

    5. 5.Run databricks bundle run -t dev with the job's resource key.

      Why: bundle run starts the deployed workflow from the command line.

      You should see: A job run starts and its progress is reported.

    Stuck? Get a nudge

    If deploy fails on a lock left by an interrupted earlier attempt, that is what --force-lock is for. Don't reach for --force.

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Fundamentally, the root_path property is what determines a bundle's unique identity, which defaults to ~/.bundle/${bundle.name}/${bundle.target}.”
      ↩︎ bundle deploy, bundle identity and deployment state
      “If no command options are specified, the default target as declared within the bundle configuration files is used.”
      ↩︎ bundle deploy, bundle identity and deployment state
      “tracks the resources it creates in the target workspace by their IDs as a state that is stored in the workspace file system”
      ↩︎ bundle deploy, bundle identity and deployment state
      “--force overrides Git branch validation”
      ↩︎ Deploy flags and when to use each
      “Fail if there are running jobs or pipelines in the deployment.”
      ↩︎ Deploy flags and when to use each
      “the existing Databricks resource in the workspace is updated based on the configuration defined in the bundle”
      ↩︎ Bringing existing resources under a bundle with bind
      “A resource's association with a bundle can only be forgotten if you change the bundle name, the bundle target, or the workspace.”
      ↩︎ Exam trap 1
      “Databricks recommends only using this option for deploying resources to development workspaces. It is not intended for use in production.”
      ↩︎ Exam trap 2
      “Resource names are not used to correlate between a bundle deployment and a resource instance”
      ↩︎ Prediction
      “If a resource is removed from the bundle configuration, it is removed from the target workspace if it was previously deployed.”
      ↩︎ Checkpoint
      “It should only be used if the previous deployment crashed or was interrupted and left a stale lock file.”
      ↩︎ Checkpoint
      “schema: full name in catalog.schema form, such as my_catalog.my_schema”
      ↩︎ Checkpoint
    2. 2.
      “Pauses all schedules and triggers on deployed resources such as jobs or quality monitors.”
      ↩︎ Development and production deployment modes
      “Validates that the current Git branch is equal to the Git branch that is specified in the target.”
      ↩︎ Development and production deployment modes
      “Databricks recommends that you use service principals for production deployments.”
      ↩︎ Development and production deployment modes
      “setting the mode mapping to production does not allow overriding any existing cluster definitions that are specified in the related bundle configuration file”
      ↩︎ Exam trap 3
      “if both mode and presets are set, presets override the default mode behavior, and settings of individual resources override the presets.”
      ↩︎ Checkpoint

    Spotted a mistake, or was something unclear? Tell us.