OECD_Waste_Water_Treatment cloud job fix and goldens#2098
Open
saanikaaa wants to merge 6 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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.
pulkeet-wq
reviewed
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 6.87% (512) 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.
To fix this we have pulled all the deleted 512 data points from prod and uploaded to GCP Bucket. A common script is created "merged_historical_data.py" which helps in merging the output csv generated from statvar_processor and append/de-duplicate historical data to it for fullness of output data. This script can be used in future for merging purpose for the imports which are generated by statvar processor.
Differ: https://screenshot.googleplex.com/3vZEs7Q9NGEsLxg - Here we can see there are no deletions. Only points modification and additions. These modification are validated - Link
SOP: Link
PR_CHECKLIST: Link