Production-Ready Toolkit · v2.4

dbt + BigQuery
Performance Pack

Your BigQuery bill has a leak. This pack gives you 68 production-ready files — macros, SQL analyses, playbooks, and benchmark scripts designed to help you catch waste faster, ship safer incrementals, and bring proof to the next standup.

  • 30-day money-back
  • Instant download
  • Lifetime updates
  • Compatible with dbt 1.6+
Designed for data engineers Templates, not a course

Built to help you catch expensive query patterns, stop silent MERGE mistakes, and show before/after proof without building everything from scratch.

✓ 68 files ready
⚡ safe_merge.sql
LIVE BigQuery Cost Monitor
00:00:00
GiB / day 2,458
Monthly Cost $14,823 ↑ 18% last month
Active models 12
Model GiB Est. $ Status
orders_fact 847 $5.29 no partition
events_raw 1200 $7.50 full scan
revenue_daily 12 $0.07 partitioned
users_snapshot 399 $2.49 no cluster
⚠ 3 models need optimization · $15.28 wasted/day
6
Playbooks
18
dbt Macros
30+
SQL Snippets
68+
Files Ready
The Problem

The patterns that quietly drain your BigQuery budget

Most teams only discover these on billing day — when it is already too late.

💸

Unpartitioned tables

Queries scan entire datasets instead of the partitions you actually need.

Common cost driver
🔁

MERGE creates silent duplicates

Standard incremental patterns fail quietly when the source contains duplicate rows.

Data quality risk
🚨

No per-model cost visibility

Without attribution queries, the invoice grows and nobody knows which model caused it.

Zero attribution

Rebuilding the same patterns

Date spines, cost guards, dedup macros, and benchmark logic keep getting rebuilt from scratch.

Engineering waste
The Performance Pack addresses all of these. Copy, paste, validate. Estimate only · results vary.
See pricing
Quickstart

Running in 10 minutes

No complex setup. Install, run one analysis, benchmark before/after, and bring proof to the next standup.

01
Option A — local package

Add to packages.yml

Copy dbt_package/ch_bq_pack/ into your repo and install as a local package.

packages:
  - local: ./dbt_package/ch_bq_pack
Then run dbt deps.
02
Option B — direct drop-in

Copy macros directly

No package config required. Move the macros into your existing project structure.

cp -R dbt_package/ch_bq_pack/macros ./macros
Works with standard dbt + BigQuery projects.
03
Validate immediately

Run a cost analysis

Start with INFORMATION_SCHEMA to find the worst offenders first.

analyses/cost/cost-01-top-20-most-expensive-queries.sql
Set var('bq_region') if needed.
04
Prove the impact

Benchmark before/after

Use the Python harness to capture bytes billed, runtime, and JSON proof.

python scripts/benchmark/harness.py --sql query.sql --runs 3
Requires google-cloud-bigquery + ADC.
What's inside

Six deep-dive playbooks. 68 files ready to ship.

Not theory, not slides. Production-ready code you validate in your own environment.

01

Query Cost Optimization

Diagnose expensive queries, fix partition pruning, add clustering, and deploy cost guards before billing day hits.

10 analysescost_guardpartition checks
02

Incremental Models & MERGE

Safe MERGE patterns, late-arriving data strategies, and production-ready dedup logic that holds up under pressure.

safe_mergelookback windowssoft delete
03

Macros & Reusable Patterns

18 installable macros covering spend guardrails, safety nets, quality assertions, date spines, and Editions planning.

18 macrosdbt packageJinja
04

Performance Tuning

JOIN patterns, BI Engine strategies, query cache opportunities, and practical SQL examples to reduce wasted bytes.

8 monitorssmart_materializeBI Engine
05

Benchmark Harness

Measure cost and runtime before and after every change. Generate stakeholder-ready JSON proof without guesswork.

Python harnessJSON outputbefore/after
06

Editions Migration

Decision frameworks and autoscaling guidance to compare Standard, Enterprise, and Enterprise Plus for your workload.

slot planningmigration guidecalculator
dbt Package Installable via packages.yml
18 Analysis Queries One file per analysis
Cheat Sheet 1-page quick reference
Quickstart Guide Running in 10 minutes
Python Harness Advanced benchmarking
File tree

What the download looks like

