Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Deploy a bundle by using the Azure Databricks command-line interface (CLI)

A worked example

Single answer

A data engineering team deploys a Declarative Automation Bundle from an automated CI/CD pipeline that uses the Databricks CLI. The databricks.yml file defines two targets: dev, which is the default target, and production.

The pipeline step must meet these requirements:

  • Deploy the bundle to the production target.
  • Run without stopping at any confirmation prompt.
  • If a job or pipeline from the bundle is currently running, the deployment must fail instead of disrupting the run.

Which command should the pipeline step run?

Choose one answer
Why

Because production is not the default target, the command must name it with -t. Automated CI/CD deployments add --auto-approve so the CLI does not wait for confirmation, and --fail-on-active-runs makes the deployment fail rather than disrupt jobs or pipelines that are currently running. Only one option combines all three.

  • Not correct: databricks bundle deploy --auto-approve --fail-on-active-runs. Without -t, deployment uses the default target defined in the bundle configuration, which here is dev, not production.
  • Correct: databricks bundle deploy -t production --auto-approve --fail-on-active-runs. -t production selects the non-default target, --auto-approve skips confirmation prompts for automated runs, and --fail-on-active-runs makes the deployment fail when it finds active runs.
  • Not correct: databricks bundle deploy -t production --auto-approve --force-lock. Without --fail-on-active-runs, the deployment does not fail when bundle jobs or pipelines are running, so it can disrupt them.
  • Not correct: databricks bundle deploy -t production --force-lock --fail-on-active-runs. --force-lock overrides a deployment lock; it does not skip confirmation prompts. Only --auto-approve does that, so the step could still stop at a prompt.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free