Databricks Machine Learning Associate Question 28
Select 2You are working on a Databricks notebook that is linked to a Git repository on GitHub. After a colleague pushes updates to the repository, you want to pull these changes into your Databricks workspace. Which of the following steps should you perform to successfully pull the changes?
- A
Navigate to the Git integration settings in Databricks and click 'Pull' to fetch changes from the remote repository.
- B
Ensure that your Git branch in Databricks is the same as the branch where changes were pushed.
- C
Resolve any merge conflicts directly within the Databricks notebook editor, if conflicts are detected during the pull.
- D
Run a %git pull command within the Databricks notebook to fetch the latest changes.
- E
Disconnect the Git integration and re-link the repository to fetch the latest changes.
Show answer and explanation
Correct answers: B, C
Explanation
To pull changes from an external Git provider back to a Databricks workspace, you need to ensure you are on the correct branch and then use the Git UI in Databricks. If conflicts arise during the pull operation, they can be resolved directly in the notebook editor. Databricks does not support raw Git commands like %git pull or provide a 'Pull' button in the Git settings.
- A. Incorrect.
Databricks does not provide a 'Pull' button in the Git integration settings. Pulling changes requires other methods.
- B. Correct.
It is essential to ensure that the branch you are working on in Databricks matches the branch where updates were pushed. Otherwise, you will not see or be able to pull the changes.
- C. Correct.
If there are merge conflicts when pulling changes, Databricks allows you to resolve these conflicts directly within the notebook editor.
- D. Incorrect.
Databricks does not support running Git commands like %git pull directly within a notebook. Git operations are handled through the integrated Git workflow in the UI.
- E. Incorrect.
Disconnecting and re-linking the Git integration is unnecessary and not a recommended way to fetch updates. Proper Git workflow should be followed instead.