sqlmesh
Next-generation data transformation framework
What it is and what it does
SQLMesh is a data transformation framework that combines SQL and Python to define, test, and deploy data pipelines. It sits between raw data and analytics, letting you write transformations in SQL (with automatic dialect transpilation) or Python, then execute them against your data warehouse or local database. The framework tracks which tables have changed and runs only the necessary transformations, avoiding redundant computation.
The package includes built-in testing (unit tests and data audits), virtual development environments for isolated testing without warehouse costs, and a plan/apply workflow similar to Terraform for previewing changes before deployment. It provides column-level lineage tracking, incremental model support, and CLI tools for initialization, testing, and deployment. With 20 runtime dependencies including pandas, sqlglot, duckdb, and jinja2, it integrates with common data tools and supports multiple SQL dialects.
Use it for:
- Build and test SQL transformations locally before deploying to production data warehouses.
- Run incremental data loads that only process new or modified records, reducing compute costs.
- Create isolated development environments to test schema changes without affecting production data.
- Write data quality audits and unit tests for transformation logic before running in the warehouse.
- Migrate SQL code between different database dialects (e.g., Postgres to Snowflake) with automatic transpilation.
- Track and visualize data lineage to understand which tables depend on which transformations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
SQLMesh is a data transformation framework that lets you write, test, and deploy SQL or Python transformations with built-in change tracking, incremental processing, and virtual development environments.
Yes. SQLMesh is actively maintained, has low install friction, carries a permissive Apache 2.0 license, and addresses a real need in data engineering workflows. It is suitable for teams building data pipelines who want testing, change tracking, and multi-dialect support built in. Start with a small project to evaluate whether its workflow and feature set fit your warehouse and team practices.
Install
sqlmesh on PyPI
pip
pip install sqlmeshuv
uv add sqlmeshpoetry
poetry add sqlmeshInstalling sqlmesh
Before you install
Low install friction with a pure Python wheel. Active maintenance with a recent release (21 days ago) and steady repository activity. The package has 20 runtime dependencies including pandas, sqlglot, and duckdb, which are well-established libraries.
License in practice
Licensed under Apache License 2.0, a permissive open-source license. You can use, modify, and distribute SQLMesh freely in commercial and private projects, provided you include a copy of the license and document any changes you make.
Quickstart
pip install 'sqlmesh[lsp]'
sqlmesh init
# Follow prompts to create a project (e.g., choose DuckDB)
sqlmesh test # Run unit tests
sqlmesh plan # Preview changes before applying
Requires Python 3.9 or later. A data warehouse or local database (DuckDB, Postgres, etc.) is needed as the execution backend.
Verify before relying
- Whether the package supports all major SQL dialects claimed in the description or if some require additional configuration.
- Performance characteristics and scalability limits for large transformation DAGs.
- Community adoption and ecosystem maturity relative to established alternatives.
Package facts
| License | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 20 — click, croniter, duckdb, dateparser, humanize, hyperscript, importlib-metadata, ipywidgets, jinja2, packaging, pandas, pydantic, python-dotenv, requests, rich, ruamel.yaml, sqlglot, tenacity, time-machine, json-stream |
| Maintenance | actively maintained — 21 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 621,043/month — #5,721 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sqlmesh-0.236.1-py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
dbt-coredbt-core transforms raw data in a warehouse…
permissive · top 1,000 on PyPI
dbt-postgresdbt-postgres is a dbt adapter that connects dbt…
permissive · top 5,000 on PyPI
dbt-bigquerydbt-bigquery is a dbt adapter that enables data…
permissive · top 5,000 on PyPI
dbt-databricksdbt-databricks is a dbt adapter that enables…
permissive · top 5,000 on PyPI
dbt-redshiftdbt-redshift is an adapter that enables dbt to…
permissive · top 5,000 on PyPI
sqlglotSQLGlot parses, transpiles, optimizes, and…
permissive · top 1,000 on PyPI
dbtA command-line interface for running dbt…
unclear · top 15,000 on PyPI
dbt-sparkdbt-spark is the Apache Spark adapter for dbt,…
permissive · top 5,000 on PyPI
dbt-sqlserverA dbt adapter that enables data transformation…
permissive · top 15,000 on PyPI
datacontract-cliA CLI tool for defining, validating, and…
permissive · top 5,000 on PyPI