Databricks & Lakehouse
CI/CD with DABs: Git, Bundles, and Promoting Pipelines Across Environments Without Breaking…
DataForge Series: Databricks Data Engineer Associate — Part 10 of 16
CI/CD with DABs: Git, Bundles, and Promoting Pipelines Across Environments Without Breaking Production
DataForge Series: Databricks Data Engineer Associate — Part 10 of 16
The pipeline works in dev. You promote it to staging. It works in staging. You promote it to production. It fails — but not with an error you’ve seen before.
The notebook path is wrong. In dev, the notebook lived at /Users/engineer@company.com/pipelines/transform. In production, it needs to be at /Shared/pipelines/transform. You hardcoded the dev path in the job configuration. Nobody caught it in code review because it looked like a valid path. The production cluster is a different size. The table names are different. The credentials point to the dev database.
You spend three hours manually updating configuration files, re-deploying, and testing. The production deployment that should have taken ten minutes took most of the day.
This is the operational reality of manual Databricks deployments — environment-specific configuration scattered across notebooks, job definitions, and cluster configs, with no systematic way to promote changes across environments without manual intervention.
Databricks Asset Bundles (DABs) solve this by making your entire pipeline — jobs, clusters, notebooks, parameters, permissions — a versioned, deployable artifact defined in code. The same codebase deploys to dev, staging, and production with environment-specific overrides applied automatically.
Let’s go deep.
TL;DR
Databricks Asset Bundles (DABs) are the CI/CD mechanism for Databricks — they package your pipelines, jobs, notebooks, and workspace assets as code in a Git repository, with environment-specific configuration overrides that promote the same codebase from dev to staging to production without manual reconfiguration.
By the end of this article you’ll be able to:
- Explain the anatomy of a DABs bundle and what each component does
- Configure environment-specific overrides for table names, cluster sizes, credentials, and notebook paths
- Execute the full DABs deployment workflow using the Databricks CLI
- Reason through the exam’s CI/CD scenarios by understanding what DABs deploys, what it doesn’t, and how environment promotion works
Exam relevance: CI/CD and DABs concepts appear in ~4–5 questions. The exam tests whether you understand the correct tool for versioned, repeatable pipeline deployment — and why manual notebook-based deployment isn’t it. Sample Question 5 in the official exam guide tests exactly this: DABs is the answer, and the wrong answers are all approaches that lack systematic environment promotion.

