Merge pull request 'fix: convert NaN/NULL to None and restore record properties structure in tap.py' (#48) from feature/ingest-independent-schools into main
Stage (build -> staging -> E2E gate) / Build Backend (FastAPI) (push) Successful in 14s
Stage (build -> staging -> E2E gate) / Build Frontend (Next.js) (push) Successful in 50s
Stage (build -> staging -> E2E gate) / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 1m22s
Stage (build -> staging -> E2E gate) / Deploy to Staging (push) Successful in 1s
Stage (build -> staging -> E2E gate) / E2E Journeys against Staging (push) Failing after 41s
Stage (build -> staging -> E2E gate) / Build Backend (FastAPI) (push) Successful in 14s
Stage (build -> staging -> E2E gate) / Build Frontend (Next.js) (push) Successful in 50s
Stage (build -> staging -> E2E gate) / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 1m22s
Stage (build -> staging -> E2E gate) / Deploy to Staging (push) Successful in 1s
Stage (build -> staging -> E2E gate) / E2E Journeys against Staging (push) Failing after 41s
Reviewed-on: #48
This commit was merged in pull request #48.
This commit is contained in:
@@ -237,18 +237,15 @@ class OfstedInspectionsStream(Stream):
|
|||||||
|
|
||||||
for _, row in df.iterrows():
|
for _, row in df.iterrows():
|
||||||
record = {}
|
record = {}
|
||||||
for key in self.schema["properties"].keys():
|
|
||||||
record[key] = None
|
|
||||||
|
|
||||||
for field, col in col_map.items():
|
for field, col in col_map.items():
|
||||||
val = row.get(col, None)
|
val = row.get(col, None)
|
||||||
if val == 'NULL':
|
if pd.isna(val) or val == 'NULL':
|
||||||
val = None
|
val = None
|
||||||
record[field] = val
|
record[field] = val
|
||||||
|
|
||||||
# Cast URN
|
# Cast URN
|
||||||
try:
|
try:
|
||||||
record["urn"] = int(record["urn"])
|
record["urn"] = int(record.get("urn"))
|
||||||
except (ValueError, KeyError, TypeError):
|
except (ValueError, KeyError, TypeError):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user