Databricks Machine Learning Associate Question 18
Select 3You are working on a Databricks notebook that is part of a Databricks Repo. You make several edits to the notebook and want to commit these changes to an external Git provider. Which steps should you take to successfully commit your changes?
- A
Navigate to the 'Repos' tab in Databricks and click the 'Commit' button.
- B
Provide a meaningful commit message in the commit dialog.
- C
Push the changes to the external Git provider after committing.
- D
Run the
git commitcommand directly in a Databricks notebook cell. - E
Ensure you have set up a Git personal access token or SSH key for authentication with the external Git provider.
Show answer and explanation
Correct answers: B, C, E
Explanation
To commit changes from a Databricks Repo to an external Git provider, you must ensure that you have set up proper authentication with the Git provider, provide a meaningful commit message, and push the changes after committing. These steps ensure that your edits are properly tracked and synchronized with the external repository. Options 2, 3, and 5 are the correct steps in this workflow.
- A. Incorrect.
This option is incorrect because the 'Commit' functionality is not located directly under the 'Repos' tab. The commit operation must be performed in the notebook or repo workspace where the changes were made.
- B. Correct.
This option is correct because providing a descriptive commit message is a critical step when committing changes to a Git repository.
- C. Correct.
This option is correct because after committing your changes in Databricks, you need to push them to the external Git provider to synchronize the changes.
- D. Incorrect.
This option is incorrect because running the
git commitcommand in a Databricks notebook cell is not a supported way to manage Git commits in Databricks Repos. - E. Correct.
This option is correct because authentication via a personal access token or SSH key is required for Databricks to interact with the external Git provider.