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.
Waffle Shop Example
The waffle shop is a self-contained example project that demonstrates the core features of SQLBuild: views, tables, incremental models, microbatch execution, seeds, audits, tests, and custom materializations.Project overview
The project models a fictional waffle shop’s order data:- Raw sources:
raw_customers,raw_orders,raw_payments(provisioned byseed_raw_data.sql) - Staging views:
stg_customers,stg_orders,stg_payments - Fact/dimension tables:
fact_orders,dim_customers,daily_revenue - Incremental models: cursor-based and microbatch models with runtime-owned cursor resolution
- Custom materialization:
daily_order_partitionedusing a Python partition-tracked strategy - Seed:
waffle_typesCSV - Audits:
not_null,unique,accepted_values,expression_is_true - Test:
test_stg_ordersSQL unit test
Model DAG
Incremental models
customer_status_snapshot
- Strategy:
merge - Cursor:
last_ordered_at(timestamp, second grain) - Model-backed cursor input from
fact_orders.ordered_at - Backfill policies:
query_change_backfill: full,schema_change_backfill.type_change: full
hourly_order_activity
- Strategy:
delete_insert - Cursor:
activity_hour(timestamp, hour grain) - Microbatch with
batch_size: 1d - Model-backed cursor input from
fact_orders.ordered_at
daily_activity_rollup
- Strategy:
delete_insert - Cursor:
activity_day(timestamp, day grain) - Microbatch with
batch_size: 2d - Model-backed cursor input from
hourly_order_activity.activity_hour - Backfill policy:
query_change_backfill: bounded(14d)
hourly_activity_with_daily_context
- Strategy:
delete_insert - Cursor:
activity_hour(timestamp, hour grain) - Microbatch with
batch_size: 6h - Model-backed cursor input from
daily_activity_rollup.activity_day - Demonstrates opposite-grain replay: finer downstream from coarser upstream
order_status_index
- Strategy:
delete_insert - Cursor:
order_id(integer) - Non-microbatch incremental

