fix(list): read ofsted grade from fact_ofsted_inspection directly, fix dim_school schema lookup
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 18s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 49s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 1m9s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 18s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 49s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 1m9s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
dim_school.sql was checking for int_ofsted_latest in target.schema (wrong schema) due to the custom generate_schema_name macro using literal schema names. The model lives in 'intermediate', so ofsted_grade/date/framework were always NULL in dim_school, causing all list cards to show 'Not yet inspected'. Fix 1: data_loader.py joins marts.fact_ofsted_inspection with DISTINCT ON to get latest inspection per school — no pipeline re-run needed. Fix 2: dim_school.sql uses schema='intermediate' so future dbt runs correctly denormalise the Ofsted summary into dim_school.
This commit is contained in:
@@ -6,7 +6,7 @@ with schools as (
|
||||
|
||||
{% set ofsted_relation = adapter.get_relation(
|
||||
database=target.database,
|
||||
schema=target.schema,
|
||||
schema='intermediate',
|
||||
identifier='int_ofsted_latest'
|
||||
) %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user