Databricks Machine Learning Associate Question 12
Select 3You are a data scientist working on a machine learning project in Databricks, and you want to collaborate with your team using a Git-based workflow. You need to connect a GitHub repository to Databricks Repos so you can manage your code versions efficiently. Which of the following steps are required to successfully connect the GitHub repo to Databricks Repos?
- A
Generate a personal access token from GitHub with the appropriate scopes.
- B
Use the Databricks CLI to manually clone the GitHub repository into the Databricks workspace.
- C
In Databricks Repos, click 'Add Repo' and paste the URL of the GitHub repository.
- D
Select the Git provider from the dropdown menu in Databricks Repos when adding the repository.
- E
Enable the 'Git Integration' feature in the Databricks workspace settings.
Show answer and explanation
Correct answers: A, C, D
Explanation
To connect a GitHub repository to Databricks Repos, you need to generate a personal access token from GitHub to authenticate, specify the repository URL in the Databricks Repos UI, and select GitHub as the provider. The process is straightforward and does not require using the Databricks CLI or enabling additional features in workspace settings.
- A. Correct.
Correct: A personal access token is required to authenticate with GitHub and allow Databricks to access your repository.
- B. Incorrect.
Incorrect: The Databricks CLI is not used to connect a GitHub repository to Databricks Repos; this process is handled through the Databricks UI.
- C. Correct.
Correct: The URL of the GitHub repository is needed to specify the repository you want to connect to Databricks Repos.
- D. Correct.
Correct: Selecting the Git provider ensures that Databricks knows the type of repository you are connecting (e.g., GitHub, GitLab).
- E. Incorrect.
Incorrect: There is no 'Git Integration' feature that needs to be enabled in Databricks workspace settings; Git integration is supported natively.