fix(pipeline): align SEN column order across KS4 union branches

int_ks4_with_lineage.sql unions stg_ees_ks4 and stg_legacy_ks4 via
`select *`, which PostgreSQL aligns positionally. stg_legacy_ks4 listed
sen_support_pct before sen_ehcp_pct while stg_ees_ks4 lists sen_ehcp_pct
before sen_support_pct, swapping the two values for legacy-sourced rows
in marts.fact_ks4_performance. Reordered stg_legacy_ks4's final select
to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB
This commit is contained in:
Tudor
2026-07-12 22:00:15 +01:00
co-authored by Claude Fable 5
parent 34a5de2687
commit 5f1b6adb44
@@ -41,8 +41,8 @@ select
-- SEN
null::numeric as sen_pct,
{{ safe_numeric('sen_support_pct') }} as sen_support_pct,
{{ safe_numeric('sen_ehcp_pct') }} as sen_ehcp_pct,
{{ safe_numeric('sen_support_pct') }} as sen_support_pct,
-- Progress 8 banding & disadvantage gaps (not published in legacy format)
null::text as progress_8_banding,