Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

SQLMesh logo

SQLMesh is a next-generation data transformation framework designed to ship data quickly, efficiently, and without error. Data teams can efficiently run and deploy data transformations written in SQL or Python with visibility and control at any size.

It is more than just a dbt alternative.

Architecture Diagram

Core Features

SQLMesh Plan Mode

Get instant SQL impact analysis of your changes, whether in the CLI or in SQLMesh Plan Mode

Virtual Data Environments
  • Create isolated development environments without data warehouse costs
  • Plan / Apply workflow like Terraform to understand potential impact of changes
  • Easy to use CI/CD bot for true blue-green deployments
Efficiency and Testing

Running this command will generate a unit test file in the tests/ folder: test_stg_payments.yaml

Runs a live query to generate the expected output of the model

sqlmesh create_test tcloud_demo.stg_payments --query tcloud_demo.seed_raw_payments "select * from tcloud_demo.seed_raw_payments limit 5"

# run the unit test
sqlmesh test
MODEL (
  name tcloud_demo.stg_payments,
  cron '@daily',
  grain payment_id,
  audits (UNIQUE_VALUES(columns = (
      payment_id
  )), NOT_NULL(columns = (
      payment_id
  )))
);

SELECT
    id AS payment_id,
    order_id,
    payment_method,
    amount / 100 AS amount, /* `amount` is currently stored in cents, so we convert it to dollars */
    'new_column' AS new_column, /* non-breaking change example  */
FROM tcloud_demo.seed_raw_payments
test_stg_payments:
model: tcloud_demo.stg_payments
inputs:
    tcloud_demo.seed_raw_payments:
      - id: 66
        order_id: 58
        payment_method: coupon
        amount: 1800
      - id: 27
        order_id: 24
        payment_method: coupon
        amount: 2600
      - id: 30
        order_id: 25
        payment_method: coupon
        amount: 1600
      - id: 109
        order_id: 95
        payment_method: coupon
        amount: 2400
      - id: 3
        order_id: 3
        payment_method: coupon
        amount: 100
outputs:
    query:
      - payment_id: 66
        order_id: 58
        payment_method: coupon
        amount: 18.0
        new_column: new_column
      - payment_id: 27
        order_id: 24
        payment_method: coupon
        amount: 26.0
        new_column: new_column
      - payment_id: 30
        order_id: 25
        payment_method: coupon
        amount: 16.0
        new_column: new_column
      - payment_id: 109
        order_id: 95
        payment_method: coupon
        amount: 24.0
        new_column: new_column
      - payment_id: 3
        order_id: 3
        payment_method: coupon
        amount: 1.0
        new_column: new_column
Level Up Your SQL Write SQL in any dialect and SQLMesh will transpile it to your target SQL dialect on the fly before sending it to the warehouse. Transpile Example
  • Debug transformation errors before you run them in your warehouse in 10+ different SQL dialects
  • Definitions using simply SQL (no need for redundant and confusing Jinja + YAML)
  • See impact of changes before you run them in your warehouse with column-level lineage

For more information, check out the website and documentation.

Getting Started

Install SQLMesh through pypi by running:

mkdir sqlmesh-example
cd sqlmesh-example
python -m venv .env
source .env/bin/activate
pip install sqlmesh
sqlmesh init duckdb # get started right away with a local duckdb instance

Follow the quickstart guide to learn how to use SQLMesh. You already have a head start!

Follow this example to learn how to use SQLMesh in a full walkthrough.

Optional Extensions

SQLMesh supports several optional extensions that can be installed separately:

  • sqlmesh[athena]: Support for Amazon Athena
  • sqlmesh[azuresql]: Support for Azure SQL
  • sqlmesh[bigquery]: Support for Google BigQuery
  • sqlmesh[clickhouse]: Support for ClickHouse
  • sqlmesh[cube]: Support for generating Cube semantic layer configurations
  • sqlmesh[databricks]: Support for Databricks

Join Our Community

Together, we want to build data transformation without the waste. Connect with us in the following ways:

Contribution

Contributions in the form of issues or pull requests (from fork) are greatly appreciated.

Read more on how to contribute to SQLMesh open source.

Watch this video walkthrough to see how our team contributes a feature to SQLMesh.

Metadata

Release files for sqlmesh-cube 0.1.1.dev3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlmesh-cube 0.1.1.dev3
File Size Uploaded Provenance
sqlmesh_cube-0.1.1.dev3.tar.gz 28.0 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlmesh-cube 0.1.1.dev3
File Interpreter ABI Platform
sqlmesh_cube-0.1.1.dev3-py3-none-any.whl Python 3 none any Details

Total release size: 28.6 MB

Release files / sqlmesh_cube-0.1.1.dev3.tar.gz

Download URL sqlmesh_cube-0.1.1.dev3.tar.gz
Size 28.0 MB
Tags Source
SHA-256 checksum
How to use checksums
829b72516337d36e869180e9fbb347e993fa4dbcf33200311842f83a1313a575
BLAKE2b-256 checksum
How to use checksums
208070f8fc721795149edcda6ceae0d077b3680f8950cd32cec76a5a3b5f33ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.4

Release files / sqlmesh_cube-0.1.1.dev3-py3-none-any.whl

Download URL sqlmesh_cube-0.1.1.dev3-py3-none-any.whl
Size 658.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35c9537f930b96c2a3ddd0c87918e55b6b44ba425c2449266ee09d1be5b148f9
BLAKE2b-256 checksum
How to use checksums
d0dea03622ff215572dbbd530a72f32080bf4e535ecef1283dd8b32c7c1808c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.4

Security for sqlmesh-cube 0.1.1.dev3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page