Aglet

Learn from recurring join fanout findings

Recurring fanout findings usually expose missing grain language or a join reused beyond its original detail context. Learning should preserve the relationship examples that made the error visible and add a review habit that asks where aggregation occurs before a new measure is accepted.

Keep the lesson for the next incident

  1. Cluster by grain failure

    Group prior cases into repeated parent sums, post-join counts, child-only filters, missing children, or label ambiguity. For each case, record the intended unit and the relationship that made it easy to lose that unit.

  2. Document the measure contract

    For every affected metric, state its row grain, aggregation stage, treatment of absent children, and whether detail counts are separate. Include a two-parent fixture with different child counts so reviewers can see the expected arithmetic.

  3. Add a design review trigger

    Require a grain and cardinality check when a report adds a join, changes grouping, reuses a metric, or introduces a detail drilldown. Assign metric ownership and keep the fixture near the report definition so future changes revisit the same boundary.

What to carry forward

The learning record is complete when each metric has an explicit grain and a small cardinality fixture that distinguishes parent from detail totals. If stakeholders intentionally want both meanings, keep separate named measures and document their relationship rather than teaching one ambiguous number.

Technical background: PostgreSQL documentation.

Keep the decision with the work.

Use a Work Item in Aglet to record the problem, the evidence you have, and the next decision. Add an owner and priority, then keep updates in the discussion so the next person can follow the reasoning.

Create an account See the product workflow