Plans & Deployments
Plans deploy model changes from your Git repository to a target environment. A plan shows you what will change before it is applied, and supports an approval workflow for production environments.
What is a Plan?
A plan:
- Shows what will change before execution
- Calculates dependencies and impact
- Can require approval before execution (for protected environments)
- Tracks execution status and logs in real time
The plan workflow differs between frameworks. SQLMesh plans use state-based change detection and single-phase execution. dbt plans use version-based change detection and a two-phase build-then-run pipeline.
Environments
| Environment | Purpose |
|---|---|
| prod | Production. Plans should be reviewed and approved. |
| dev | Development environment for testing changes. |
| preview | Preview environment for reviewing changes before production. |
Protected environments require explicit approval before a plan can be executed. See Environment Protection.
Plan Workflow
SQLMesh Plans
- Create — dagctl runs
sqlmesh planto detect model changes and calculate backfills - Review — Web UI displays added, modified, and removed models with dependency impact
- Approve — Team member approves the plan (required for protected environments)
- Execute — dagctl runs the plan as a Kubernetes Job to apply changes
Model change types:
| Type | Description |
|---|---|
| Added | New models |
| Modified | Changed models that need backfill |
| Removed | Deleted models |
| Directly Modified | Breaking changes to a model |
| Indirectly Modified | Models affected by upstream changes |
dbt Plans
- Create — dagctl detects a new version in
.dagctl/config.yamland runs a git diff to identify changed files - Review — Web UI displays changed files categorized by type (models, tests, macros, etc.)
- Approve — Team member approves the plan (required for protected environments)
- Build — dagctl builds a new container image for your project using Kaniko
- Run — dagctl executes the configured dbt commands against the new image
dbt plans have three build scopes:
| Scope | When | What happens |
|---|---|---|
| selective | Model files changed | Only changed models are run via --select |
| all | Non-model files changed (macros, configs) | Full dbt build is executed |
| build_only | No model changes, only config/infra changes | Image is rebuilt but no dbt commands run |
Creating a Plan
- Navigate to your project → Plans tab
- Click Create Plan
- Review the changes
- Approve or request approval from a team member
- Monitor execution in real time