diff --git a/pipeline/transform/models/staging/stg_ees_ks2_national.sql b/pipeline/transform/models/staging/stg_ees_ks2_national.sql index 7335ce6..44dfbe4 100644 --- a/pipeline/transform/models/staging/stg_ees_ks2_national.sql +++ b/pipeline/transform/models/staging/stg_ees_ks2_national.sql @@ -31,4 +31,10 @@ select from {{ source('raw', 'ees_ks2_national') }} where time_period ~ '^[0-9]+$' - and cast(trim(time_period) as integer) >= 201617 + -- 2015/16 was the first year of the current expected-standard tests, so it's + -- the correct floor (not 2016/17 -- that excluded a real, comparable national + -- row). GPS/science/scaled-score columns are already mapped correctly end to + -- end (tap.py's _KS2_NATIONAL_COL_MAP + this model select them fine); the + -- prod NULLs for those fields are stale raw.ees_ks2_national data from before + -- the map covered them, not a mapping bug -- no map change accompanies this fix. + and cast(trim(time_period) as integer) >= 201516