dbt Fundamentals
Back to Advanced dbt

Production dbt — CI/CD, Environments, Scheduling

From local dev to production: environments, scheduled runs, CI checks, alerts. FIND_VIDEO: search 'dbt production CI/CD GitHub Actions' — recommended channel: dbt Labs. Aim for 11 min or under.

19 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.
Loading progress...

Key moments

  1. Project and Environment Architecture — Establishes the dbt Cloud project and outlines the architectural need for separate Dev and Prod Databricks workspaces.
  2. Configuring Database Connections — Sets up persistent connection definitions for both Dev and Prod Databricks environments using workspace endpoints and catalogs.
  3. Dev Linking and GitHub Integration — Associates the development environment with the Dev connection, adds access tokens, and connects the project to GitHub.
  4. Model Execution in Dev — Runs models inside the dbt Cloud IDE to verify transformations execute properly against the Databricks Dev target.
  5. Branching and Code Changes — Creates a test branch, modifies a model materialization from table to view, and commits changes under version control.
  6. Creating the Production Environment — Configures a deployment environment restricted to the main branch and connects it to the Databricks Prod warehouse.
  7. Configuring the Deployment Job — Sets up an automated dbt Cloud job configured with run-on-merge triggers to execute models in production.
  8. Triggering Production Deployment — Merges the GitHub pull request into main and monitors the automated execution of the production deployment job.
PDF notes

Frequently asked questions

What is the primary difference between a Connection and an Environment in dbt Cloud?

A Connection specifies the physical warehouse host, path, and catalog details, whereas an Environment binds a Connection to a deployment type, target branch, and credentials.

Why is the production deployment environment locked to the main branch?

Restricting production to main guarantees that only reviewed, approved, and merged code is executed against live production data tables.

How does dbt Cloud know when to trigger a production run on merge?

dbt Cloud receives a webhook event from the linked GitHub repository whenever a pull request is merged into the designated target branch.

How was this lesson?

Your feedback helps us refine explanations and catch bugs.