Retour au classement

TobikoData/sqlmesh

Pythonsqlmesh.com

Efficient data transformation and modeling framework that is backwards compatible with dbt.

dataopseltetlsqlpythondataengineeringtransformationdbt
Étoiles
2.1k
Forks
194
Croissance hebdomadaire
Issues
65
ArtefactsPyPIpip install sqlmesh
README

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 .venv
source .venv/bin/activate
pip install sqlmesh
source .venv/bin/activate # reactivate the venv to ensure you're using the right installation
sqlmesh init duckdb # get started right away with a local duckdb instance
sqlmesh plan # see the plan for the changes you're making

Note: You may need to run python3 or pip3 instead of python or pip, depending on your python installation.

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.

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.

Dépôts similaires
lance-format/lance

Open Lakehouse Format for Multimodal AI. Convert from Parquet in 2 lines of code for 100x faster random access, vector index, and data versioning. Compatible with Pandas, DuckDB, Polars, Pyarrow, and PyTorch with more integrations coming..

Rustcrates.ioApache License 2.0machine-learningcomputer-vision
lance.org
6.8k769
redpanda-data/console

Redpanda Console is a developer-friendly UI for managing your Kafka/Redpanda workloads. Console gives you a simple, interactive approach for gaining visibility into your topics, masking data, managing consumer groups, and exploring real-time data with time-travel debugging.

TypeScriptnpmapache-kafkadataops
redpanda.com
4.3k427
lancedb/lance

Modern columnar data format for ML and LLMs implemented in Rust. Convert from parquet in 2 lines of code for 100x faster random access, vector index, and data versioning. Compatible with Pandas, DuckDB, Polars, Pyarrow, and PyTorch with more integrations coming..

Rustcrates.ioApache License 2.0machine-learningcomputer-vision
lancedb.github.io/lance/
4.2k262
SQLMesh/sqlmesh

Scalable and efficient data transformation framework - backwards compatible with dbt.

PythonPyPIApache License 2.0dataopselt
sqlmesh.readthedocs.io/en/stable/
3.2k414
whylabs/whylogs

An open-source data logging library for machine learning models and data pipelines. 📚 Provides visibility into data quality & model performance over time. 🛡️ Supports privacy-preserving data collection, ensuring safety & robustness. 📈

Jupyter NotebookApache License 2.0ai-pipelinesapproximate-statistics
whylogs.readthedocs.io
2.8k143
meltano/meltano

Meltano: the declarative code-first data integration engine that powers your wildest data and ML-powered product ideas. Say goodbye to writing, maintaining, and scaling your own API integrations.

PythonPyPIMIT Licensedataopsdataops-platform
meltano.com
2.6k258
elementary-data/elementary

The dbt-native data observability solution for data & analytics engineers. Monitor your data pipelines in minutes. Available as self-hosted or cloud service with premium features.

HTMLApache License 2.0data-lineagedata-governance
elementary-data.com
2.4k223
lensesio/fast-data-dev

Kafka Docker for development. Kafka, Zookeeper, Schema Registry, Kafka-Connect, , 20+ connectors

ShellApache License 2.0kafka-rest-proxyschema-registry
lenses.io
2.1k341
alibaba/SREWorks

Cloud Native DataOps & AIOps Platform | 云原生数智运维平台

JavaMavenApache License 2.0kubernetessre
sreworks.cn
2k431
datavane/tis

Support agile DataOps Based on Flink, DataX and Flink-CDC, Chunjun with Web-UI

JavaMavenApache License 2.0javadatax
tis.pub
1.3k284
opendatadiscovery/awesome-data-catalogs

📙 Awesome Data Catalogs and Observability Platforms.

MIT Licensedata-catalogdata-discovery
1.1k79