Skip to content

Data Engineer Associate · Domain 5: Implementing CI/CD · 10% of the exam

Task 5.1: Manage your code development workflow within the Databricks workspace UI, including creating and switching between branches in Databricks Git Folders (formerly Databricks Repos), committing and pushing changes, and creating pull requests using Databricks Git integration.

Cloning a repository into a Git folder, credentials, branches, pull, commit and push, merges and conflicts, and where pull requests are opened.

Study it

  • Git folders: clone, branch, commit, push, pull and merge

    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 data engineer edits notebooks in a Databricks Git folder. The main branch is protected, so the engineer cannot push to it, and changes must be reviewed before they reach main. What is the expected workflow?

  1. ACommit and push to a new branch, then open a pull request in the Git provider
  2. BRun git push --force origin main from the web terminal of the Git folder
  3. CClone the repository into a second Git folder and push to main from that one
  4. DShare the Git folder with the reviewer, who then pushes the changes to main
Show the answer and why
  • ACommit and push to a new branch, then open a pull request in the Git provider

    Correct

    When you cannot commit to the default branch, you work on a new branch and use the Git provider's interface to create and merge a pull request.

  • BRun git push --force origin main from the web terminal of the Git folder

    Incorrect

    Force-pushing skips review, and a protected branch rejects the push in any case.

  • CClone the repository into a second Git folder and push to main from that one

    Incorrect

    A second clone uses the same credentials against the same protected branch, so the push still fails.

  • DShare the Git folder with the reviewer, who then pushes the changes to main

    Incorrect

    The reviewer would still push straight to main, which skips the pull request and is rejected by the protected branch.

Git folders handle cloning, branches, commits, pushes and pulls inside the workspace. Review and merge happen through a pull request in the Git provider.

Question 2 · choose 1

A new team member selects Create > Git folder for the team's private GitHub repository and gets an authentication error. What must the team member set up first?

  1. ACAN MANAGE permission on the workspace folder where the clone goes
  2. BA Git credential for GitHub in Settings > Linked accounts
  3. CA Databricks personal access token
  4. DA secret scope holding the GitHub token
Show the answer and why
  • ACAN MANAGE permission on the workspace folder where the clone goes

    Incorrect

    Creating a Git folder needs CAN MANAGE on the parent folder, but this error is about authenticating to GitHub.

  • BA Git credential for GitHub in Settings > Linked accounts

    Correct

    Private repositories need a Git credential, a personal access token or OAuth link from the Git provider, configured in Databricks.

  • CA Databricks personal access token

    Incorrect

    A Databricks token authenticates to Databricks, not to GitHub.

  • DA secret scope holding the GitHub token

    Incorrect

    Git folders read credentials from linked accounts; a secret scope is for code that reads secrets.

Configure Git credentials before cloning private repositories or pushing changes; public repositories can be cloned without them.

Question 3 · choose 1

Two engineers work in the same Databricks Git folder. When one switches the folder to a new branch, the other finds the notebooks changed to that branch's versions. How should they work instead?

  1. AMake the Git folder read-only for one of the two engineers
  2. BUse rebase instead of merge when combining work in the shared Git folder
  3. CTurn on sparse checkout mode in the shared Git folder
  4. DEach engineer clones the repository into a separate Git folder and branch
Show the answer and why
  • AMake the Git folder read-only for one of the two engineers

    Incorrect

    The other engineer then cannot edit, and the shared folder problem remains.

  • BUse rebase instead of merge when combining work in the shared Git folder

    Incorrect

    Rebase changes how history is combined; it does not stop one user's branch switch from affecting the other.

  • CTurn on sparse checkout mode in the shared Git folder

    Incorrect

    Sparse checkout does not give each user a separate checkout; both engineers would still share one current branch.

  • DEach engineer clones the repository into a separate Git folder and branch

    Correct

    A Git folder has one current branch for everyone who uses it, so Databricks recommends one user per Git folder, each on a separate branch.

Changing the branch of a Git folder changes it for all its users, so give each developer a separate Git folder and branch.

Question 4 · choose 1

A data engineer clicks Pull in a Git folder to get a teammate's changes. Afterwards, the variables defined earlier in an attached notebook are gone. What explains this?

  1. APulling upstream changes clears the notebook state
  2. BThe pull failed with a merge conflict
  3. CPull restarted the attached cluster
  4. DPull reset the local branch to the remote and discarded local commits
Show the answer and why
  • APulling upstream changes clears the notebook state

    Correct

    Git operations that pull upstream changes clear notebook state, so cells must be run again.

  • BThe pull failed with a merge conflict

    Incorrect

    A conflict would appear in the Git dialog; it does not explain lost variables after a successful pull.

  • CPull restarted the attached cluster

    Incorrect

    Pulling updates files; it does not restart compute.

  • DPull reset the local branch to the remote and discarded local commits

    Incorrect

    That is what Reset does; Pull merges remote changes into the branch.

After a pull, rerun notebook cells to rebuild state, and commit work before pulling.

Question 5 · choose 1

In a Git folder, a data engineer merges main into a feature branch, and the Git dialog reports a conflict in one file. The engineer wants to keep parts of both versions. What should the engineer do?

  1. ADelete the Git folder and clone the repository again from the remote
  2. BReset the feature branch to main from the Git dialog's menu
  3. CEdit the file in the Git UI, Mark As Resolved, then Continue Merge
  4. DSwitch to another branch so that the conflicting changes are dropped
Show the answer and why
  • ADelete the Git folder and clone the repository again from the remote

    Incorrect

    A fresh clone discards local work and does not resolve the conflict.

  • BReset the feature branch to main from the Git dialog's menu

    Incorrect

    Reset replaces the branch with main and loses both local and remote changes on the branch.

  • CEdit the file in the Git UI, Mark As Resolved, then Continue Merge

    Correct

    The Git folders UI shows conflicting files; you keep the lines you want, delete the conflict markers, mark the file resolved and continue the merge.

  • DSwitch to another branch so that the conflicting changes are dropped

    Incorrect

    Switching branches does not resolve the conflict; the merge must be completed or aborted.

Resolve conflicts manually, take all current or all incoming changes, or abort and retry. Databricks recommends merge over rebase for Git beginners.

Practise domain 5 →Practise all domains →