# SQLMesh

SQL and Python transformation framework with change plans, reusable model environments and stateful incremental processing\.

ID: Q1066 · Revision: 1114

Type: software · License: Open source under Apache License 2\.0\.[^repo] · Status: active

Website: https://sqlmesh.readthedocs.io/



SQLMesh is a data\-transformation framework for SQL and Python models\. It uses plans to review changes and manages model versions across development and production environments, with state tracking for previously processed data and an adapter for supported dbt projects\.[^repo][^plans][^dbt]

## Plans and backfills

A plan reviews changes before they are applied\. Categorizing a modification as breaking causes the affected model and downstream dependencies to be backfilled; non\-breaking changes backfill the directly modified model without automatically rebuilding its dependents\. Forward\-only changes reuse the production physical table without historical backfill\. These choices affect both historical consistency and execution cost, rather than merely changing a deployment label\.[^plans]

## Development and production

Environments collect references to model snapshots\. Fingerprints include a model's definition and its upstream dependencies, allowing an existing physical variant to be reused when it matches\. Development can operate on a chosen date range instead of rebuilding all history\. The name prod is special, and an unqualified plan targets production by default, so environment selection is operationally significant\.[^env]

## State storage

SQLMesh's state records previous model versions, environments and processed intervals\. The documentation describes its workload as transactional and recommends an OLTP database or managed state service for production\. An analytics warehouse may suffice for a proof of concept but is not the recommended production state store\. State can be exported and imported as JSON, making state management a separate concern from retaining model source files\.[^state]

## Scheduling lifecycle

The built\-in scheduler evaluates missing model intervals when run\. It then exits rather than staying alive as a continuous scheduling service\. Recurring operation therefore requires periodic invocation through an external scheduler or an appropriate managed arrangement\. This distinction matters when replacing an existing job service: installing the framework alone does not create a continuously running production schedule\.[^schedule]

## dbt project migration

The dbt adapter can retain dbt file and project formats, but the documented incremental approach requires adjustments\. SQLMesh distinguishes unit tests of query logic from audits of produced data, which correspond to dbt data tests\. The integration also lists unsupported Jinja methods, including selected\_sources and certain graph\-value accessors\. Those limitations should be checked against a real project rather than assuming every dbt extension transfers unchanged\.[^dbt]

## Licensing and substitution

SQLMesh is Apache\-2\.0 licensed and can substitute for [dbt](/dbt) for supported transformation projects when the team adopts its state and plan workflow\. Its documented adapter is useful evidence of migration support, but does not establish parity with every current dbt generation or hosted feature\. Warehouse execution and production state infrastructure still need provision, and no hands\-on conversion is claimed here\.[^repo][^dbt][^state]

## Capabilities and substitutions

### Change impact planning — supported

Plans categorize changes and determine direct and downstream backfills\.[^plans]

Use case: Developing and deploying dependency\-managed warehouse transformations · Platforms: Python · Region: Version, build and integration requirements apply

### Reusable environments — supported

Model fingerprints allow environments to reference an existing physical model variant\.[^env]

Use case: Developing and deploying dependency\-managed warehouse transformations · Platforms: Python · Region: Version, build and integration requirements apply

### dbt project compatibility — limited

Supports dbt projects but requires incremental\-logic adjustments and lacks some Jinja methods\.[^source-7]

Use case: Developing and deploying dependency\-managed warehouse transformations · Platforms: Python · Region: Version, build and integration requirements apply

### [Substitute for dbt](/dbt) — limited

Can replace dbt execution for supported SQL projects after checking incremental logic, macros and workflow differences\. Incremental models need adjustments, and some dbt Jinja methods are unsupported\.[^plans][^dbt]

Use case: Developing and deploying dependency\-managed warehouse transformations · Platforms: Python · Region: Version, build and integration requirements apply

## References

[^repo]: [SQLMesh repository](<https://github.com/SQLMesh/sqlmesh>) — Transformation framework and Apache 2\.0 license (vendor; retrieved 2026-10-07T17:46:00Z)

[^plans]: [SQLMesh plans](<https://sqlmesh.readthedocs.io/en/stable/concepts/plans/>) — Breaking, non\-breaking and forward\-only backfill behavior (vendor; retrieved 2026-10-07T17:45:34Z)

[^env]: [SQLMesh environments](<https://sqlmesh.readthedocs.io/en/stable/concepts/environments/>) — Production naming, model fingerprints and reuse (vendor; retrieved 2026-10-07T17:45:50Z)

[^state]: [SQLMesh state](<https://sqlmesh.readthedocs.io/en/stable/concepts/state/>) — Transactional OLTP state and JSON export/import (vendor; retrieved 2026-10-07T17:46:00Z)

[^schedule]: [SQLMesh scheduling](<https://sqlmesh.readthedocs.io/en/stable/guides/scheduling/>) — Run evaluates missing intervals then exits (vendor; retrieved 2026-10-07T17:47:02Z)

[^dbt]: [SQLMesh dbt integration](<https://sqlmesh.readthedocs.io/en/stable/integrations/dbt/>) — Project loading, incremental adjustments and unsupported Jinja methods (vendor; retrieved 2026-10-13T14:22:13Z)

[^source-7]: [https://sqlmesh\.readthedocs\.io/en/stable/integrations/dbt/](<https://sqlmesh.readthedocs.io/en/stable/integrations/dbt/>) — Project loading, incremental adjustments and unsupported Jinja methods (vendor; retrieved 2026-10-07T17:45:43Z)

[^source-8]: [https://sqlmesh\.readthedocs\.io/en/stable/integrations/dbt/](<https://sqlmesh.readthedocs.io/en/stable/integrations/dbt/>) — How to use SQLMesh incremental models with dbt projects; Unsupported dbt jinja methods\. Checked 13 October 2026\. (vendor; retrieved 2026-10-07T17:46:00Z)

Source revision: https://substitutefor.net/entities/Q1066?revision=1114
