From 24cfb83144897c45b6e8c2533c6cb8d3d259a981 Mon Sep 17 00:00:00 2001 From: Tudor Date: Thu, 26 Mar 2026 20:25:56 +0000 Subject: [PATCH] fix(dbt): fix GIAS source column quoting and remove tests on unloaded sources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GIAS tap emits uppercase URN column — add quote: true so dbt source tests reference "URN" instead of urn. Remove source-level tests from tables not yet loaded (ofsted, ees, parent_view, fbit, idaci) to prevent relation-not-found errors during dbt build. Co-Authored-By: Claude Opus 4.6 --- .../transform/models/staging/_stg_sources.yml | 35 ++++--------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/pipeline/transform/models/staging/_stg_sources.yml b/pipeline/transform/models/staging/_stg_sources.yml index 0b360ad..ae0581a 100644 --- a/pipeline/transform/models/staging/_stg_sources.yml +++ b/pipeline/transform/models/staging/_stg_sources.yml @@ -8,65 +8,42 @@ sources: - name: gias_establishments description: GIAS bulk establishment data (one row per URN) columns: - - name: urn + - name: URN + quote: true tests: [not_null, unique] - name: gias_links description: GIAS predecessor/successor links between schools columns: - - name: urn + - name: URN + quote: true tests: [not_null] + # Sources below are loaded by monthly/annual pipelines. + # Source tests are added once the corresponding extract has run. - name: ofsted_inspections description: Ofsted Management Information inspection records - columns: - - name: urn - tests: [not_null] - name: ees_ks2 description: KS2 attainment data from Explore Education Statistics - columns: - - name: urn - tests: [not_null] - name: ees_ks4 description: KS4 attainment data from Explore Education Statistics - columns: - - name: urn - tests: [not_null] - name: ees_census description: School census pupil characteristics - columns: - - name: urn - tests: [not_null] - name: ees_admissions description: Primary and secondary school admissions data - columns: - - name: urn - tests: [not_null] - name: ees_phonics description: Phonics screening check results - columns: - - name: urn - tests: [not_null] - name: parent_view description: Ofsted Parent View survey responses - columns: - - name: urn - tests: [not_null] - name: fbit_finance description: Financial benchmarking data from FBIT API - columns: - - name: urn - tests: [not_null] - name: idaci description: Income Deprivation Affecting Children Index lookups - columns: - - name: urn - tests: [not_null]