fix(stg_ofsted_inspections): correctly filter NULL string inspection dates
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 32s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m5s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 1m25s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s

The string 'NULL' is not SQL NULL, so the WHERE in the renamed CTE
passed those rows through. Filter on the raw value using nullif in the
CTE and on the computed date in the outer SELECT.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-27 18:21:30 +00:00
parent 1d56eebe87
commit 7724fe3503

View File

@@ -36,7 +36,8 @@ renamed as (
report_url
from source
where urn is not null
and inspection_date is not null
and nullif(trim(inspection_date), 'NULL') is not null
)
select * from renamed
where inspection_date is not null