A quick macOS-style peek before you open the live editor below.

dbt-bq-performance-pack/
dbt_package/ch_bq_pack/
macros/
incremental/safe_merge.sql
incremental/dynamic_lookback.sql
performance/cost_guard.sql
performance/editions_cost_compare.sql
quality/assert_row_count_stable.sql
utils/date_spine_bq.sql
analyses/cost/
cost-01-top-20-most-expensive-queries.sql
cost-02-daily-cost-trend.sql
docs/playbooks/
01-query-cost-optimization/PLAYBOOK.md
02-incremental-models-merge/PLAYBOOK.md
scripts/benchmark/harness.py
QUICKSTART.md · DOCUMENTATION.md · CHEATSHEET.pdf
Explore code

Real shipped code. No mystery box.

Click any file in the sidebar. Open tabs, close tabs, inspect the syntax. This is a live preview of the kind of code inside the pack.

CH Data Tools · package preview
dbt_package/ch_bq_pack/macros/incremental/safe_merge.sql

Deduplicate source rows before production MERGE and make incremental rollouts safer.

Ready
SQL / Jinja Ln 1, Col 1
Production proof

Why serious teams buy this

No fake scarcity, no magic promises — just the specific problems this pack is designed to help you tackle faster.

Guardrails first

Catch runaway scans before the invoice lands

cost_guard is built for the exact moment when one model suddenly starts scanning hundreds of GB every run.

Safer incrementals

Stop silent duplicate rows

safe_merge_dedup gives you a tested starting point for the source dedup problem that breaks dashboards later.

Stakeholder proof

Show before / after evidence

The harness standardizes runtime, bytes billed, and JSON reporting so optimization work is easier to justify.

ROI

Estimate monthly spend in 60 seconds

Use on-demand BigQuery assumptions to model current spend, expected reduction, and potential savings. Estimate only. Results vary.

Assumptions On-demand pricing at $6.25 / TiB with the first 1 TiB / month free.
Current cost $0.00 Estimate only. Results vary.
After reduction $0.00 Estimate only. Results vary.
Estimated savings $0.00 Estimate only. Results vary.
Pricing

One purchase. Lifetime access.

No subscriptions. Buy once, keep the pack, reuse the patterns, and get future updates.

DIY Performance Pack
Cost guardrail macros4–8 hours of research and buildReady to copy in
Safe incremental MERGETrial and error in productionsafe_merge_dedup included
Per-model cost attributionWrite 10+ queries yourself18 analyses and monitoring queries
Before / after proofManual work, no standard formatPython harness + JSON output
Time to valueWeeks of iteration~10 minutes after download
Solo License
$199

1 engineer · unlimited personal and professional projects

  • ✓ All 6 playbooks
  • ✓ 18 dbt macros
  • ✓ 30+ SQL snippets
  • ✓ Benchmark harness
  • ✓ Cheat sheet + quickstart
  • ✓ Lifetime updates
Get Solo License
Company License
$999

Unlimited engineers · CI/CD rights · internal tooling rights

  • ✓ Everything in Team
  • ✓ Unlimited engineers
  • ✓ CI/CD integration rights
  • ✓ Internal tooling rights
  • ✓ Lifetime updates
Get Company License

30-day money-back guarantee · Instant download · Estimate only · Results vary

FAQ

Common questions

A ZIP file with 68 production-ready files: playbooks, dbt macros, SQL analyses, monitoring queries, a Python benchmark harness, cheat sheet, and quickstart docs.
No. This is a code toolkit. Templates, macros, SQL queries, and playbooks you can drop into real dbt + BigQuery work immediately.
dbt-core 1.6+ with dbt-bigquery 1.6+. The macros use standard Jinja patterns and include examples for newer releases where useful.
If you use dbt + BigQuery and want practical patterns for cost visibility, safer incrementals, and benchmarking, yes. You still need to adapt project and dataset names to your environment.
The content is the same. The license controls how many engineers can use it and whether you have broader internal / CI/CD usage rights.
There is a 30-day money-back guarantee. Email henrique999930@gmail.com if you need help.
Stop guessing

Start shipping.

68 production-ready files. Instant download. Lifetime updates. 30-day money-back guarantee.

dbt + BigQuery Performance Pack One purchase · lifetime updates · 30-day guarantee
Snippet copied