Compare
SQLBuild vs Bruin
Bruin runs your SQL. SQLBuild reads it as one graph and checks it before anything runs.
Errors before anything runs
Section titled “Errors before anything runs”Bruin checks a query by dry-running it on the warehouse, so every table it reads must already
exist. sqb compile checks columns, types and functions offline, from your project alone, before
any table is built.
$ sqb compileerror[B002]: Unknown column 'qty' in stg_orders (as o) model: fact_orders --> sql/models/marts/fact_orders.sql:16:5 | 16 | o.qty, | ^^^ = note: stg_orders has: quantity, status, waffle_type_id, customer_id, order_id, ordered_at = help: did you mean 'quantity'?One graph, every column traced
Section titled “One graph, every column traced”Bruin splits a project into pipelines, and dependencies between them need Bruin Cloud. Its column lineage follows the columns you declare on each asset. SQLBuild compiles the whole project as one graph and traces columns from the SQL itself.
$ sqb lineage stg_orders.ordered_at --direction downstreamColumn trace stg_orders.ordered_at downstream
├── daily_order_partitioned.order_date (cast)├── daily_revenue.revenue_date (cast)└── fact_orders.ordered_at (direct) ├── customer_status_snapshot.last_ordered_at (aggregation) ├── hourly_order_activity.activity_hour (expression) │ ├── daily_activity_rollup.activity_day (expression) │ │ └── hourly_activity_with_daily_context.activity_day (from SELECT *) │ └── hourly_activity_with_daily_context.activity_hour (from SELECT *) └── order_status_index.ordered_at (direct)See Column lineage.
Run only what changed
Section titled “Run only what changed”The same graph tells sqb build --changed what to run: every model whose compiled SQL changed, and
everything downstream of it. Bruin’s --modified matches changed files to assets, so an edit to a
shared macro selects nothing.
Here a macro edit changes fact_orders, and the plan picks up the five models that read it:
$ sqb plan --changed…Query changed (1)└── fact_orders continue forward └── query diff: - w.price_cents * o.quantity AS line_total_cents, + CAST(w.price_cents AS BIGINT) * o.quantity AS line_total_cents,…Downstream of changes (5)├── customer_status_snapshot reads fact_orders├── daily_activity_rollup reads hourly_order_activity├── hourly_activity_with_daily_context reads hourly_order_activity├── hourly_order_activity reads fact_orders└── order_status_index reads fact_orders
Unchanged (7): skipped by --changedSee Planning.
Testing
Section titled “Testing”A Bruin unit test checks one asset, with its inputs mocked, on the warehouse. A SQLBuild test mocks the sources and runs every model in between, on DuckDB on your laptop or on the warehouse.
| SQLBuild | Bruin | |
|---|---|---|
| Tests across several models | Mock the sources, run every model in between | One asset, its inputs mocked |
| End-to-end scenarios | Source fixtures through the real model graph | No |
| Warehouse SQL on your laptop | Converted to DuckDB | No; tests run on the asset’s connection |
| Macro, UDF and table function tests | Yes | No |
| Typed, parameterised cases | Yes | No |
Here the first test runs three real models from mocked sources:
$ sqb testTests ready 4 selected, 4 local
1/4 test test_daily_revenue_chain PASS local 0.02s 3 real models 2/4 test test_fact_orders PASS local 0.01s 1 real model 3/4 test calculates_line_total_cents PASS local 0.01s 4/4 test test_stg_orders PASS local 0.01s 1 real model
✓ Completed successfully PASS=4 FAIL=0 TOTAL=4 (0.43s)Your team’s rules in the compiler
Section titled “Your team’s rules in the compiler”Bruin’s built-in policies check metadata such as owners, descriptions and names. SQLBuild Rules read what the compiler knows about your SQL, so a review comment becomes an error that points at the line.
| SQLBuild | Bruin | |
|---|---|---|
| Built-in rules | 205 | 20, on metadata |
| What they check | Models, the graph, tests, jobs and sensors, and your Python code | Assets and pipelines |
| Custom rules | Python functions on the compiler’s facts | One-line expr expressions over an asset’s fields |
Here a team rule stops a mart reading a raw source directly:
@rule( code="XSQBRARCH001", message="Marts must read sources through staging", remediation="Reference a staging model with __ref() instead.",)def marts_use_staging(*, model: Model, ctx: RuleContext) -> list[Finding]: layer = ctx.project.tree.relative_parts(path=model.path, under="models")[0] sql = ctx.sql.for_model(model).authored.source if layer != "marts" or "__source(" not in sql: return [] line = sql[: sql.index("__source(")].count("\n") + 1 return [ctx.finding(subject=model, line=line)]$ sqb compileerror[XSQBRARCH001]: Marts must read sources through staging --> models/marts/daily_revenue.sql:24:1 | 24 | INNER JOIN __source("raw__payments") p ON o.order_id = p.order_id | ^ = help: Reference a staging model with __ref() instead.See Rules.
A free web UI, with SSO
Section titled “A free web UI, with SSO”Bruin’s open-source CLI comes with a VS Code extension; its web UI, scheduling, roles and SSO are in Bruin Cloud. SQLBuild includes all four, self-hosted and free.
| SQLBuild | Bruin | |
|---|---|---|
| Web UI | Included, self-hosted | Bruin Cloud |
| Scheduler | Included, self-hosted | Bruin Cloud, or your own cron or Airflow |
| Roles | Free, down to the model | Bruin Cloud |
| SSO | Free | Bruin Cloud’s Scale plan |


See the Web UI.
Every feature, side by side, is in the Feature Comparison.