fusion_validate_report
Validates a registered report's output against trusted ground truth, checking all expectations in one run and returning a diff for every mismatch to guide repairs.
Instructions
Run a registered report once and check its results against known ground truth.
This is the tool that makes an answer trustworthy rather than merely plausible, and it is the validation path that works on a pod without lexical substitution. Supply the facts the user already trusts -- a total read off the Fusion UI, a known document number, an exported spreadsheet -- and every expectation is evaluated (never short-circuited), so one round trip tells you everything that is wrong rather than the first thing.
Read the diff on failure; it is a repair signal, not just a verdict. Because
the SQL lives in the report's data model, some repairs are not yours to make:
unique_keyfailed -- join fan-out inside the report: a_TLjoin withoutLANGUAGE = USERENV('LANG'), or an_F/_Mjoin without an effective-date predicate. Report it to whoever owns the data model.an expected row is absent -- either the report's filter is too tight, or Fusion row-level Data Security hides that row from the service account. Vary the bind values to test the first before assuming the second.
an aggregate is off -- cancelled/draft rows still included, mixed currencies summed together, or fan-out multiplying the amount.
cross_check needs to run an independent SQL statement, which this pod
refuses. It comes back as one failed expectation explaining exactly that,
while every other expectation is still evaluated normally -- so do not read
its failure as a data problem.
Two honest limits: a passing fixture proves consistency with the ground truth supplied, not universal correctness (use at least two independent expectation types); and results reflect what the single service account is allowed to see.
Args:
report: Registered report name, as listed by fusion_list_reports.
params: Bind values for the report. Omitted parameters take its defaults.
expectations: Inline expectation objects. Mutually exclusive with fixture.
fixture: Name of a saved fixture to validate against.
max_rows: Rows to validate over; keep it above the expected row count, as
the report itself applies no cap and this one is applied here.
timeout_s: Per-call timeout in seconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | ||
| report | Yes | ||
| fixture | No | ||
| max_rows | No | ||
| timeout_s | No | ||
| expectations | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||