Version Control in Databricks Notebook

In this post, we are going to learn to configure version control in Databricks Notebook. The version controlling is important for keeping the changes track of the notebook.

Overview

The version control is the state of changes in the notebook. With version control, we can go to the previous version and check the changes in the code by comparing it with the current version of the notebook.

Default Revision History in Databrick Notebook

By default, Databricks notebook used to track the changes and keep the history. You can review the history using this.

If you see in the above screenshot, currently there are 2 history versions of the notebook under Revision History. You can choose to restore this version.

Currently, I have selected the first/old version of the notebook. Now, click on the current version:

The above screenshot, it is showing the changes code.

Configure Version Control

There are multiple options available to link:

  • Azure DevOps
  • GitHub
  • Bitbucket Cloud

Go to Cluster and click on User Setting:

Notebook Integration with Version Control

If you see the Revision History section, it shows there is no git linked.

Once you are done with the above step. You can now integrate the notebook to link with the configured version control.

Here, provide the link to the GitHub repo. Also, you can change the branch from master to any existing branch or create a new branch to check in the notebook.

Wrapping Up

In this post, we have learned how to use default revision history for switching the version. We have also seen how can we link the notebook to the version control. The version control tracks the changes and get used for deployment in the different environment with different version if required.

Sharing is caring!

Subscribe to our newsletter
Loading

Leave a Reply