Synchronize Databricks workspace content with a local directory.
Project description
dbx-sync
__ __
,___/ // /____ __ _____ __ ______ _____
/ __ // __ \\ \ / /_____/ ___// / / / __ \/ ___/
/ /_/ // /_/ // X \____(__ )/ /_/ / / / / /__
/_____//_____//__/ \__\ /____/ \__, /_/ /_/\___/
/____/
Are you tired of bouncing between the Databricks workspace UI and your local editor, copying changes by hand, and pretending that counts as a workflow? Well now there's dbx-sync.
dbx-sync keeps a single Databricks workspace folder and a single local directory in sync so you can work with your favorite tools and still stay aligned with what is running in Databricks.
Build locally, run in Databricks, tweak it there, then jump back to local coding. Skip the usual copy-paste ritual or one-way imports to weird folders.
Great for AI coding-agent workflows, including GitHub Copilot and Claude-based setups that work best against a real local folder.
Worried about losing files? dbx-sync does not delete files locally or remotely, but it can overwrite content if both sides changed while you were not syncing. Use version control locally and Databricks revision history remotely when you need rollback.
Current scope notes:
- Sync is limited to a single local folder and a single Databricks workspace folder.
- File and folder discovery is not recursive.
- Local tracking currently covers notebook files with Databricks notebook extensions:
.py,.sql,.scala,.r, and.ipynb.
Prerequisites
- Databricks CLI 0.205 or newer
- With a configured Databricks CLI profile
Install
Recommended: install as a uv tool
Install dbx-sync as a tool so you can run it directly from your shell:
uv tool install dbx-sync
Alternative: install with pip
If you prefer a standard virtual environment workflow, install the package with pip:
python -m pip install dbx-sync
Alternative: run from a local checkout
If you are developing on the project itself, install the local environment and run it with uv run:
uv sync --dev
uv run dbx-sync ./local-project /Workspace/Users/me/project
Usage
Sync a single workspace folder with a single local folder (one-time):
dbx-sync ./local-project /Workspace/Users/me/project
Preview actions without applying them:
dbx-sync ./local-project /Workspace/Users/me/project --dry-run
Continuously watch and resync (default polling happens every second):
dbx-sync ./local-project /Workspace/Users/me/project --watch
Override optional settings when needed:
dbx-sync ./local-project /Workspace/Users/me/project \
--profile WORKSPACE \
--poll-interval 5 \
--log-level DEBUG \
--force
Use --force to clear saved sync state before a fresh pass.
The local directory may start empty or not exist yet. On a non-dry-run sync, the tool creates what it needs under that directory when files or sync state are written.
Alternatives
Yes, I recognize there are a variety of official ways to do something close to this, but none of them fit my desired workflow well. So here are some references for alternatives.
- Databricks CLI workspace commands (
import,import-dir,export,export-dir,sync, and related commands): https://learn.microsoft.com/en-us/azure/databricks/dev-tools/cli/commands/ - Databricks extension for Visual Studio Code: https://learn.microsoft.com/en-us/azure/databricks/dev-tools/vscode-ext/
- Databricks Asset Bundles documentation: https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/
- Databricks Git folders: https://learn.microsoft.com/en-us/azure/databricks/repos/
Development
See CONTRIBUTING.md for local development, testing, release, and repository workflow details.
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dbx_sync-0.1.0.tar.gz.
File metadata
- Download URL: dbx_sync-0.1.0.tar.gz
- Upload date:
- Size: 37.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b44e5a0c66643eb07b462d18e55ea90561ac2b1a1a819762d9fb3fe98945ce79
|
|
| MD5 |
debb1b4b3fae9809cd9eea1be2e74cc9
|
|
| BLAKE2b-256 |
814e9eeb2903c561cb655a5ed9cb2d5729dd4fb3ecbd9cf7d47152bd7cd9f5d7
|
File details
Details for the file dbx_sync-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dbx_sync-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
522bc196cd06371e7b38306e7158bab1850f93fab37c326a7175737d023e818a
|
|
| MD5 |
fc9a0703e1d74576efdfe375be6b5c73
|
|
| BLAKE2b-256 |
cb93217afe4c14f0339a1d887fb4afde73d02d34bed3929fada1c56357cf1618
|