Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sqlbuild.com/llms.txt

Use this file to discover all available pages before exploring further.

SQLBuild, dbt, and SQLMesh are all SQL pipeline frameworks. They share common ground but differ in design philosophy and feature focus.

Feature comparison

FeatureSQLBuilddbtSQLMesh
Testing
Unit tests with model chainingChain across multiple modelsYAML-stub, single modelCTE-based, single model
E2E scenario testsFixture worlds with real graph executionNoNo
Local E2E replayCapture from warehouse, replay in DuckDBNoNo
Macro / UDF / table function testsTEST(mode: macro/udf/table_fn)NoNo
Zero-row assertions__assert__ CTEs in tests and scenariosNoNo
Audits
Built-in auditsnot_null, unique, accepted_values, relationshipsnot_null, unique, accepted_values, relationshipsExtensive (statistical, string pattern, etc.)
Blocking auditsBlock promotion from staging tableTests run after materializationBlock during plan; during run, data already written
Delta/interval-scoped auditsPer-microbatch audit cycle before DMLNoPer-interval for time-range models
Compilation
SQL validationSQLGlot-based, offlinedbt Fusion (proprietary license)SQLGlot-based
Column-level lineageCompile-time, fast and rich modesPost-hoc via docsCompile-time
Column contract validationInfer columns, check types offlineYAML schema contracts at runtimeSchema contracts via plan
SQL transpilationFor local E2E replay into DuckDBNoFor cross-dialect model execution
Python macros@macro() syntaxNo (Jinja only)SQLMesh macro syntax
Jinja supportNo (Python macros instead)Yes (core templating)Yes
Incremental
Incremental strategiesappend, delete_insert, mergeappend, delete+insert, mergetime-range, unique-key, partition, SCD Type 2, append
Microbatch executionConfigurable batch sizes with per-batch auditsMicrobatch (recent addition)Batch size support
Stateful interval trackingNo - cursor-based (no external state)NoYes - tracks which intervals ran
SCD Type 2 modelsComing soonSnapshots (limited)Built-in
Environments
Virtual environmentsNoNoPointer swaps, no compute cost
Environment diffsFull row-level data comparisonNoTable diff
Zero-copy cloningsqb cloneNoNo
Models
SQL modelsMODEL() header with inline configJinja-templated SQL + YAML sidecarMODEL DDL
Python modelsComing soonLimited (remote only)Pandas, PySpark, Snowpark, BigFrames
Custom materializationsPython with full framework hooksJinja-basedPython-based custom model kinds
dbt
dbt interopRun alongside dbt - reads manifest, no migrationN/AReimplements Jinja for compatibility
Other
Reference syntax__ref() - parses as valid SQL{{ ref() }} - Jinja templatemodel_name with dependency tracking
AdaptersDuckDB, Snowflake, BigQuery, Databricks30+ (community adapters)DuckDB, Snowflake, BigQuery, Databricks, Spark, Redshift, Postgres, Trino, MySQL
State requirementsStateless by defaultmanifest.json + target/Requires state store (local DB, S3, or Valkey)
Playgroundsqb playgroundClone example repoExample project
AI agent skillssqb skills updateNoNo

Design philosophy

SQLBuild is test-first. Audits block promotion from a staging table. Unit tests run before their target models. Scenarios exercise real project graphs with fixture data. Local replay runs the same tests in DuckDB without a warehouse connection. The framework is stateless by default - no external database or state store needed to get started. dbt is Jinja-based SQL templating. Unit tests are YAML-defined stubs for single models. Audits run after materialization. Acquired by Fivetran. SQLMesh is state-first. Virtual environments and interval tracking require a state store (local database or PostgreSQL for production). Acquired by Fivetran.

Not yet in SQLBuild

  • SCD Type 2 models - slowly changing dimension support (in active development)
  • Python models - Pandas, PySpark, Snowpark, BigFrames (in active development)
  • First-party partition state tracking - opt-in stateful partition tracking (currently possible via custom materializations, first-party support coming soon)
  • Broader adapter support - PostgreSQL, ClickHouse, and Microsoft SQL Server are coming soon