Skip to content

Data Engineer Professional · Domain 8: Debugging and Deploying · 10% of the exam

Task 8.4: Configure Git-based CI/CD workflows using Databricks Git folders (formerly Repos) to deploy notebooks and code.

Production Git folders updated by automation, jobs that run from a Git reference, service principal Git credentials, and branch workflows.

Study it

  • Git folders in CI/CD

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the Databricks documentation page that proves it.

Question 1 · choose 1

A production job runs six notebook tasks from a production Git folder that automation updates after every merge to main. A merge during a run left the first tasks on old code and the later ones on new code. Every task in a run must use the same code version, and auditors want to see which commit each run used. What should the team change?

  1. ARestrict updates of the production Git folder to admins
  2. BHave the automation update the Git folder only once an hour
  3. CPoint the tasks at the remote Git repository's main branch
  4. DCopy the notebooks to a shared folder before each release
Show the answer and why
  • ARestrict updates of the production Git folder to admins

    Incorrect

    Restricting who updates the folder does not stop the automated update during a run.

  • BHave the automation update the Git folder only once an hour

    Incorrect

    A run can still span an update, and the commit used is not recorded per run.

  • CPoint the tasks at the remote Git repository's main branch

    Correct

    At run start, Databricks snapshots the branch or commit, all tasks use that snapshot, and the run details show the commit SHA.

  • DCopy the notebooks to a shared folder before each release

    Incorrect

    Manual copies drift from source control and record no commit.

Tasks can check out code directly from a remote Git repository. Databricks takes a snapshot of the branch or commit when the run begins, so every task uses the same version, and Databricks recommends this for staging and production jobs rather than workspace paths in Git folders.

Question 2 · choose 1

A notebook task that checks out code from a remote Git repository fails when it writes a small CSV to a workspace folder. Where should it write?

  1. ATo the Git repository itself
  2. BTo a Unity Catalog volume or a table
  3. CTo /Workspace/Shared
  4. DTo the user's home folder in the workspace
Show the answer and why
  • ATo the Git repository itself

    Incorrect

    Tasks do not commit output to the repository.

  • BTo a Unity Catalog volume or a table

    Correct

    Git-sourced tasks cannot write to workspace files; persistent output goes to a volume or table.

  • CTo /Workspace/Shared

    Incorrect

    That is still a workspace file location.

  • DTo the user's home folder in the workspace

    Incorrect

    Home folders are workspace files as well.

Tasks configured with a remote Git repository cannot write to workspace files. They write temporary data to the driver's ephemeral storage and persistent data to a volume or table.

Question 3 · choose 1

A production job should always run the code of release v2.3.0 until the next release is approved. How is its Git reference set?

  1. ASet both the branch main and the tag v2.3.0
  2. BSet the branch main and avoid merges until the next release
  3. CLeave the reference empty so that the default branch is used
  4. DSet the Git reference to the tag v2.3.0
Show the answer and why
  • ASet both the branch main and the tag v2.3.0

    Incorrect

    Only one of branch, tag or commit can be specified.

  • BSet the branch main and avoid merges until the next release

    Incorrect

    A branch moves with every merge, so it does not pin the release.

  • CLeave the reference empty so that the default branch is used

    Incorrect

    A reference must be given, and a default branch keeps moving.

  • DSet the Git reference to the tag v2.3.0

    Correct

    A job's Git settings take exactly one of a branch, a tag or a commit.

In the job's Git settings, specify exactly one of branch, tag or commit to choose the version of source code that runs.

Question 4 · choose 1

A team sets up a production Git folder that jobs run from. Which setup follows Databricks guidance?

  1. AEach developer keeps it under their own /Workspace/Users folder
  2. BDevelopers edit and push changes directly from the production folder
  3. CAn admin creates it outside user folders; automation updates it
  4. DAll users get Can Manage on it so that anyone can fix it quickly
Show the answer and why
  • AEach developer keeps it under their own /Workspace/Users folder

    Incorrect

    User folders are for development checkouts.

  • BDevelopers edit and push changes directly from the production folder

    Incorrect

    Production folders should not be edited by hand.

  • CAn admin creates it outside user folders; automation updates it

    Correct

    Production Git folders sit outside user folders and are updated only by automation.

  • DAll users get Can Manage on it so that anyone can fix it quickly

    Incorrect

    Broad edit rights invite manual changes.

Admins create production Git folders outside /Workspace/Users, give users and service principals Can Run, and keep them in sync with the deployment branch through automation.

Question 5 · choose 1

A team must deploy jobs, pipelines and code from Git through test and prod. Which approach does Databricks recommend?

  1. ADeclarative Automation Bundles
  2. BA production Git folder for everything
  3. CExporting notebooks to DBC archives
  4. DRecreating jobs by hand in each workspace
Show the answer and why
  • ADeclarative Automation Bundles

    Correct

    Databricks recommends bundles to package and deploy CI/CD workflows.

  • BA production Git folder for everything

    Incorrect

    A production Git folder fits when only code is deployed.

  • CExporting notebooks to DBC archives

    Incorrect

    Archives are not a CI/CD deployment mechanism.

  • DRecreating jobs by hand in each workspace

    Incorrect

    Manual setup drifts between environments.

Databricks recommends Declarative Automation Bundles to package and deploy CI/CD workflows; a production Git folder is an option when you deploy only code into the workspace.

Practice domain 8 →Practice all domains →