fix(pipeline): unknown safeguarding values parse to NULL, not "not met"

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:17:11 +01:00
co-authored by Claude Fable 5
parent c2ed002118
commit 03518520f8
@@ -36,7 +36,10 @@ renamed as (
-- Report Card fields (post-Nov 2025 framework), 5-point scale: -- Report Card fields (post-Nov 2025 framework), 5-point scale:
-- 1 Exceptional · 2 Strong standard · 3 Expected standard -- 1 Exceptional · 2 Strong standard · 3 Expected standard
-- · 4 Needs attention · 5 Urgent improvement -- · 4 Needs attention · 5 Urgent improvement
(lower(trim(nullif(rc_safeguarding_met, 'NULL'))) = 'met') as rc_safeguarding_met, case lower(trim(nullif(rc_safeguarding_met, 'NULL')))
when 'met' then true
when 'not met' then false
end as rc_safeguarding_met,
{{ parse_report_card_grade('rc_inclusion') }}::integer as rc_inclusion, {{ parse_report_card_grade('rc_inclusion') }}::integer as rc_inclusion,
{{ parse_report_card_grade('rc_curriculum_teaching') }}::integer as rc_curriculum_teaching, {{ parse_report_card_grade('rc_curriculum_teaching') }}::integer as rc_curriculum_teaching,
{{ parse_report_card_grade('rc_achievement') }}::integer as rc_achievement, {{ parse_report_card_grade('rc_achievement') }}::integer as rc_achievement,