Aglet

Investigate report join fanout with grain evidence

Investigation should show exactly where a parent contribution is repeated and whether aggregation happens before or after the multiplying relationship. Use a compact fixture with one parent and multiple children, then add a second parent to prove the finding is a grain rule rather than one unusual record.

Build a useful investigation brief

  1. Construct a cardinality fixture

    Create two parent entities with known measure values and different child counts, including one with no child. Record the expected parent-level total and the detail-level total. Keep identifiers and grouping fields visible so each row can be traced.

  2. Compare each aggregation stage

    Calculate the measure at the base grain, after each join, and after final grouping. Show row counts and summed contributions at every stage. Identify whether a repeated parent field is being summed, counted, or carried into a later aggregate.

  3. Write a minimal evidence brief

    State the intended grain, the first multiplying edge, the observed numeric change, and the smallest query or fixture that reproduces it. Note legitimate detail counts separately, and leave implementation cause as a hypothesis when query plans or definitions are unavailable.

What to carry forward

The investigation is sufficient when the fixture demonstrates the first grain multiplication and the measure difference can be recomputed from recorded rows. Stop at the grain boundary if the evidence cannot establish whether the report intends parent or detail semantics.

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