Learning Objectives
By the end of this chapter, you will be able to:
- Manage the code development workflow in the workspace UI by creating and switching branches in Databricks Git Folders, committing and pushing changes, and creating pull requests through Databricks Git integration.
- Apply environment-specific configuration using Declarative Automation Bundle variables and overrides while promoting the same codebase across dev, test, and prod.
- Deploy Declarative Automation Bundles to package, configure, and promote Lakeflow Jobs, Lakeflow Spark Declarative Pipelines, and other workspace assets across environments.
- Use the Databricks CLI to validate, deploy, and manage Declarative Automation Bundles in automated CI/CD workflows.
Executive Summary
- Databricks Git Folders attach a workspace folder to a remote Git repository so notebooks, SQL files, Python modules, YAML, and bundle definitions can be branched, committed, and pushed without leaving the workspace, with pull request creation handed off to the Git provider.
- Declarative Automation Bundles (the renamed Databricks Asset Bundles, abbreviated DABs) describe Lakeflow Jobs, Lakeflow Spark Declarative Pipelines, schemas, volumes, and other resources in YAML, parameterized through variables, complex variables, lookups, and per-target overrides.
- The same bundle source tree is deployed to dev, test, and prod by selecting a
targetwhosemode,workspace,variables, andpermissionsreshape the deployed artifacts without editing the underlying job and pipeline definitions. - The Databricks CLI provides the verbs that CI/CD pipelines need:
bundle validatefor syntactic and semantic checks,bundle deployfor materializing the resources,bundle runfor triggering a job or pipeline, andbundle destroyfor tearing down a target deployment.
Assumptions
- The reader has a Databricks workspace with Unity Catalog enabled, can attach a remote Git provider, and has Git Folders permissions sufficient to create folders and branches.
- Code samples use a fictional catalog
acme_lakehouse, schemasbronze,silver,gold, and a Git provider such as GitHub. Substitute your provider and namespace as needed. - Terms defined in Chapters 1 through 4 (Lakeflow Jobs, Lakeflow Spark Declarative Pipelines, Unity Catalog, three-level namespace, job cluster, Serverless Jobs compute) are used without re-definition.
