Databricks Machine Learning Associate Question 25
Select 2You are collaborating with a team on a machine learning project in Databricks, and the code is stored in an external Git repository. You need to make changes to the code without affecting the main branch. What steps should you take to create a new branch, make edits, and commit these changes to the external Git provider from within Databricks?
- A
Use the Databricks interface to create a new branch directly in the external Git provider, then make changes in Databricks and commit them.
- B
Switch to the Git-enabled notebook in Databricks, create a new branch using the Git integration options, make changes, and commit them.
- C
Run Git commands in a Databricks notebook to create a new branch, make changes, and push them to the external Git repository.
- D
Make changes directly in the main branch from the Databricks notebook and commit them to the external Git repository.
- E
Use the Databricks Repos feature to create a new branch, make the required changes to the code, and commit them back to the external Git provider.
Show answer and explanation
Correct answers: B, E
Explanation
To collaborate effectively on machine learning projects in Databricks while using an external Git repository, it is important to follow best practices for version control. Using Databricks Git integration in notebooks or the Databricks Repos feature allows you to create a new branch, make changes, and commit them back to the repository without affecting the main branch. These methods align with the certification's focus on leveraging Databricks tools for machine learning workflows.
- A. Incorrect.
While the external Git provider interface can be used to create branches, this option does not involve the Databricks environment's built-in Git integration features, which are key to the exam topic.
- B. Correct.
This is correct because Databricks provides Git integration in notebooks, allowing users to create and switch branches, make changes, and commit them directly to the external Git repository.
- C. Incorrect.
Though running Git commands in a notebook is possible, it is not the recommended or typical approach for interacting with a Git repository in Databricks, especially for the certification exam.
- D. Incorrect.
Making changes directly in the main branch goes against best practices for version control and collaboration and is not aligned with the task of creating a new branch.
- E. Correct.
This is correct because Databricks Repos is the preferred feature for managing Git-based workflows, allowing users to seamlessly create branches, make changes, and commit them to the external Git provider.