Databricks Repos and Git integration have limits specified in the following sections. For general information, see Databricks limits.
Databricks doesn’t enforce a limit on the size of a repo. However:
Working branches are limited to 200 MB.
Individual files are limited to 200 MB.
Files larger than 10 MB can’t be viewed in the Databricks UI.
Databricks recommends that in a repo:
The total number of all files not exceed 10,000.
The total number of notebooks not exceed 5,000.
You might receive an error message if your repo exceeds these limits. You might also receive a timeout error when you clone the repo, but the operation might complete in the background.
To work with repo larger than the size limits, try sparse checkout.
The contents of a repo are temporarily cloned onto disk in the control plane. Databricks notebook files are stored in the control plane database just like notebooks in the main workspace. Non-notebook files are stored on disk for up to 30 days.
Databricks Repos supports Bitbucket Server integration, if the server is internet accessible.
To integrate with a Bitbucket Server, GitHub Enterprise Server, or a GitLab self-managed subscription instance that is not internet-accessible, get in touch with your Databricks representative.
Yes. If you add a file to your repo and do not want it to be tracked by Git, create a
.gitignore file or use one cloned from your remote repository and add the filename, including the extension.
.gitignore works only for files that are not already tracked by Git. If you add a file that is already tracked by Git to a
.gitignore file, the file is still tracked by Git.
Yes, admins can create top-level folders to a single depth. Repos does not support additional folder levels.
No. You can clone a repo that contains Git submodules, but the submodule is not cloned.
Follow these steps to disable Repos for Git in your workspace.
Go to the admin settings page.
Click the Workspace Settings tab.
In the Advanced section, click the Repos toggle.
Refresh your browser.
This is currently a limitation because Databricks notebook source files don’t store notebook dashboard information.
If you want to preserve dashboards in the Git repository, change notebook format to ``````.ipynb` (the Jupyter notebook format). By default,
.ipynb supports dashboard and visualization definitions. If you want to preserve graph data (data points), you need to commit the notebook with outputs.
To learn about committing
.ipynb notebook outputs, see Allow committing `.ipynb` notebook output.
Yes. Support for Jupyter notebooks (
.ipynb files) is available in Repos. You can clone repositories with
.ipynb notebooks, work in Databricks UI, and then commit and push as
.ipynb notebooks. Metadata such as the notebook dashboard is preserved. Admins can control whether outputs can be committed or not.
You can also:
Convert notebooks to
.ipynbfile format. In the Databricks editor, go to the File menu and select Change notebook format.
View diffs as Code diff (code changes in cells) or Raw diff (code changes in
JSON, including notebook outputs as metadata).
For more information on the kinds of notebooks supported in Databricks, see Export and import Databricks notebooks.
Yes. You can also create a pull request and merge through your Git provider.
No. To delete a branch, you must work in your Git provider.
If a library is installed on a cluster, and a library with the same name is included in a folder within a repo, which library is imported?
The library in the repo is imported.
Can I pull the latest version of a repository from Git before running a job without relying on an external orchestration tool?
No. Typically you can integrate this as a pre-commit on the Git server so that every push to a branch (main/prod) updates the Production repo.
When you try to clone a repo, you might get a “denied access” error message when:
Databricks is configured to use Azure DevOps with Azure Active Directory authentication.
And you have enabled a conditional access policy in Azure DevOps and an Azure Active Directory conditional access policy.
To resolve this, add an exclusion to the conditional access policy (CAP) for the IP address or users of Databricks.
For more information, see Conditional access policies.
The contents of Databricks Repos are encrypted by Databricks using a platform-managed key. Encryption using Customer-managed keys is not supported.
The authentication tokens are stored in the Databricks control plane, and a Databricks employee can only gain access through a temporary credential that is audited.
Databricks logs the creation and deletion of these tokens, but not their usage. Databricks has logging that tracks Git operations that can be used to audit the usage of the tokens by the Databricks application.
GitHub enterprise audits token usage. Other Git services might also have Git server auditing.
Git operations that alter the notebook source code result in the loss of the notebook state, including cell outputs, comments, version history, and widgets. For example,
git pull can change the source code of a notebook. In this case, Databricks Repos must overwrite the existing notebook to import the changes.
git commit and
push or creating a new branch do not affect the notebook source code, so the notebook state is preserved in these operations.
MLflow experiment data in a notebook might be lost in this scenario: You rename the notebook and then, before calling any MLflow commands, change to a branch that doesn’t contain the notebook.
To prevent this situation, Databricks recommends you avoid renaming notebooks in repos.
No. You can only create an MLflow experiment in the workspace. Experiments created in a repo before the 3.72 platform release are no longer supported, though they may continue to work without guarantees. Databricks recommends exporting existing experiments in repos to workspace experiments using the MLflow export tool.
At any point while a Git operation is in progress, some notebooks in the repo might have been updated while others have not. This can cause unpredictable behavior.
For example, suppose
notebook A calls
notebook Z using a
%run command. If a job running
during a Git operation starts the most recent version of
notebook A, but
notebook Z has not
yet been updated, the
%run command in notebook A might start the older version of
During the Git operation, the notebook states are not predictable and the job might fail or run
notebook A and
notebook Z from different commits.
Workspace files in Repos supports non-notebook solution files in Databricks Repos.
In Databricks Runtime 10.1 and below, workspace files in Repos are not compatible with Structured Streaming. To use Structured Streaming on a cluster running Databricks Runtime 10.1 or below, you must disable workspace files in Repos on the cluster. Set the Spark configuration
Only text-encoded files are rendered in the UI. To view files in Databricks, the files must not be larger than 10 MB.
You cannot create or edit a file from your notebook.
You can only export notebooks. You cannot export non-notebook files from a repo.
For workspace files in Repos, file operations in Scala are not supported. You might see errors like
error: not found: value Try:
You can use any of the following:
Bundle and deploy as a library on the cluster.
Pip install the Git repository directly. This requires a credential in secrets manager.
%runwith inline code in a notebook.
Use a custom container image. See Customize containers with Databricks Container Services.