Course overview/Operate with an agent4 of 5
Capstone: ship it
Capstone: ship it
Make both reporting tables safe to update, test, document, and rerun.
The pipeline must stand without a person watching it
The request is: “The weekly category report and the churn-risk list need to be correct every Monday at 8am, without anyone checking them by hand.” The answer is a pipeline graph with explicit dependencies, fields that record when data happened and when it arrived, a clear meaning for each row, blocking checks, source comparisons, unit tests, a separate dev database, and protected reporting tables.
dates -----------------> weekly_category_revenue
orders -> stg_orders -> fct_order_lines -> weekly_category_revenue
order_items -> stg_order_items -------------> fct_order_lines
products ----> stg_products ----------------> fct_order_lines
customers -> stg_customers -> dim_customer -> churn_risk
orders ----> stg_orders --------------------> churn_risk
customer_snapshots -> dim_customer_history
The expected weekly output has one row per iso_week, category_name, with revenue and order_line_count. The churn output has one row per customer with last_order_at and reason. The filtered source comparison must total exactly 2,509 lines and 733,684.59 in the currencies supplied by the source data.
Your task
Implement the governed capstone in the project. Commit the evidence to docs/capstone-evidence.md: the pipeline graph, expected output table with reason, total source comparison, rerun results, late-arrival proof, at least four edge-case unit tests, a clean dev run, protection against replacing all rows in a reporting table, and one injected defect caught by a named check.
Do not reveal course/answer-key.md before submitting the evidence and asking for review.
Check your understanding
- What must the incremental key and late-data filter represent?
- What proves that a check is useful?
- Where must enforceable guardrails live?
Do it with your agent
Say next lesson, complete the evidence and adversarial pass, then say review my work.
Rubric
- Idempotence and incremental correctness each have two rerun or late-row evidence statements.
- A named blocking check catches an injected defect; at least 4 edge-case unit tests pass.
- Dev safety, reporting-table refresh protection, row-meaning and metric documentation, dependencies, source comparison, and exactly five guardrails are all evidenced.