Skip to main content

Should I use DABs locally or from the workspace?

Summary

  • You can use Declarative Automation Bundles (formerly Databricks Asset Bundles) both ways. A bundle keeps one identity in a workspace, so deploying it from your machine or from the workspace doesn't duplicate its resources.
  • Work locally with the Databricks CLI or the Databricks IDE extension when you want your own editor and the same databricks bundle commands your CI/CD pipeline will run.
  • Work in the workspace when collaborators don't want to install anything or learn YAML and the CLI. The bundle UI lets them edit, commit, deploy and run a bundle from a Git folder.
  • Production should come from Git and CI/CD either way. You can't deploy to another workspace from the bundle editor; the docs recommend committing through the Git folder and letting a CI/CD workflow deploy with the CLI.

Should I use DABs locally or from the workspace?

Use both, for different jobs. Develop wherever your team works best, locally in an IDE with the Databricks CLI or in the workspace bundle editor, and make Git plus a CI/CD pipeline the path to staging and production. Local development suits engineers who want their own editor and tooling. The workspace suits collaborators who want to edit, deploy to a dev target and run a bundle without installing the CLI or writing YAML.

What are Declarative Automation Bundles?

Declarative Automation Bundles describe Databricks resources such as Lakeflow Jobs, pipelines and dashboards as source files that live next to your code. The main configuration file is databricks.yml, and Databricks treats any folder with a databricks.yml at its root as a bundle. The Databricks CLI validates, deploys and runs bundles, and the workspace offers a UI for the same lifecycle.

Local or workspace: how they differ

Consideration Local (Databricks CLI or IDE extension) In the workspace
What you install Databricks CLI v0.218.0 or above, configured for your workspace Nothing locally. The workspace needs workspace files enabled, a Git folder for the bundle and serverless compute
Skills needed YAML and commands such as databricks bundle deploy -t dev No YAML or CLI knowledge required
CLI version You install and update it The Deploy dialog shows the version used
Dev deployments Bundle files are synchronized to the workspace on deploy; the source_linked_deployment preset is ignored Source-linked by default for development targets, so resources reference the source files in the workspace
Deploying to another workspace Supported through targets Not supported from the bundle editor
Sharing Through your Git provider Share the parent Git folder; bundles inherit its permissions

There's a middle path too. The docs note you can run the Databricks CLI from the workspace web terminal, just as you would from a local terminal.

How to decide

  • Who edits the bundle? If some contributors aren't comfortable with YAML or the CLI, the workspace UI lets them collaborate on bundles that others built in local environments.
  • Do you want your own editor and tooling? Local development fits a loop of editing in your IDE, running databricks bundle validate and deploying to a dev target, using the same CLI that a CI/CD workflow uses.
  • Is outbound network access restricted? Bundles in the workspace work with serverless egress control, but to build Python projects with packages from the public PyPI registry, the docs say to use a private mirror.
  • How will changes reach production? The same way in both cases: commit to Git, then let a CI/CD workflow deploy with the CLI, ideally as a service principal.

How Databricks approaches it

The two paths share one bundle. Bundles have unique identities in a workspace, so "regardless of whether a bundle is deployed from a local machine or the workspace, bundle assets are not duplicated." One engineer can build a bundle in an IDE while a colleague adjusts and redeploys it from the workspace. All bundle configuration is supported in the workspace, including resources defined with Python for Declarative Automation Bundles.
Deployment modes behave the same from either side. A target with mode: development prefixes deployed resources with [dev ${workspace.current_user.short_name}] and pauses schedules and triggers. A target with mode: production can validate that you're on the Git branch the target specifies, and Databricks recommends service principals for production deployments.
One difference matters for dev targets. In the workspace, deployments are source-linked by default, so file synchronization to ${workspace.file_path} is skipped. The source_linked_deployment preset only applies to bundles in the workspace and is ignored when you run databricks bundle deploy from the CLI.
Either way, deploying a bundle and running its resources executes code as the current user, so make sure you trust the bundle's code, including its YAML.
Start with Collaborate on bundles in the workspace, Deploy bundles and run workflows from the workspace and What are Declarative Automation Bundles?.

FAQs

Do I need the Databricks CLI to use bundles in the workspace?

No. You don't have to install anything locally. The workspace needs workspace files, a Git folder for the bundle and serverless compute enabled.

Can I edit a bundle from a GitHub repository in the workspace?

Yes. Create a Git folder for the repository. If databricks.yml sits at the root of the folder, Databricks recognizes it as a bundle.

Will deploying from my laptop and from the workspace create duplicate jobs?

No. A bundle has a unique identity in the workspace, so its assets aren't duplicated whichever side deploys it.

Can I deploy to production from the workspace?

You can switch the target to prod to deploy to the current workspace. You can't deploy to another workspace from the bundle editor, so the docs recommend a CI/CD workflow that uses the CLI for cross-workspace deployments.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.