The error message "No sync destination found" when running your Python file in Databricks with the Extension and Databricks Connect module, even with all green configuration checkmarks, typically indicates a configuration issue with the sync destination in your databricks.yml file.
Root Causes
-
If your root_path is set to the workspace root or a folder without a configured sync destination, Databricks cannot determine where to place or sync your code files.
-
The sync configuration for paths may not match the actual folder/file layout, especially if you are referencing files using relative paths outside of the root folder.
-
For certain advanced workflows (e.g., referencing notebooks or Python wheels from other bundles or folders), the resource must be explicitly included in the sync/paths section; otherwise, sync cannot find or place the file and throws this error.
Recommended Fixes
-
Review that your root_path in the workspace block matches the target folder in Databricks Workspace where files should sync (such as /Workspace/Users/[your-email]/).
-
Ensure that the sync/paths section covers all directories and files you intend to sync. For example, if your source code is in a sub-folder like src or common, paths must reference those (and not just the root or .) explicitly and those folders must exist.
-
Double-check there are no typos or conflicting entries in the exclude section (like .git, node_modules) that might block essential files or folders from being included in the sync.
Quick Checklist
-
Paths in the sync block should match your project file structure accurately.
-
If referencing files outside the bundle root, include those relative paths in sync/paths.
-
Validate that the destination specified (in root_path) exists and is writable in the workspace.
-
Consider reinitializing the extension or updating the Databricks CLI and extension to the latest version, as related issues have been reported with older versions.
Example Correction
If your code files are under src or another sub-folder, your sync block should look something like:
sync:
paths:
- src
- common
include:
- src/*
- common/*
exclude:
- .git
- .vscode
- node_modules
You may also want to try syncing manually with VS Code or CLI to confirm the file transfer works and to identify whether the root issue is with the config or the tool itself.
If problems persist, enable logs as you're already doing, and submit detailed logs to Databricks Support or review the full logs for further error messages.
Making sure your folder structure, root_path, and referenced items in sync are consistent and explicitly defined should resolve the "No sync destination found" error in most cases.