The Problem: Why Manual Deployment Breaks at Scale
Before DABs, deploying a Databricks pipeline to a new environment required:
- Manually copying notebooks to the target workspace
- Manually updating job configurations with environment-specific paths and credentials
- Manually adjusting cluster sizes for production vs development workloads
- Manually updating table references from dev catalog to prod catalog
- No systematic record of what changed between deployments
- No rollback mechanism if production deployment broke something
This works for one engineer with one pipeline. It breaks for three engineers with ten pipelines across three environments. The configuration state becomes distributed across workspace UIs, job JSON exports, and tribal knowledge — impossible to audit, difficult to reproduce, and error-prone under time pressure.
DABs solve this by inverting the model: instead of configuring in the UI and exporting for version control, you define everything in code and deploy via CLI. The workspace UI becomes a read-only view of what the bundle deployed.
DABs Anatomy: What’s in a Bundle
A Databricks Asset Bundle is a directory with a specific structure:
my_pipeline_bundle/
├── databricks.yml ← root bundle configuration
├── resources/
│ ├── jobs.yml ← job definitions
│ └── clusters.yml ← cluster definitions (optional)
├── src/
│ ├── bronze/
│ │ └── ingest_events.py
│ ├── silver/
│ │ └── transform_events.py
│ └── gold/
│ └── build_revenue.sql
└── tests/
└── test_transform.pyThe Root Configuration: databricks.yml
bundle:
name: revenue_pipeline
workspace:
host: ${var.databricks_host}
root_path: /Shared/bundles/${bundle.name}
variables:
databricks_host:
description: "Databricks workspace URL"
catalog:
default: dev
description: "Unity Catalog target catalog"
cluster_size:
default: Small
description: "Job cluster node type"
targets:
dev:
mode: development
default: true
workspace:
host: https://dev-workspace.azuredatabricks.net
variables:
catalog: dev
cluster_size: Small
staging:
mode: staging
workspace:
host: https://staging-workspace.azuredatabricks.net
variables:
catalog: staging
cluster_size: Medium
prod:
mode: production
workspace:
host: https://prod-workspace.azuredatabricks.net
variables:
catalog: prod
cluster_size: Large
run_as:
service_principal_name: prod-pipeline-spWhat each section does:
bundle.name — the bundle identifier. Used in workspace paths, job names, and resource naming to namespace bundle resources away from manually-created resources.
workspace.root_path — where bundle resources (notebooks, files) are deployed in the workspace. Using ${bundle.name}ensures each bundle has its own namespace.
variables — named parameters with defaults and descriptions. Referenced throughout the bundle as ${var.variable_name}. Override per target environment.
targets — environment definitions. Each target specifies the workspace host, variable overrides, and run identity. The default: true flag means databricks bundle deploy without a --target flag deploys to this target.
run_as — the identity used when running jobs in that target. Production jobs run as a service principal, not as an individual engineer's identity. This is the correct production security model — jobs shouldn't depend on a specific person's credentials.
Job Definitions: Resources as Code
# resources/jobs.yml
resources:
jobs:
revenue_pipeline:
name: revenue_pipeline_${bundle.target}
description: "Nightly revenue ingestion and transformation"
schedule:
quartz_cron_expression: "0 0 2 * * ?"
timezone_id: "UTC"
pause_status: UNPAUSED
job_clusters:
- job_cluster_key: etl_cluster
new_cluster:
spark_version: 14.3.x-scala2.12
node_type_id: ${var.cluster_node_type}
num_workers: ${var.cluster_workers}
spark_conf:
spark.sql.shuffle.partitions: "400"
spark.sql.adaptive.enabled: "true"
tasks:
- task_key: ingest_bronze
job_cluster_key: etl_cluster
python_wheel_task:
package_name: revenue_pipeline
entry_point: ingest_bronze
parameters:
- "--catalog"
- "${var.catalog}"
- "--schema"
- "bronze"
- task_key: transform_silver
depends_on:
- task_key: ingest_bronze
job_cluster_key: etl_cluster
notebook_task:
notebook_path: ./src/silver/transform_events.py
base_parameters:
catalog: "${var.catalog}"
source_table: "${var.catalog}.bronze.events"
target_table: "${var.catalog}.silver.events_cleaned"
- task_key: build_gold
depends_on:
- task_key: transform_silver
sql_task:
file:
path: ./src/gold/build_revenue.sql
warehouse_id: ${var.sql_warehouse_id}Key patterns:
name: revenue_pipeline_${bundle.target} — appends the target name to the job name. Dev runs create revenue_pipeline_dev, prod runs create revenue_pipeline_prod. They don't collide in the workspace.
notebook_path: ./src/silver/transform_events.py — relative path from the bundle root. DABs resolves this to the absolute workspace path after deployment. No hardcoded workspace paths.
"${var.catalog}.bronze.events" — the catalog variable resolves to dev, staging, or prod depending on the deployment target. The same SQL logic runs against the correct catalog automatically.
How DABs Resolves Environment Configuration
This is the mechanism that makes environment promotion reliable rather than error-prone.
When you run databricks bundle deploy --target prod, DABs walks through a resolution sequence:
Bundle configuration resolution for target: prod
Step 1: Load root databricks.yml
bundle.name = "revenue_pipeline"
variables.catalog.default = "dev"
variables.cluster_size.default = "Small"
Step 2: Apply target "prod" overrides
workspace.host = "https://prod-workspace.azuredatabricks.net"
variables.catalog = "prod" ← overrides default "dev"
variables.cluster_size = "Large" ← overrides default "Small"
run_as = prod-pipeline-sp
Step 3: Resolve variable references throughout all resources
"${var.catalog}" → "prod"
"${var.cluster_size}" → "Large"
"${bundle.target}" → "prod"
Step 4: Generate final job definition
job name: revenue_pipeline_prod
catalog refs: prod.bronze.events, prod.silver.events_cleaned
cluster size: Large
run identity: prod-pipeline-sp (service principal)
notebook paths: resolved to /Shared/bundles/revenue_pipeline/src/...
Step 5: Deploy to prod workspace
Upload source files to workspace root path
Create/update job with resolved configuration
Register permissions as defined
What never changes between targets:
- Transformation logic (same notebooks/scripts)
- DAG structure (same task dependencies)
- Spark configuration (same tuning parameters)
- Data quality rules (same validation code)
What changes automatically:
- Catalog references (dev → staging → prod)
- Cluster sizes (Small → Medium → Large)
- Run identity (engineer → service principal)
- Workspace host (dev URL → prod URL)The guarantee: the same code runs in every environment. Only the configuration wrapper changes. This is why “it works in dev but fails in prod” becomes a configuration problem — not a code problem — and configuration problems are systematically prevented by the variable resolution mechanism.
Git Folders: The Development Workflow
Before DABs deployment, code lives in Git. Databricks Git Folders (formerly Databricks Repos) integrates Git repositories directly into the Databricks workspace — engineers develop in notebooks that are backed by a Git repository.
Development workflow:
1. Clone repository into Databricks workspace
Databricks UI → Workspace → Git Folders → Add Git Folder
Repository: https://github.com/company/revenue-pipeline
Branch: main
2. Create feature branch
Git Folder UI → Branch dropdown → New Branch
Branch name: feature/add-user-attribution
3. Develop in notebooks
Edit notebooks in Databricks UI
Changes are tracked in Git Folder
4. Commit and push
Git Folder UI → Git → Commit & Push
Commit message: "Add user attribution to Silver transform"
5. Create pull request
GitHub/GitLab/Azure DevOps → New PR
feature/add-user-attribution → main
Code review → approval → merge
6. Deploy via DABs
CI/CD pipeline triggers on merge to main
databricks bundle deploy --target stagingThe Git Folders mental model:
Git Folders is not a deployment mechanism. It’s a development environment that happens to be backed by Git. The actual deployment — taking code from Git and creating jobs, clusters, and resources in the workspace — is DABs.
Confusing the two is a common misconception the exam tests: “use Git Folders to deploy to production” is wrong. Git Folders gives you version control during development. DABs handles deployment across environments.
The Databricks CLI: Deployment Commands
The Databricks CLI is the execution layer for DABs operations. Every CI/CD pipeline that deploys Databricks assets uses the CLI under the hood.
# Install Databricks CLI
pip install databricks-cli
# or
curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh
# Configure authentication
databricks configure --token
# Enter workspace URL and personal access token (dev)
# In CI/CD: use service principal OAuth, not personal tokens
# Validate bundle configuration (catches syntax errors before deployment)
databricks bundle validate --target staging
# Deploy to staging
databricks bundle deploy --target staging
# Deploy to production
databricks bundle deploy --target prod
# Run a specific job after deployment
databricks bundle run revenue_pipeline --target prod
# Destroy all bundle resources in an environment
databricks bundle destroy --target dev
# WARNING: destroys jobs, uploaded files, registered assets
# does NOT delete Delta tables (data is separate from jobs)The validate step is non-optional in CI/CD:
# GitHub Actions CI/CD pipeline
name: Deploy Revenue Pipeline
on:
push:
branches: [main]
jobs:
deploy-staging:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Databricks CLI
run: pip install databricks-cli
- name: Validate bundle
run: databricks bundle validate --target staging
env:
DATABRICKS_HOST: ${{ secrets.STAGING_HOST }}
DATABRICKS_TOKEN: ${{ secrets.STAGING_TOKEN }}
- name: Deploy to staging
run: databricks bundle deploy --target staging
env:
DATABRICKS_HOST: ${{ secrets.STAGING_HOST }}
DATABRICKS_TOKEN: ${{ secrets.STAGING_TOKEN }}
deploy-prod:
needs: deploy-staging
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- name: Deploy to production
run: databricks bundle deploy --target prod
env:
DATABRICKS_HOST: ${{ secrets.PROD_HOST }}
DATABRICKS_TOKEN: ${{ secrets.PROD_TOKEN }}The needs: deploy-staging dependency ensures staging deployment must succeed before production deployment runs. This is the CI/CD gate that prevents broken code from reaching production — the same dependency logic as Lakeflow Jobs task dependencies, applied at the deployment pipeline level.
Environment-Specific Configuration: What Should Change and What Shouldn’t
This is the configuration discipline that determines whether environment promotion is reliable or error-prone.
Should be variable (changes per environment):
# These belong in target-specific variables
variables:
catalog: # dev → staging → prod
cluster_node_type: # Standard_DS3 → Standard_DS4 → Standard_DS5
cluster_workers: # 2 → 4 → 8
sql_warehouse_id: # dev warehouse → prod warehouse
notification_email: # dev-alerts@ → prod-alerts@
schedule_pause_status: # PAUSED (dev) → UNPAUSED (prod)Should be constant (same across all environments):
# These belong in the base configuration, not in target overrides
# - Transformation logic (notebooks, scripts)
# - DAG structure (task dependencies)
# - Data quality rules
# - Spark tuning parameters
# - Retry configuration
# - Timeout values
# - Column names and schema definitionsThe configuration discipline rule:
If changing a value means the pipeline runs differently, it’s a variable. If changing a value only changes where or how fast the pipeline runs, it’s still a variable. If the value represents what the pipeline does, it belongs in code — not in configuration.
The schedule_pause_status pattern is critical:
Dev and staging jobs should be PAUSED by default. Only production should be UNPAUSED. Without this, deploying to staging starts running the staging job on a schedule — potentially writing to staging tables that production depends on, or triggering unnecessary compute costs.
targets:
dev:
variables:
schedule_pause_status: PAUSED # never auto-runs in dev
staging:
variables:
schedule_pause_status: PAUSED # never auto-runs in staging
prod:
variables:
schedule_pause_status: UNPAUSED # runs on schedule in prodState Drift: When the Bundle Stops Being the Source of Truth
Deployment discipline solves the promotion problem. It doesn’t solve the human problem.
The moment an engineer edits a job directly in the Databricks UI after a bundle deployment — adjusting a cluster size, changing a schedule, adding a task — the bundle and the workspace diverge. The bundle says one thing. The workspace does another. The next `databricks bundle deploy` will overwrite those manual changes, restore the bundle-defined configuration, and break whatever the hotfix was trying to preserve.
This is state drift — and it’s the most common way DABs discipline collapses in production.
Day 1: Bundle deployed to prod
Job: revenue_pipeline_prod
Cluster: 8 workers, i3.2xlarge
Schedule: 02:00 UTC daily
Day 4: Job runs slow. On-call engineer opens Databricks UI.
Manual edit: cluster workers increased to 16
No Git commit. No bundle change. Hotfix applied directly.
Day 7: New feature merged to main.
CI/CD pipeline triggers.
databricks bundle deploy --target prod
Bundle state: 8 workers (never updated)
Workspace state: 16 workers (manual hotfix)
After deploy: 8 workers restored.
Hotfix silently lost.
Job performance degrades again.
Nobody knows why — the hotfix isn't in Git.Two Variants of Drift
Overwrite drift: the next bundle deploy overwrites the manual
change. The workspace reverts to bundle state. The engineer’s
hotfix disappears. This is the less dangerous variant — at least
the system returns to a known state.
Preservation drift: depending on how the resource is defined
in the bundle, some manual changes survive a redeploy. A task
added manually to a job may persist if the bundle doesn’t
explicitly manage that task. Now the workspace has resources
the bundle doesn’t know about — invisible to validation,
untracked in Git, undocumented.
The Detection and Prevention Pattern
# Detect drift: compare bundle-defined state to workspace state
databricks bundle validate - target prod
# Shows what WOULD be deployed - compare against current workspace
# In CI/CD: add drift detection as a scheduled check
# not just on deploy, but on a regular cadenceThe operational rule: after a bundle deployment, the
Databricks UI is a read-only view of what the bundle deployed.
Any change that needs to persist must go through Git → CI/CD →
bundle deploy. No exceptions. Not even for hotfixes.
For genuine production emergencies where a manual change is
unavoidable:
1. Apply the manual hotfix in the UI
2. Immediately commit the equivalent change to the bundle in Git
3. Deploy the updated bundle within the same incident window
4. Document the drift window in the incident record
The window between manual hotfix and bundle update is the
drift window. Minimize it. Never let it persist past the
next scheduled deployment.
The exam angle: a scenario describing a production job that
“was updated manually in the UI but reverted unexpectedly after
a deployment” has state drift + bundle overwrite as the root
cause. The correct fix is updating the bundle in Git and
redeploying — not disabling CI/CD to prevent overwrite.
Architecture Flow: Complete CI/CD Deployment Pipeline
Developer Workflow
│
├── Local development or Databricks Git Folder
│ ├── Edit notebooks/scripts in feature branch
│ ├── databricks bundle validate --target dev
│ └── databricks bundle deploy --target dev
│ └── Test manually in dev workspace
│
├── Pull Request
│ ├── Code review (logic, configuration, tests)
│ ├── Automated tests run (pytest, notebook tests)
│ └── PR approval → merge to main
│
└── CI/CD Pipeline (triggered on merge to main)
│
├── Stage 1: Validate
│ └── databricks bundle validate --target staging
│ ├── Syntax check: valid YAML?
│ ├── Reference check: all variables defined?
│ ├── Path check: all notebook paths exist?
│ └── Permission check: service principal has access?
│
├── Stage 2: Deploy staging
│ └── databricks bundle deploy --target staging
│ ├── Upload source files to staging workspace
│ ├── Create/update jobs with staging variables
│ └── Register staging permissions
│
├── Stage 3: Integration test (optional)
│ └── databricks bundle run revenue_pipeline --target staging
│ └── Validate output against expected results
│
└── Stage 4: Deploy production (on approval or auto)
└── databricks bundle deploy --target prod
├── Upload source files to prod workspace
├── Create/update jobs with prod variables
│ ├── catalog = prod
│ ├── cluster_size = Large
│ └── run_as = prod-pipeline-sp
└── Register prod permissions
Rollback:
git revert <commit>
→ triggers CI/CD pipeline
→ re-deploys previous bundle version
→ previous job configuration restoredFailure Modes You’ll See in Production
Hardcoded paths breaking on environment promotion. A notebook contains spark.read.load("/Users/engineer@company.com/data/ref_table"). Works in dev — that path exists. Fails in staging — the path doesn't exist in the staging workspace. The fix is parameterizing all environment-specific paths through bundle variables. Any hardcoded path in a notebook is a potential environment promotion failure.
Missing bundle validate before deploy. A bundle deploy fails mid-way because a variable reference is wrong — ${var.sql_warehouse_id} wasn't defined for the prod target. The staging job was created but the production job wasn't. The workspace is in a partially deployed state. Running validate before deploy catches variable resolution errors before any resources are created.
Service principal missing permissions in production. Dev deploys run as the engineer’s identity, which has broad workspace access. Prod deploys run as a service principal. The service principal wasn’t granted USE CATALOG on the prod catalog (Part 2's hierarchy traversal failure — again). The job fails in prod with a permissions error that never appeared in dev. Service principal permissions should be provisioned and tested as part of the staging deployment process — not discovered when prod breaks.
Staging jobs running on schedule because pause_status wasn't set. A staging deployment creates a job with UNPAUSEDschedule. The staging job runs every night, processes staging data, and competes for staging compute with manual test runs. The schedule_pause_status variable wasn't configured. Staging becomes unpredictable — sometimes data is there from the scheduled run, sometimes not.
bundle destroy deleting jobs but not data. An engineer runs bundle destroy --target staging to clean up staging resources. All staging jobs are deleted. All uploaded source files are removed. The staging Delta tables still exist — bundle destroy doesn't delete data, only the pipeline resources that produce it. The engineer expects a clean slate but the staging catalog still has stale data from previous runs. Data cleanup requires explicit SQL drops — not bundle destruction.
Git revert rollback that can’t actually be executed.git revert restores the bundle to a previous state. databricks bundle deploy re-deploys that state. The job configuration is rolled back. What is not rolled back:
- Delta table schemas that were altered as part of the deployment. A Silver table with a new column added during the deployment still has that column after rollback. The old code may not handle the new schema correctly.
- Auto Loader checkpoints that advanced during the deployment window. Rolling back the ingestion code doesn’t roll back the checkpoint position. The rolled-back pipeline starts from where the checkpoint is — not from where the previous version left off.
- Already-processed data written to Delta tables during the failed deployment window. The data is there. The rolled- back pipeline won’t reprocess it — its checkpoint says it was already handled.
- Downstream pipeline state that consumed data produced during the deployment window. Downstream checkpoints, materialized views, and Gold tables may have already processed the data that the rollback is trying to un-produce.
Git revert is a pipeline configuration rollback — not a data rollback. For data rollback, Delta time travel is the mechanism (Part 1). For checkpoint rollback, the checkpoint directory must be explicitly reset or deleted. For schema rollback, the ALTER TABLE must be reversed manually.
The production reality: sometimes rollback is impossible without data repair. A deployment that wrote wrong data to Gold and was consumed by downstream systems requires data repair — not just a Git revert. Treat rollback as a configuration tool, not a data recovery tool.
Git Folders used as deployment mechanism. An engineer merges code to main in Git, the Git Folder auto-syncs in the production workspace, and the production job runs the updated notebook on the next scheduled trigger. This bypasses staging entirely. No validation. No environment-specific variable resolution. The hardcoded dev catalog reference runs against production. DABs deployment is the correct mechanism — Git Folders is for development, not deployment.
Trade-offs: What DABs Optimizes For
Optimized for:
- Reproducible deployments — same bundle deployed twice produces the same result
- Environment promotion without manual reconfiguration
- Version control for all pipeline assets — jobs, clusters, permissions, notebooks
- Rollback via Git revert — previous pipeline configuration is recoverable. The code and job definitions return to the prior state. What doesn’t roll back automatically is covered in the warning below.
- Auditability — every deployment is a Git commit with an author, timestamp, and diff
Sacrificed or constrained:
- Setup overhead: a DABs bundle requires upfront investment in bundle structure, variable definition, and CI/CD pipeline configuration. For a single-engineer team with one pipeline, the overhead may exceed the benefit initially.
- Flexibility during development: developing inside a bundle structure is more constrained than ad hoc notebook development. Engineers who want to experiment freely find the bundle structure restrictive.
- Data lifecycle: DABs manages pipeline code and configuration. It does not manage Delta table schemas, data migrations, or schema evolution. Coordinating code changes with schema changes requires additional tooling.
- Debugging deployed pipelines: when a deployed job fails, debugging requires accessing the workspace where it’s deployed. The bundle abstracts the deployment — which is a benefit for promotion but a slight cost for debugging.
Real-World Constraints
One bundle per pipeline, or one bundle per team? The bundle scoping decision affects how many databricks.yml files you maintain and how deployment changes propagate. A mono-bundle (one bundle for all pipelines) simplifies deployment but means any change requires validating and deploying the entire bundle. Micro-bundles (one per pipeline) are independently deployable but multiply configuration maintenance.
The practical recommendation: one bundle per logical pipeline group — all tasks that share data flow belong in one bundle. Unrelated pipelines belong in separate bundles.
Secret management: Bundle variables handle non-sensitive configuration (catalog names, cluster sizes, schedule expressions). Secrets (database passwords, API keys, OAuth credentials) belong in Databricks Secret Scopes — referenced in notebooks via dbutils.secrets.get(), never hardcoded in bundle YAML.
# Correct: secret reference in notebook code
password = dbutils.secrets.get(scope="prod-secrets", key="db-password")
# Wrong: secret in bundle variables
variables:
db_password: "actual-password-here" # never do thisDABs and Lakeflow Declarative Pipelines: DABs can deploy Lakeflow Spark Declarative Pipelines (formerly Delta Live Tables) as well as standard jobs. The bundle resource type is pipelines instead of jobs. The deployment mechanics are identical — same CLI, same variable resolution, same environment promotion pattern.
resources:
pipelines:
silver_pipeline:
name: silver_transform_${bundle.target}
catalog: ${var.catalog}
target: silver
libraries:
- notebook:
path: ./src/silver/transform_pipeline.pyWhat Databricks Expects You to Reason About
CI/CD and DABs questions on the exam test tool selection and deployment mechanism understanding — not YAML syntax memorization.
DABs is the correct tool for versioned, repeatable pipeline deployment. The exam’s Sample Question 5 presents four options for managing ETL pipeline deployment across environments. The correct answer is DABs — the only option that provides versioning, environment promotion, and repeatable deployment in a single mechanism. The wrong answers all lack at least one of those properties.
Git Folders is for development, not deployment. A scenario describing a team that wants to “use Git to manage and deploy Databricks pipelines” has two distinct operations: version control (Git Folders) and deployment (DABs CLI). Conflating the two produces wrong answers — Git Folders doesn’t deploy jobs, it syncs notebooks.
The Databricks CLI executes DABs operations. validate, deploy, run, destroy are the four primary CLI commands for bundle lifecycle management. A scenario asking how to "deploy a bundle to production from a CI/CD pipeline" has databricks bundle deploy --target prod as the answer — not a UI-based deployment, not a notebook run, not a manual job configuration.
Environment-specific overrides are the mechanism for promotion. A scenario describing a pipeline that needs different cluster sizes, table names, and credentials in dev vs prod has bundle target variables as the answer. The same codebase with environment-specific variable overrides — not separate codebases for each environment, not manual reconfiguration on each promotion.
run_as service principal is the production security model. A scenario asking how to ensure production jobs don't run under an individual engineer's identity has run_as: service_principal_name in the prod target configuration as the answer. Jobs depending on personal credentials fail when that person leaves the company — service principals provide stable, auditable machine identities.
Summary: The Engineering Lesson
Manual Databricks deployment is a form of technical debt. It works when the system is small, the team is small, and everyone remembers the configuration state. It fails when any of those conditions stop being true — which happens faster than teams expect.
DABs inverts the failure mode. Instead of “it works until it breaks,” you get “it doesn’t deploy until it validates.” Environment promotion from a Git merge instead of from memory. Rollback from a Git revert instead of from notes someone took last time.
The opening scenario — three hours to promote a pipeline that should have taken ten minutes — is not an edge case. It’s the default outcome of undisciplined deployment practices at scale.
Version control is not a backup strategy. It’s the deployment strategy.
The bundle is the pipeline. The Git history is the audit trail. The CLI is the deployment mechanism. All three together give you what the alternative never can: confidence that what’s running in production is exactly what you think it is.
🔥 Next in Series
Part 11 — Troubleshooting Databricks: Spark UI, OOM, and the Diagnostics That Actually Matter
Parts 6 and 8 covered performance optimization from the design side. Part 11 covers performance diagnosis from the operational side — what to look at when a job is already broken in production, how to read Spark UI stage metrics to identify the specific failure mode, and how to diagnose cluster startup failures, library conflicts, and OOM errors that don’t produce obvious error messages.
We’ll go deep on the diagnostic workflow that separates engineers who can debug Databricks problems quickly from those who spend hours adding logging and re-running jobs hoping for different results.
🔔 Follow for More
Follow TheDataForge for high-signal deep dives on Spark, Kafka, Streaming, Lakehouse, and real-world data engineering — no fluff, only engineering truth.
⚡️Let’s connect — I post daily Big Data & Spark insights at DataForgeX on X.
💬 Comment Below
What’s the most painful environment promotion failure you’ve experienced?
Was it a hardcoded dev path that silently wrote to the wrong table in production for days? A service principal that was never granted permissions in prod because everyone assumed someone else had done it? A staging job that ran on schedule because pause_status wasn't configured and contaminated staging data before anyone noticed?
And — would a proper DABs deployment with validated environment overrides have caught it before it reached production?
Tags
#databricks-asset-bundles #dabs #cicd #git-folders #databricks-cli #environment-promotion #pipeline-deployment #databricks-certification #dataforge