All demos
    Demo 02 · SQLMesh vs dbt

    SQLMesh vs dbt: the key differences — and when SQLMesh makes the most sense

    SQLMesh and dbt solve the same problem in very different ways. Watch a retail orders file flow through Bronze → Silver → Gold → Platinum, and at every stage see exactly where SQLMesh diverges from dbt — stateful incrementals, built-in audits, column-level lineage and virtual environments — so you know when SQLMesh is the right choice.

    SQLMesh
    vs dbt
    Virtual environments
    Column-level lineage
    Share

    Overview

    SQLMesh and dbt are both transformation frameworks for building a Medallion architecture — refining raw data through Bronze, Silver, Gold and Platinum layers. They cover the same ground, but their engineering philosophies differ in ways that show up clearly at scale.

    dbt popularised SQL-first transformation with Jinja templating, explicit ref() dependencies and a huge package ecosystem. SQLMesh takes a more stateful, engineering-led approach: it understands your SQL, tracks what has already been built, runs audits as part of every plan, and ships virtual environments for safe, instant deploys. The interactive walkthrough below runs the same retail orders file through both lenses so the differences are concrete rather than theoretical.

    Key differences from dbt

    The five areas where teams feel the contrast most when moving between the two tools.

    SQLMesh
    dbt

    When does SQLMesh make the most sense?

    Choose SQLMesh when…

    • You run large or expensive tables where avoiding full rebuilds and accidental double-counting matters.
    • You need safe, reversible deploys — virtual environments give blue-green promotion with zero recompute.
    • Column-level lineage and automatic impact analysis are important for change management.
    • You want data-quality audits to gate promotion as part of the build, not as a separate step.
    • Your team prefers writing mostly plain SQL with minimal templating.

    Stick with dbt when…

    • Your team already has deep dbt expertise and a mature project you don't want to migrate.
    • You rely heavily on the dbt package ecosystem and community macros.
    • Your pipelines are small enough that full rebuilds are cheap and incremental complexity isn't worth it.
    • You want the largest hiring pool and the most third-party tooling and integrations.

    Example workflow

    How a change moves from source to production in a SQLMesh project — then play the interactive walkthrough to watch the data transform layer by layer.

    1. 01

      Register the source

      external_models.yaml declares the raw orders table (with column types) so SQLMesh can build column-level lineage from the very first model.

    2. 02

      Model in plain SQL

      Each layer is a .sql file with a MODEL() block. SQLMesh parses the SELECT to infer dependencies — no ref() calls needed.

    3. 03

      Plan the change

      `sqlmesh plan dev` previews exactly what will change, runs audits, and builds into an isolated virtual environment first.

    4. 04

      Backfill only the gaps

      Stateful incrementals fill just the missing date windows via @start_ds / @end_ds — idempotent, with no duplicate rows.

    5. 05

      Promote instantly

      `sqlmesh plan prod` swaps production to the validated environment in a blue-green cutover with zero recompute.

    Loading the interactive walkthrough…

    Explore another walkthrough

    Demo 01

    dbt + Medallion Architecture

    Watch a messy orders.csv get progressively refined by dbt models — with lineage, tests, macros and incremental builds.

    Demo 03

    Master Data Management

    Watch the same customer — scattered across CRM, ERP, e-commerce and support with conflicting data — get standardized, matched, merged into a Golden Record, and synced back to every system.

    Demo 04

    Change Data Capture (CDC)

    Watch inserts, updates and deletes from an operational orders table get captured and streamed into Bronze → Silver → Gold — with a side-by-side of log-based, query-based and trigger-based capture.

    Demo 05

    Banking

    Submit a sample loan form and watch a workflow fire node by node — webhook, credit check, risk scoring, decision branch, core-banking update and notifications — replacing days of manual hand-offs.

    Demo 06

    AI Support

    Submit a real support message and watch a live workflow use AI to classify it, set priority, route it to the right team and draft a reply — actually running on the backend, not a simulation.

    Demo 07

    Finance / AP

    Step through a workflow that runs a 3-way match of a vendor invoice against the purchase order and goods receipt — pausing for a receiving check and approval before posting to the ERP.

    Demo 08

    Apache Kafka · Streaming

    A no-fluff explainer of how Kafka moves data, the real-world challenges of running it, and a side-by-side of Kafka vs. Azure Stream Analytics, AWS Kinesis, Google Pub/Sub and managed Kafka.

    Demo 09

    Azure AI Agent Blueprint

    An interactive, animated reference architecture: watch a user request flow through the Application, Context and Orchestration layers — gateway, Container Apps, RAG, memory, Azure AI Foundry and model fine-tuning.

    Demo 10

    AWS AI Agent Stack

    An interactive, animated AWS reference architecture: watch a request flow through ALB and API Gateway into ECS Fargate agents, out to Bedrock Knowledge Bases and Kendra for RAG, DynamoDB/ElastiCache memory, and SageMaker + Bedrock for reasoning and fine-tuning.

    Demo 11

    Google Cloud AI Agent Playbook

    An interactive, animated Google Cloud reference architecture: watch a request flow through Cloud Load Balancing and Apigee into Cloud Run / GKE agents, out to Vertex Vector Search and the RAG Engine, Firestore/Memorystore memory, and Vertex AI + Gemini for reasoning and tuning.

    Demo 12

    Data Platform Architecture

    An interactive, animated data-platform architecture: watch data flow from operational sources through CDC, streaming and batch ingestion into a Bronze → Silver → Gold lakehouse on an open table format, then out to BI, SQL, ML and real-time serving.

    Demo 13

    Enterprise RAG · Security & Governance

    Take RAG inside the company: sync SharePoint, Confluence and shared drives, filter retrieval by each user's permissions, redact sensitive data, and measure answer quality before rollout.

    Demo 14

    Data Quality & Observability

    Catch bad data before it reaches your dashboards — automated quality checks, anomaly detection, lineage and alerting across the pipeline.

    Demo 15

    RAG · Retrieval-Augmented Generation

    Watch a question flow through a Retrieval-Augmented Generation pipeline — documents chunked and embedded into a vector database offline, then a query embedded, top-k chunks retrieved, and the LLM answering grounded in real, cited text.

    Demo 16

    3NF vs. Data Vault

    The old Inmon-vs-Kimball argument is back, and this time it's about the silver layer of the medallion architecture. Should silver be modeled in Inmon-style 3NF, or as a Data Vault 2.0 raw vault?