Built for BigQuery on-demand teams

Stop $10k BigQuery surprises before they merge

dbtGuard adds a lineage-aware cost guard to every dbt PR. It detects catastrophic scan patterns, estimates the downstream $ impact, and blocks the merge — before your CFO sees the bill.

Add to GitHub free See how it works →
dbtGuard / cost-analysis ● Failing
dG
dbtguard-bot commented just now
✕ BLOCKED
⚠ This PR adds +$124.80/run in estimated BigQuery costs and triggers 2 critical patterns. Merge is blocked by org policy (threshold: $50/run).
ModelBaselineAfter mergeΔ/run
int_order_items $0.02 $23.87 +$23.85 ↑
fct_orders $1.19 $48.00 +$46.81 ↑
rpt_daily_revenue $0.07 $31.25 +$31.18 ↑
rpt_customer_ltv $0.44 $23.04 +$22.60 ↑
TOTAL $1.72 $126.16 +$124.44 ↑ 72×
Critical
Incremental → full-refresh switch — int_order_items changed from incremental/merge to table. Every run now scans all 18.4M rows instead of the last 3 days.
Critical
Partition filter removed — the WHERE order_date >= DATE_SUB(...) guard was dropped. BigQuery will scan the full 3.8 GB on every execution.
High
Large-table downstream fan-out — 4 downstream models (fct_orders, rpt_*) inherit the full-scan cost on every pipeline run.

The problem

One line of dbt can 100× your BigQuery bill

Changing a model from materialized='incremental' to materialized='table' forces a full-refresh on every run — and propagates full-scan cost through every downstream model. No native tool flags this before the merge.

100×
typical cost spike from an incremental→table switch
$6.25
per TiB scanned on BigQuery on-demand pricing
<30s
to analyze your full dbt DAG and post a PR comment
4
catastrophic patterns detected before they merge

What dbtGuard does

Everything Slim CI doesn't

dbt's built-in Slim CI tells you which models changed. dbtGuard tells you what it costs — including every model downstream that inherits the scan.

🔍

Lineage-aware downstream impact

Resolves the full downstream closure of every changed model using your dbt manifest — not just the model you touched.

🚨

Catastrophic pattern detection

Flags incremental→full-refresh switches, dropped partition filters, unfiltered table scans, and large-table fan-outs before they land in prod.

💵

Dollar-denominated estimates

Uses your dbt catalog's num_bytes stats and BigQuery's $6.25/TiB on-demand rate. No dry-run needed — works in any CI.

🚧

Merge gates with org policy

Block merges that exceed a cost threshold or trigger high-severity patterns. Set rules per repo or across your whole org.


How it works

Two files. One GitHub Action.

Point dbtGuard at your dbt artifacts and it handles the rest — lineage, cost math, pattern detection, and PR comment.

1

Upload your dbt artifacts

Pass manifest.json and catalog.json from your CI run. No BigQuery credentials needed for the free tier.

2

dbtGuard resolves your DAG

The lineage engine walks the upstream/downstream graph and identifies every model in the blast radius of your change.

3

Cost estimates + pattern check

Bytes scanned × $6.25/TiB per model, labeled exact (table) or estimated (incremental). Four catastrophic patterns checked.

4

PR comment posted. Gate evaluated.

A GitHub PR comment shows the full cost-diff. If org policy is breached, the check fails and the merge is blocked.

# .github/workflows/dbt-cost-guard.yml - uses: dbtguard/action@v1 with: manifest: target/manifest.json catalog: target/catalog.json github_token: ${{ secrets.GITHUB_TOKEN }} cost_threshold: 50 # $ per run block_on_critical: true
$ curl https://your-instance/health { "status": "ok", "version": "0.1.0" }
fixtures/ manifest.json # 6-model jaffle_shop DAG catalog.json # table sizes up to 12 GB sample_diff.sql # incr→table change

Pricing

Free to try. Pay when it saves you money.

The PR comment and pattern detection are always free. The gating/policy layer is the paid tier — you only need it once you've seen what's in your DAG.

Free
$0 / month
For solo analytics engineers and small teams exploring dbt cost hygiene.
  • PR cost-diff comment (5 PRs/day)
  • Lineage-aware downstream impact
  • 4 catastrophic pattern detections
  • Catalog-based $ estimates
  • Merge gating / policy rules
  • Scan history
  • Org-wide rules
Team
$249 / month
Multi-repo, SOC 2 audit log, and BigQuery dry-run integration for exact incremental estimates.
  • Everything in Guard
  • Unlimited repos
  • Live BigQuery dry-run (exact costs)
  • SOC 2 audit log
  • Per-repo policy overrides
  • Priority support
  • Grafana / Datadog export