Databricks Machine Learning Associate Question 30
Single answerYou are working on a Databricks notebook that is linked to a Git repository. A teammate has recently updated the shared repository on GitHub with important changes. How can you pull these changes from the Git repository into your Databricks workspace?
- A
Navigate to the Git tab in Databricks, click 'Pull', and resolve any merge conflicts if prompted.
- B
Use the Databricks CLI to fetch changes by running the command 'databricks git-pull'.
- C
Manually download the updated files from the Git repository and upload them to the Databricks workspace.
- D
Click 'Revert changes' in the Databricks workspace to fetch the latest updates from the Git repository.
Show answer and explanation
Correct answer: A
Explanation
To pull changes from an external Git provider into a Databricks workspace, you must use the Git tab in the Databricks UI. This feature is specifically designed to integrate with Git repositories, allowing you to pull updates and handle merge conflicts. Other methods, such as manual file uploads or using the CLI, are either inefficient or unsupported for this purpose.
- A. Correct.
Correct. The Git tab in Databricks allows you to pull changes from an external Git repository into your Databricks workspace. If there are any conflicts, Databricks will notify you and allow you to resolve them.
- B. Incorrect.
Incorrect. The Databricks CLI does not have a command specifically for pulling changes from a Git repository. Pulling changes must be done through the Git tab in the Databricks UI.
- C. Incorrect.
Incorrect. While manually downloading and uploading files could work, it bypasses the Git integration and is not the recommended or efficient way to sync changes.
- D. Incorrect.
Incorrect. The 'Revert changes' option in Databricks is used to discard local changes in your notebook, not to pull updates from a Git repository.