Write the daily net-sales contract with worked rows
Finance subtracts posted refunds from captured charges; product subtracts pending refunds too. Both dashboards use Net sales and disagree for merchant M-17.
- Focused work estimate
- 1h 30m + prerequisites
- Priority in the scenario
- High
- Engineering practice
- Metric definitions · Data contracts · Analytical reasoning
Estimated field mix
- Data engineering100%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
A fictional marketplace reports daily sales to merchants. Refund joins inflate revenue, merchants close books in different time zones, and backfills compete with nightly loads. All source orders and merchants are synthetic.
Setup prerequisites
- SQL joins and aggregates
- Batch pipelines
- Metric definitions
Preceding work
No earlier ticket is required. Complete the project setup above.
Acceptance criteria
- Define grain, inclusion states, currencies, and reporting date.
- Provide six worked rows covering captures, refunds, pending entries, and voids.
- Explicitly exclude tax and shipping from this exercise's net-sales metric.
Implementation constraints
- Do not resolve ambiguity by silently adopting whichever query exists.
Verification to include
- Recalculate worked totals independently from the contract.
- Demonstrate why pending refunds and voids do not change posted totals.
Deliverables
- Versioned metric contract with executable example assertions
Rollout and recovery
Review worked examples with the synthetic analyst role before downstream adoption.
Value of the work
For the engineer: Practice metric contracts, historical dimensions, incremental processing, and reproducible warehouse releases.
For the team: Inspect whether an engineer can reconcile business totals and explain metric changes in a reviewable data product.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.