databricks Data Engineer Associate · Practice questions

Section 5: Implementing CI/CD Practice Questions

Review 10 sample questions with their correct answers and explanations. Sign up free to continue with the full topic quiz.

Sign up free for the full quiz

Question 1

Which files typically make up a Declarative Automation Bundle project?

  1. A Unity Catalog metastore export
  2. Only a single exported .dbc archive of the workspace
  3. databricks.yml, resource definitions and source code — Correct
  4. A Dockerfile and a Kubernetes manifest

Correct answer

databricks.yml, resource definitions and source code

Explanation

A bundle has a databricks.yml file (and optional included YAML files) defining resources and targets, along with the code it deploys.

Question 2

Which Databricks CLI command checks a bundle's configuration for errors before deploying?

  1. databricks bundle validate — Correct
  2. databricks jobs check
  3. databricks workspace verify
  4. databricks bundle deploy --dry-run-only

Correct answer

databricks bundle validate

Explanation

bundle validate checks the configuration and resolves variables. deploy then uploads files and creates or updates resources in the target workspace.

Question 3

A data engineer pulls the latest changes in a Git folder and sees that a notebook has been modified upstream. What does pull do?

  1. It deletes uncommitted local changes without warning
  2. It merges remote commits into the local branch — Correct
  3. It creates a pull request automatically
  4. It pushes local changes to the remote

Correct answer

It merges remote commits into the local branch

Explanation

Pull updates the local branch with remote commits. Pushing sends local commits; pull requests are created in the provider.

Question 4

A team wants production deployments to run as a service principal rather than as an individual engineer. Where is this configured?

  1. In the cluster init script for the job cluster
  2. In the prod target, with run_as set to the service principal — Correct
  3. In each notebook's first cell with a SET USER statement
  4. It cannot be configured; jobs always run as their creator

Correct answer

In the prod target, with run_as set to the service principal

Explanation

Bundles support run_as per target so that production jobs execute as a service principal, independent of who deployed them.

Question 5

A bundle defines a job with tasks that use a cluster. The prod target must use a larger node type. Which bundle feature is designed for this?

  1. An If/else task that checks the node type
  2. A separate Git branch per environment with different code
  3. A compute policy that changes size at runtime
  4. Target overrides for prod — Correct

Correct answer

Target overrides for prod

Explanation

Targets can override resource definitions (for example cluster settings) so one bundle serves multiple environments.

Question 6

Two engineers changed the same notebook in different branches. When pulling main into the feature branch in a Git folder, a merge conflict appears. What should the engineer do?

  1. Resolve the conflict, then commit the merge — Correct
  2. Delete the Git folder and clone the repository again to make the conflict disappear
  3. Force push the feature branch to main to overwrite the other change
  4. Rename the notebook so that both versions exist

Correct answer

Resolve the conflict, then commit the merge

Explanation

Conflicts must be resolved by choosing or combining changes, then committing. Force pushing would discard a teammate's work.

Question 7

Which command initializes a new bundle project from a template?

  1. databricks bundle init — Correct
  2. databricks workspace import
  3. databricks bundle create
  4. databricks repos create

Correct answer

databricks bundle init

Explanation

bundle init creates a new project from a default or custom template.

Question 8

A bundle defines a job with a cluster size variable. Dev should use 2 workers and prod 10 workers. How is this expressed in a Declarative Automation Bundle?

  1. Hard-code 10 workers and scale down manually in dev
  2. A variable with per-target overrides in databricks.yml — Correct
  3. Create two separate repositories, one per environment
  4. Use an If/else task that reads the workspace URL at runtime

Correct answer

A variable with per-target overrides in databricks.yml

Explanation

Bundle variables can have defaults and per-target overrides, so the same definitions deploy with environment-specific values.

Question 9

How does a CI system authenticate the Databricks CLI to deploy a bundle in production?

  1. With a developer's personal password
  2. With a cluster's init script
  3. With no authentication, because bundles are public
  4. A service principal with OAuth secrets in CI — Correct

Correct answer

A service principal with OAuth secrets in CI

Explanation

Automated deployments should use service principals with OAuth (machine-to-machine) credentials stored as secrets in the CI system.

Question 10

Which principal type is recommended for running production jobs and CI/CD deployments?

  1. A shared user account whose password is stored in the job
  2. A service principal — Correct
  3. An anonymous token
  4. The workspace admin's personal account

Correct answer

A service principal

Explanation

Service principals are non-human identities for automation, decoupling production from individual user accounts.

Ready for the full quiz?

Create a free QuizAnalyst account to practice the complete question set and save your progress.

Sign up free for the full quiz