Workflow Outline for Git Integration with Databricks
1. Opening Databricks and Accessing the Repo Folder
-
Open Databricks:
- Log in to your Databricks workspace: WUSM Data Lake
-
Access the Repo Folder:
- Navigate to the "Workspace" tab on the left sidebar.
- Click on "Home" to see the list of available repositories.
- Open the folder for the repository you want to work on.
- If not already linked, use the "Create" button and click "Git Folder" to link your Git repository by providing the Git URL.
2. Syncing Changes from the Main Branch
-
Open the Git Dialog in Databricks:
- Click on the git dialog button next to the folder name.
- Click on the git dialog button next to the folder name.
-
Ensure the main Branch is Selected
- Use the
Branch
dropdown list to selectmain
if it is not already selected
- Use the
-
Pull Changes from Main:
- Click the
Pull
button on the right side of the dialog window. - The badge should indicate the number of commits your local repository is behind the selected branch (
main
).
- Click the
3. Creating a Project Branch
- Create and Switch to a New Branch:
- Click the
Create Branch
button and enter the branch name. - Click the
Create
button. - Close the dialog window.
- Click the
4. Creating a Notebook in the Appropriate Folder
- Create a Project Folder
- Click the
Create
button and chooseFolder
. - Enter the folder name.
- Click the
Create
button.
- Click the
- Create a New Notebook:
- Click the
Create
button and chooseNotebook
. - Name your notebook and select the preferred language (Python, SQL, Scala, etc.).
- Click the
- Save the Notebook:
- As you make changes to the notebook, Databricks will auto-save it within the selected folder in your repo.
5. Pushing Changes to the Remote Project Branch
- Stage and Commit Changes:
- Click on the git dialog button.
- Click on the git dialog button.
- Push Changes to the Remote Branch:
- Enter your commit message.
- Click the
Commit & Push
button.
6. Submitting a Pull Request in Azure DevOps
-
Navigate to Azure DevOps:
- Open Azure DevOps: I2DB Azure DevOps.
- Navigate to your project.
-
Create a Pull Request:
- Go to "Repos" -> "Pull Requests."
- Click on "New Pull Request."
- Select your source branch (
project-branch-name
) and target branch (main
). - Add a title and description for your pull request.
- Add at least one team member as a reviewer.
-
Submit the Pull Request:
- Click on "Create" to submit the pull request.
-
Review and Merge:
- Once the pull request is reviewed and approved, it can be merged into the main branch by clicking the "Complete" button.