diff --git a/pipeline/plugins/extractors/tap-uk-ees/tap_uk_ees/tap.py b/pipeline/plugins/extractors/tap-uk-ees/tap_uk_ees/tap.py index 6e07728..5d00c05 100644 --- a/pipeline/plugins/extractors/tap-uk-ees/tap_uk_ees/tap.py +++ b/pipeline/plugins/extractors/tap-uk-ees/tap_uk_ees/tap.py @@ -95,6 +95,11 @@ class EESDatasetStream(Stream): if "geographic_level" in df.columns: df = df[df["geographic_level"] == "School"] + # Drop rows with no URN (LA/category aggregates that slip through the level filter) + urn_col = self._urn_column + if urn_col in df.columns: + df = df[df[urn_col].notna() & (df[urn_col] != "")] + self.logger.info("Emitting %d school-level rows", len(df)) for _, row in df.iterrows():