Databricks Machine Learning Associate Question 22
Select 2You are collaborating on a machine learning project in Databricks and need to make changes to a notebook without affecting the main codebase. Your team uses an external Git provider for version control. Which steps should you follow to create a new branch, make changes, and commit them back to the external Git provider?
- A
Create a new branch directly in the external Git provider and then pull it into Databricks.
- B
Use the Databricks workspace to create a new branch and automatically push it to the external Git provider.
- C
Switch to the desired branch in Databricks, make changes to the notebook, and commit them directly to the external Git provider.
- D
After making changes to the notebook, create a new branch in Databricks and push the changes to the external Git provider.
- E
Use the Databricks Repos feature to create a new branch, make changes, and push the branch and commits to the external Git provider.
Show answer and explanation
Correct answers: A, E
Explanation
To integrate Databricks with an external Git provider, you must create and manage branches appropriately. A common workflow is to create a new branch in the external Git provider (or via Databricks Repos), sync it with Databricks, make changes in notebooks, and push the branch and commits back to the Git provider. This ensures proper version control and collaboration.
- A. Correct.
Correct: Creating a new branch in the external Git provider and pulling it into Databricks ensures the branch is properly initialized and synchronized before making changes.
- B. Incorrect.
Incorrect: Databricks does not support creating a new branch directly from the workspace. Branch creation must be handled using the external Git provider or Databricks Repos.
- C. Incorrect.
Incorrect: You cannot commit changes directly from Databricks to an external Git provider without first creating a branch and linking it to the Git provider.
- D. Incorrect.
Incorrect: You cannot create a new branch in Databricks after making changes. Branch creation needs to occur before changes are made.
- E. Correct.
Correct: The Databricks Repos feature allows you to manage branches, make changes, and push both the branch and commits to the external Git provider seamlessly.