How to Manage Changes Using Azure DevOps and Azure Databricks
This guide will walk you through managing changes using an Azure DevOps Git repository for source control and pull requests, while making coding changes in the Azure Databricks web interface.
Prerequisites
Before you begin, ensure you have the following:
- An Azure DevOps account with access to a project and a Git repository.
- Access to the Azure Databricks workspace.
- Basic knowledge of Git and Azure DevOps.
Steps
1. Open the Repository in Azure Databricks
Note
Note: If you have not already connecting a Git Folder
to the repository, see Connect Databricks to a Repository for details on setting up the folder
- Navigate to the WUSM Data Lake.
- Sign in with your WUSTL Key.
- Navigate to the
Git Folder
for the repository within your home folder.
2. Pull the Latest Changes from the Main Branch
-
Navigate to the Repository in Databricks:
- In Databricks, go to Repos and select the cloned repository.
-
Pull the Latest Changes:
- In the repository, click on the branch indicator button.
- Select the
main
branch. - Click on the Pull button to fetch the latest changes from the
main
branch. - How to work with Git in Databricks
- In the repository, click on the branch indicator button.
3. Create a New Project Branch
- Create a New Branch:
- Click Create Branch.
- Enter the name of your new branch and base it off the
main
branch. - Click Create.
- How to create create a new branch in Databricks
4. Make Changes in the Project Branch
- Develop Your Code:
- Create or open a notebook in the repository.
- Make your desired code changes in the notebook.
5. Commit and Push Changes to the Remote Repository
- Commit Changes:
- Click on the branch indicator button at the top of the notebook.
- Enter a commit message describing your changes.
- Click Commit & Pus to commit and push the changes to the remote branch.
- How to push changes to a remote repository in Databricks
6. Create a Pull Request in Azure DevOps
-
Navigate to Azure DevOps:
- Go to Azure DevOps.
- Open the project that contains the repository that contains your code.
-
Create a Pull Request:
- Navigate to Repos > Pull Requests.
- Click New Pull Request.
- Select your newly created branch as the source branch and
main
as the target branch. - Add a title and description for your pull request.
- Click Create.
- How to create a pull request in Azure DevOps
-
Review and Complete the Pull Request:
- Collaborators can review the pull request.
- Once approved, click they will click the Complete button to merge the changes.
- How to review and complete pull requests in Azure DevOps
Conclusion
By following these steps, you have successfully managed changes using an Azure DevOps Git repository and made coding changes in the Azure Databricks web interface without using the terminal. This workflow ensures that your development process is streamlined and version-controlled.