Databricks Asset Bundles provide a repeatable way to define notebooks, jobs, pipelines, and related configuration in Git, then promote the same project across development, staging, and production. This guide gives you a practical project structure, deployment-target pattern, validation workflow, CI/CD checklist, and rollback plan you can reuse whenever a bundle or release process changes.
Overview
A bundle is a source-controlled project that describes Databricks resources as configuration and deployable files. Instead of creating every job or pipeline manually in each workspace, your team reviews the desired state in Git and uses the Databricks CLI to validate, deploy, run, or remove that state.
A useful bundle separates three concerns:
- Code: notebooks, Python modules, SQL files, tests, and supporting files.
- Resources: jobs, pipelines, permissions, and other supported Databricks objects.
- Targets: environment-specific workspace URLs, paths, identities, parameters, and deployment modes.
Start with a structure that is easy to review and predictable for automation:
my-data-project/
├── databricks.yml
├── resources/
│ ├── jobs.yml
│ └── pipelines.yml
├── src/
│ ├── notebooks/
│ └── transformations/
├── tests/
├── requirements.txt
└── README.md
The exact files depend on the workload. A small project can keep resource definitions in databricks.yml; a larger project benefits from separate files referenced through an include pattern. Keep resource keys stable after the first deployment. Renaming a key can make a deployment appear to create a new resource rather than update the existing one.
Use the current Databricks Asset Bundles schema and CLI documentation for the fields supported by your installed CLI version. Bundle syntax and supported resource types can evolve, so treat local validation as a required step rather than assuming that a configuration copied from another project is still valid.
Checklist by scenario
First project setup
- Choose a repository and create one bundle per independently released application or data product.
- Add a root
databricks.ymlwith the bundle name, included resource files, and target definitions. - Place notebooks and application code under a stable source directory rather than relying on files edited directly in a workspace.
- Define jobs and pipelines in resource files, including task dependencies, parameters, libraries, schedules, and notifications where needed.
- Document the expected workspace, catalog, schema, storage locations, and required permissions in the README.
- Run
databricks bundle validate -t devbefore opening a pull request.
Development deployment
- Use a developer-owned or shared development target with an explicit workspace path.
- Set development-only values through target variables or environment variables; do not hard-code credentials or production identifiers.
- Deploy with
databricks bundle deploy -t dev. - Run a representative job with
databricks bundle run -t dev <job-key>, or test the deployed pipeline through its normal interface. - Review task output, permissions, data quality expectations, and generated configuration before promoting the change.
Staging or release-candidate deployment
- Require a reviewed pull request and a successful CI validation before deployment.
- Use a staging target that matches production conventions for catalogs, schemas, cluster policies, libraries, and service identities as closely as practical.
- Deploy from the commit being tested, not from an uncommitted local working tree.
- Run smoke tests that cover the complete workflow: input discovery, transformation, output publication, permissions, and notifications.
- Record the bundle version, Git commit, target, and test result in the release record.
Production promotion
- Use a dedicated production target and a deployment identity with only the permissions required for the release.
- Validate the exact commit that was tested in staging.
- Review changes to schedules, task dependencies, compute settings, data destinations, access controls, and destructive operations.
- Deploy with
databricks bundle deploy -t prodonly after the approval gate has passed. - Run a controlled smoke test, then monitor the first scheduled or manually triggered execution.
CI/CD pipeline
A platform-neutral pipeline can follow this sequence:
- Check out the commit that triggered the workflow.
- Install the approved Databricks CLI version and any project dependencies.
- Authenticate using the repository’s protected secret mechanism. Prefer a non-human deployment identity and short-lived or centrally managed credentials where your platform supports them.
- Run unit tests and static checks for notebooks, Python, SQL, and configuration.
- Run
databricks bundle validate -t stagingor the target appropriate for the branch. - Deploy to staging after validation, then execute smoke tests.
- Pause for approval before production deployment.
- Deploy to production and publish the command output, commit identifier, and target as build artifacts.
GitHub Actions and Azure DevOps can both implement this pattern. Keep platform-specific YAML thin: the repository should contain the meaningful validation and deployment commands, while the CI system supplies triggers, secrets, approvals, and logs.
What to double-check
| Area | Review questions |
|---|---|
| Targets | Does every target identify the correct workspace, root path, deployment mode, and environment-specific variables? |
| Authentication | Is CI using a managed deployment identity rather than a developer’s personal token? Are secrets excluded from Git and logs? |
| Resource identity | Will stable resource keys update existing jobs and pipelines instead of creating duplicates? |
| Data access | Can the deployed identity read and write the required Unity Catalog objects, volumes, external locations, or storage paths? |
| Runtime behavior | Are task parameters, libraries, retries, timeouts, schedules, and notifications appropriate for the target? |
| State and drift | Were workspace edits made outside Git, and if so, have they been reconciled before deployment? |
| Rollback | Can you identify the last known-good commit and explain how to restore the previous configuration and data behavior? |
Permissions deserve a separate review. A deployment can succeed while a subsequent job fails because the runtime identity lacks access to a catalog, schema, external location, or secret. For related access checks, see the Databricks Unity Catalog permissions troubleshooting guide and the secret management rotation checklist.
Also distinguish bundle rollback from data rollback. Re-deploying an earlier bundle commit can restore job or pipeline configuration, but it does not automatically undo records written to a table or files created by a run. Data recovery needs its own versioning, retention, and restore procedure.
Common mistakes
- Using one target for every environment: This makes accidental production deployment easier and hides differences that should be reviewed explicitly.
- Putting secrets in YAML: Store references or environment-provided values instead. Review rendered logs to ensure secret values are not exposed.
- Testing only validation: Schema validation catches configuration errors, not incorrect permissions, bad data paths, failed dependencies, or unsuitable runtime settings.
- Editing deployed resources manually: Manual fixes create drift. If an emergency edit is necessary, capture it in Git immediately and redeploy from the corrected source.
- Changing keys casually: Resource keys are part of the bundle’s identity model. Treat renames as migration decisions and check whether old resources require explicit cleanup.
- Rolling back without checking compatibility: An older job definition may expect a different table schema, library, notebook parameter, or pipeline setting.
- Ignoring operational symptoms: A successful deployment does not prove that a workflow will complete reliably. Use the workflow troubleshooting checklist when retries, dependencies, alerts, or recovery behavior are involved.
Rollback checklist
- Pause or disable the affected schedule if continued runs could worsen the issue.
- Capture the failed deployment, run identifier, logs, affected resources, and data impact.
- Identify the last known-good Git commit and confirm its target-specific variables remain valid.
- Validate and deploy that commit to the affected environment.
- Run a controlled verification and compare outputs with the expected baseline.
- Handle data correction separately, then document the incident and add a regression test or deployment guard.
When to revisit
Revisit this checklist before seasonal planning cycles, major release windows, workspace migrations, or changes to identity and access management. It should also be reviewed whenever the Databricks CLI, Asset Bundles schema, supported resource types, authentication approach, CI provider, cluster policy, catalog layout, or deployment approval process changes.
For each review, make a small evidence-based update: run validation against every active target, test one representative deployment, confirm the CI identity and secret path, and verify that rollback instructions still work. If the project includes AI workloads, review model, prompt, endpoint, and evaluation dependencies alongside bundle resources; the LLM evaluation guide can help turn behavioral checks into repeatable release gates.
Before the next deployment, print or copy this short gate:
- Correct commit selected.
- Correct target selected.
- Authentication tested without exposing secrets.
- Bundle validation passed.
- Staging smoke test passed.
- Permissions and data destinations reviewed.
- Approval recorded.
- Last known-good commit and data recovery path identified.
That discipline keeps Databricks CI/CD understandable: Git describes the intended state, targets describe where it belongs, validation catches structural errors, testing checks behavior, and rollback remains a deliberate operational procedure rather than an improvised command.