FH09 — unionAll branches with mismatched shape
Group: Structure · Severity: error · Run by: validate and lint
All branches of a unionAll must produce the same column names in the same
order, so the union has a single well-defined shape. Branches whose shapes
disagree are rejected.
Example
Section titled “Example”The two branches name their column a and b — FH09:
{ "resource": "Patient", "select": [{ "unionAll": [ { "column": [{ "name": "a", "path": "id" }] }, { "column": [{ "name": "b", "path": "id" }] } ] }]}error [FH09]: unionAll branches have mismatched column shape (same names in thesame order required)Make every branch emit the same column names in the same order (the paths may differ — only the names and order must match):
"unionAll": [ { "column": [{ "name": "a", "path": "id" }] }, { "column": [{ "name": "a", "path": "name.given" }] }]