Brief
Harden an existing dbt project (starter attached, built on the W4 stg_orders
shape) with the three enterprise gates. Finish with a green dbt build.
Tasks
- Contract: enforce
mart_daily_revenue(day: date not_null,revenue_cents: numeric not_null). Show the build failing first by feeding a bad row, then fix and rebuild green. - Exposure: declare one
dashboardexposure for a revenue dashboard reading the mart. Pastedbt ls --select +exposure:<name>output proving lineage resolves. - Unit test: write a
unit_testsYAML block for the revenue aggregation (given 3 input rows incl. one refund, expect exact output).dbt test --select test_type:unitmust pass.
Acceptance (deterministic checks before review)
dbt buildexits 0 with contract enforced (paste log tail).- Exposure resolves in
dbt lsoutput (paste output). - Unit test passes (paste
dbt testsummary). - One intentional contract-break demonstrated (bad row rejected, paste error).
Starter
Legacy dbt project skeleton + seed CSV + TODO-marked YAML files attached.