version: 2

sources:
  - name: raw
    description: Raw data loaded by Meltano Singer taps into the raw schema
    schema: raw
    tables:
      - name: gias_establishments
        description: GIAS bulk establishment data (one row per URN)
        columns:
          - name: URN
            quote: true
            tests: [not_null, unique]

      - name: gias_links
        description: GIAS predecessor/successor links between schools
        columns:
          - 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

      - name: ees_ks2_attainment
        description: KS2 school attainment (long format — one row per school × subject × breakdown)

      - name: ees_ks2_info
        description: KS2 school information (wide format — context/demographics per school)

      - name: ees_ks4_performance
        description: KS4 performance tables (long format — one row per school × breakdown × sex)

      - name: ees_ks4_info
        description: KS4 school information (wide format — context/demographics per school)

      - name: ees_census
        description: School census pupil characteristics

      - name: ees_admissions
        description: Primary and secondary school admissions data

      # Phonics: no school-level data on EES (only national/LA level)

      - name: parent_view
        description: Ofsted Parent View survey responses

      - name: fbit_finance
        description: Financial benchmarking data from FBIT API

      - name: idaci
        description: Income Deprivation Affecting Children Index lookups
