Databricks Machine Learning Associate Question 16
Select 3You are working on a Databricks notebook that is connected to a Databricks Repo. After making changes to the notebook, you want to commit and push these changes to an external Git provider (e.g., GitHub). Which of the following steps are required to ensure the changes are successfully committed and pushed to the remote Git repository?
- A
Use the Databricks Repo UI to commit the changes with a relevant commit message.
- B
Use the Databricks Repo UI to push the changes to the remote Git repository.
- C
Manually copy the code from the notebook and paste it into the Git provider's web interface.
- D
Ensure that the Databricks Repo is properly linked to the desired branch in the external Git repository.
- E
Run a Git push command from the Databricks notebook directly to push the changes.
Show answer and explanation
Correct answers: A, B, D
Explanation
To successfully commit and push changes from a Databricks Repo to an external Git provider, you must use the Databricks Repo UI to commit the changes with a message, ensure the Repo is linked to the correct branch in the external repository, and push the changes through the UI. Manual code transfers and attempting to run Git commands from notebooks are not supported or recommended in this workflow.
- A. Correct.
This is correct. The Databricks Repo UI provides an option to commit changes along with a commit message, which is a standard part of version control workflows.
- B. Correct.
This is correct. The Databricks Repo UI includes functionality to push committed changes to the remote Git repository.
- C. Incorrect.
This is incorrect. Manually copying and pasting code is not a recommended or supported method for integrating Databricks Repos with Git providers.
- D. Correct.
This is correct. Linking the Databricks Repo to the correct branch in the external Git repository is a prerequisite for pushing changes to the correct location.
- E. Incorrect.
This is incorrect. Databricks does not allow running Git commands directly from notebooks for managing Databricks Repo changes. Git operations are handled through the Repo UI.