Skip to content

OECD_Waste_Water_Treatment cloud job fix - #2098

Merged
saanikaaa merged 18 commits into
datacommonsorg:masterfrom
saanikaaa:oecd_waste_water_fix
Aug 28, 2026
Merged

OECD_Waste_Water_Treatment cloud job fix#2098
saanikaaa merged 18 commits into
datacommonsorg:masterfrom
saanikaaa:oecd_waste_water_fix

Conversation

@saanikaaa

@saanikaaa saanikaaa commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

The PR is raised to fix OECD_Waste_Water_Treatment import cloud job which was failing due to deletions and also to add the golden test for the same.

The auto-refresh job was failing due to 1.77% (~130) deleted records, which triggered a validation error. Verified against the source that deletions are as per source itself. More details with attached screenshot can be found here.

As discussed and aligned with core team, we have increased the threshold to 2% for the import to pass.

SOP: Link

PR_CHECKLIST: Link

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new utility script merge_historical_data.py to reconcile and merge current wastewater treatment data with historical records, alongside adding validation configurations and golden datasets. Feedback on the script highlights critical improvements: normalizing key columns to strings to prevent merge mismatches due to differing data types, filtering the merged DataFrame directly to avoid index alignment bugs, and utilizing file_util.FileIO to ensure reliable writing to Google Cloud Storage paths.

Comment thread tools/statvar_importer/merge_historical_data.py Outdated
Comment thread tools/statvar_importer/merge_historical_data.py Outdated
Comment thread tools/statvar_importer/merge_historical_data.py Outdated
Comment thread statvar_imports/oecd/wastewater_treatment/validation_config.json Outdated
Comment thread tools/statvar_importer/merge_historical_data.py Outdated
Comment thread tools/statvar_importer/merge_historical_data.py Outdated
Comment thread statvar_imports/oecd/wastewater_treatment/manifest.json Outdated
@pulkeet-wq

Copy link
Copy Markdown
Contributor

LGTM

Comment thread tools/statvar_importer/merge_historical_data.py Outdated
Comment thread statvar_imports/oecd/wastewater_treatment/validation_config.json
@saanikaaa saanikaaa changed the title OECD_Waste_Water_Treatment cloud job fix and goldens OECD_Waste_Water_Treatment cloud job fix Aug 25, 2026
Comment thread statvar_imports/oecd/wastewater_treatment/validation_config.json
@saanikaaa
saanikaaa merged commit 5f61b98 into datacommonsorg:master Aug 28, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants