What are DABs and when should I use them?
Summary
- DABs are Declarative Automation Bundles, formerly known as Databricks Asset Bundles. They describe a Databricks project's jobs, pipelines, dashboards and other resources as YAML files that live next to the source code.
- A bundle deploys as one unit to a target environment. It includes source files such as notebooks and Python files, resource definitions and settings, and unit and integration tests.
- Use bundles when a project has multiple contributors, needs automation and treats CI/CD as a requirement. The docs also call out ML pipelines, organization-wide project templates and regulated work that needs a versioned history.
- You work with bundles through the Databricks CLI, the Databricks IDE extension, or the workspace UI, which needs no local install.
What are DABs and when should I use them?
Declarative Automation Bundles are how Databricks applies infrastructure as code to data and AI projects. A bundle describes the jobs, pipelines, dashboards, model serving endpoints and other resources a project needs in YAML files kept in the same Git repository as the code, and the Databricks CLI validates, deploys and runs that definition as one unit. Use them once a project has more than one contributor or has to move through development, staging and production. They're the tool Databricks recommends for CI/CD pipelines.
What is in a bundle?
The docs define a bundle as "an end-to-end definition of a project, including how the project should be structured, tested, and deployed." It has four parts:
- Required cloud infrastructure and workspace configurations
- Source files, such as notebooks and Python files, that hold the business logic
- Definitions and settings for Databricks resources: Lakeflow Jobs, pipelines built with Spark Declarative Pipelines (SDP), dashboards, Model Serving endpoints, MLflow experiments and MLflow registered models
- Unit tests and integration tests
The main configuration file is databricks.yml. Its targets mapping describes each environment you deploy to, such as dev and prod.
When should you use bundles?
The docs' rule of thumb: use bundles "when you want to manage complex projects where multiple contributors and automation are essential, and continuous integration and deployment (CI/CD) are a requirement."
| Situation | Use bundles? | Why |
|---|---|---|
| Team project with code review and CI/CD | Yes | Bundles keep code, jobs and infrastructure versioned and deployed together |
| ML training and batch inference pipelines | Yes | Manage ML pipeline resources with production practices from the start |
| Standards for new projects | Yes | Custom bundle templates can include default permissions, service principals and CI/CD configuration |
| Regulated work | Yes | A versioned history of code and infrastructure supports governance and compliance |
| Jobs already built in the UI | Yes, incrementally | databricks bundle generate creates configuration for an existing job, pipeline, dashboard or app, and databricks bundle deployment bind links a bundle resource to an existing workspace resource |
| Cloud networking or workspace provisioning | No, use Terraform | The docs reserve Terraform for cloud-level and external resources and admin actions |
| Syncing notebooks without external CI/CD | Not required | A production Git folder can source-control code files on their own |
How bundles work
You define bundle metadata in YAML, then use the Databricks CLI to validate, deploy and run it. A typical first session:
databricks bundle init
databricks bundle validate
databricks bundle deploy -t dev
databricks bundle run -t dev hello_job
databricks bundle init offers Databricks templates such as default-python, default-sql, default-minimal, dbt-sql and mlops-stacks, or a custom template your team maintains. Each target can set a deployment mode. Development mode prefixes deployed resources with [dev ${workspace.current_user.short_name}] and pauses schedules and triggers. Production mode can check that you deploy from the branch the target names, and Databricks recommends deploying to production as a service principal.
A resource's association with a bundle is tracked by the bundle name, the target and the workspace, so deploying again updates resources that already exist in the target workspace.
How Databricks supports working with bundles
| Where you work | What you need | Good for |
|---|---|---|
| Databricks CLI | CLI v0.218.0 or above, workspace files enabled, OAuth user-to-machine authentication recommended | Local development and CI/CD pipelines |
| Databricks IDE extension | Visual Studio Code or Cursor | Defining, deploying and running bundles from an IDE UI |
| Workspace UI | Workspace files, a Git folder and serverless compute; no local install | Editing, deploying and running bundles without YAML or CLI knowledge |
The docs' best practices favor small, focused bundles: put what a single team owns into one bundle, have each bundle cover all of its environments, and split bundles along product, ownership or lifecycle boundaries. Deploy to a location your team owns, not /Workspace/Shared.
See What are Declarative Automation Bundles?, Declarative Automation Bundles configuration and Developer best practices.
FAQs
Are DABs and Declarative Automation Bundles the same thing?
Yes. Declarative Automation Bundles is the name the Databricks docs use now for the same feature, so search the docs for that name.
Do I need to install anything to use bundles?
For local development, install the Databricks CLI, version v0.218.0 or above. To use bundles only in the workspace, you don't need the CLI.
Should I use bundles or Terraform?
Usually both. Databricks recommends Terraform for cloud-level and external resources and admin actions such as workspace provisioning, and bundles for all other Databricks resources.
Can I define bundle resources in Python?
Yes. Python for Declarative Automation Bundles lets you define resources in Python, and those bundles also work in the workspace bundle editor.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.