Skip to main content
Version: 1.8.9

Starlake vs SQLMesh

SQLMesh is an open-source transformation framework: it builds and runs SQL and Python models over data that is already in the warehouse. Starlake covers the whole pipeline: extraction, loading, transformation, data quality and orchestration, declared in YAML and SQL. The overlap is the transform layer, and the most visible difference there is how each tool lets you try a change on production data before shipping it.

Facts about SQLMesh on this page come from its documentation for v0.236 (October 2026).

Philosophy​

StarlakeSQLMesh
ScopeFull ELT: extract, load, transform, test, orchestrateTransform only: sources are external models SQLMesh does not manage
ModelsYAML + standard SQL, Python (PySpark)SQL with SQLMesh macros or Jinja, Python models returning a DataFrame
Change workflowRun a task, or a DAG, on a data branch, then run it in productionsqlmesh plan: diff the project against an environment, categorize the changes, backfill, promote
StateNo separate state databaseState database, recommended on PostgreSQL for production
ProjectApache 2.0, StarlakeApache 2.0, a Linux Foundation project since March 2026 (created by Tobiko Data, acquired by Fivetran in 2025)

Trying changes on production data​

This is where the two tools differ most. SQLMesh builds virtual data environments. Starlake builds data branches.

Starlake data branchesSQLMesh virtual data environments
MechanismZero-copy CLONE of production tables into a branch dataset or schema, then SQL rewriting so the job reads and writes the clonesEvery model version gets its own physical table, named by a fingerprint of its code and its upstream models. An environment is a set of views pointing at physical tables
What a new branch or environment costsNothing is copied upfront: each table is cloned the first time a job on the branch uses itNothing is built for unchanged models: their views point at the production tables. Changed models are computed
GranularityOne namespace per branch; tables cloned one by one, on first useOne schema per model schema, suffixed with the environment name (db__dev.model)
Change impactNone automatic: you choose which tasks to run on the branchAutomatic: directly and indirectly modified models are found from the project, and each change is categorized as breaking (downstream rebuilt) or non-breaking (only the changed model rebuilt)
PromotionRecompute: run the job again in production. On Snowflake, BRANCH APPLY replays the branch's SQL on productionUsually a view swap: production points at the tables built in dev, with no recompute. Forward-only changes, dev_only mode and dev backfills on a limited date range are recomputed in production
Freshness of production dataBigQuery: sources frozen when first cloned. Snowflake: tables the branch never modified are read liveUnchanged models read the production tables; changed models are computed over the date range you choose
CleanupManual: drop the branch dataset or schemaJanitor: expired environments (1 week by default) and orphaned snapshots are removed by sqlmesh run or sqlmesh janitor
EnginesBigQuery, Snowflake19 engines, including BigQuery, Snowflake, Databricks, Redshift, PostgreSQL, DuckDB, Spark and Trino. Zero-copy clones, used for forward-only previews, only on BigQuery, Databricks and Snowflake

In short:

  • SQLMesh avoids recomputation. Once a change is built in dev, production reuses the result, and its change categorization decides how much of the DAG to rebuild. The price is a layer of views between consumers and tables, a state database, and the plan workflow.
  • Starlake branches need no layer and no state. Your tables stay plain tables, and a branch is ordinary warehouse objects you can query and drop. The price is a recompute at promotion, and you decide what to run on the branch.

How Starlake branches work in detail, with an end-to-end walkthrough: Testing on production data with data branches.

Data sources and loading​

StarlakeSQLMesh
FilesCSV, JSON, XML, Parquet, fixed-width, with schema validation and rejected-row routingSeed models: static CSV files in the project
DatabasesJDBC extraction, incremental, with CDCNot covered: external models describe tables loaded by other tools
StreamsKafkaNot covered
LoadersBuilt indlt integration generates models over tables dlt has loaded

Transformations​

StarlakeSQLMesh
SQLStandard SQL with variable substitutionSQL with SQLMesh macros (@) or Jinja
PythonPySpark scriptsPython models returning a Pandas or Spark DataFrame
DialectsTranspilation between BigQuery, Snowflake, Databricks, Redshift, DuckDB and othersTranspilation with SQLGlot
Write strategiesAPPEND, OVERWRITE, UPSERT_BY_KEY, UPSERT_BY_KEY_AND_TIMESTAMP, OVERWRITE_BY_PARTITION, DELETE_THEN_INSERT, SCD2, ADAPTATIVEModel kinds: FULL, INCREMENTAL_BY_TIME_RANGE, INCREMENTAL_BY_UNIQUE_KEY, INCREMENTAL_BY_PARTITION, SCD_TYPE_2, VIEW and others
DependenciesParsed from the SQLParsed from the SQL
Column-level lineagestarlake col-lineageIn the UI
dbt projectsMigration to YAML + SQLRuns dbt projects through its dbt adapter

Testing and data quality​

StarlakeSQLMesh
Unit testsLoad and transform tests on DuckDB with CSV or JSON fixtures, SQL transpiled automaticallyYAML tests with inputs and expected outputs, run on plan
Assertions on real data53 built-in expectation macros, on loads and transformsAudits, blocking by default, with built-in audits
Testing on production dataData branches (BigQuery, Snowflake)Virtual data environments
Comparing outputsSQL over the branch and production tablessqlmesh table_diff between environments
Load validationType checks per value, rejected rows to audit.rejectedNot covered

Security and governance​

StarlakeSQLMesh
Column maskingDeclarative: HIDE, hashing, AES, SQL expressionsNot built in
Row-level securityDeclarative RLSNot built in
Table ACLDeclarative grantsYour own SQL or macros in before_all / after_all statements

Orchestration​

StarlakeSQLMesh
Built inDAG generation from the SQL dependenciessqlmesh run, triggered by cron or CI
AirflowGenerated DAGsOpen-source integration removed in v0.175 (April 2025); offered by Tobiko Cloud
DagsterGenerated assetsOffered by Tobiko Cloud
Snowflake TasksGenerated native tasksNot covered

When to choose​

Choose Starlake when:

  • You want one tool for extraction, loading, transformation and orchestration
  • You need load-time validation, masking, RLS and ACLs declared next to the schema
  • You want plain tables, with no view layer or state database to operate
  • You want generated Airflow, Dagster or Snowflake Tasks DAGs

Choose SQLMesh when:

  • You only need a transformation layer, and loading is handled by another tool
  • Avoiding recomputation at promotion matters more to you than keeping tables free of a view layer
  • You want automatic breaking and non-breaking change detection across the DAG
  • Your warehouse is one Starlake branches do not cover, such as Databricks or Redshift, and you need environments there