Uh oh!
There was an error while loading. Please reload this page.
Add validation config, goldens, counters, and existing statvar mcf for statistics_poland - #2129
Conversation
…r statistics_poland
There was a problem hiding this comment.
Code Review
This pull request updates the Poland Census import configuration, adds validation configurations with golden data, and introduces a recon_lookup_api flag in the schema reconciler. The review feedback highlights that changing the default value of recon_lookup_api to False globally will break other imports, so it should remain True by default. Additionally, the reviewer advises against silently falling back to /tmp/source_files on permission errors in the download script, and notes that counters/.csv and golden_data/.csv should not be included in the source_files list in manifest.json.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…s, and error handling
…alse for statistics_poland
saanikaaa
left a comment
There was a problem hiding this comment.
Ran full Cloud Batch execution successfully on Dev (datcom-infosys-dev). - pls attach validation_output in PR description
abhishekjaisw
commented
Aug 7, 2026
@saanikaaa I have updated the PR description with the Cloud Batch GCS run link and the complete |
Description
This PR configures validation, golden verification sets, and output counters for the
statistics_polandstatvar import.Changes Included:
Manifest Configuration (
statvar_imports/statistics_poland/manifest.json):--output_counters=counters/StatisticsPoland_output_counters.csvto the processor script invocation.--existing_statvar_mcf=gs://unresolved_mcf/scripts/statvar/stat_vars.mcfto reuse existing resolved StatVars."counters/*.csv"and"golden_data/*.csv"tosource_filesso outputs and goldens are preserved and uploaded to GCS."stat_var_mcf": "StatisticsPoland_output_stat_vars.mcf"to provide definitions for new StatVars and avoid missing references."validation_config_file": "validation_config.json".invoke_import_validation,invoke_import_tool,invoke_differ_tool, and set"use_autopush_dc_api": falseinconfig_override.Golden Files & Validation Config:
statvar_imports/statistics_poland/validation_config.jsonwithGOLDENS_CHECKandDELETED_RECORDS_PERCENTrules (threshold: 0.1).golden_data/golden_summary_report.csvandgolden_data/golden_observations.csvfrom verified prod runs.Metadata & Script Updates:
recon_property,"variableMeasured,measurementMethod"inStatisticsPoland_metadata.csvto filter reconciliation to relevant variables and avoid excessive DC API queries on numeric observations.download_input_data.pyto address pandas groupby transpose compatibility and removed/tmpfallback on PermissionError.README.mddocumentation with new CLI flags.Testing:
Cloud Batch Dev Run: Successfully executed on Dev (
datcom-infosys-dev).GCS Output Directory: GCS Run 2026_08_07T05_12_44_959410_07_00
Validation Output (
validation_output.csv):check_deleted_records_percent{"deleted_records_count": 0, "previous_obs_count": 40392, "percent": 0.0, "threshold": 0.1}check_empty_import{"num_nodes": 42317, "num_rows": 42228}check_missing_refs_count{"missing_refs_count": 0}check_lint_error_count{"lint_error_count": 0}check_goldens_summary_report{"validate-goldens-sets": 1, "validate-goldens-inputs": 108, "validate-goldens-expected": 108, "validate-goldens-input-matched": 108, "validate-goldens-matched": 108}check_goldens_observations{"validate-goldens-sets": 1, "validate-goldens-inputs": 42228, "validate-goldens-expected": 17, "validate-goldens-input-matched": 42228, "validate-goldens-matched": 17}Differ Summary (
differ_summary.json):added_obs_count: 1,836(new data for 2025),deleted_obs_count: 0.added_schema_count: 24— all 24 StatVars (e.g.Count_Person_16To19Years,Count_Person_20To24Years_Female, etc.) already exist in the Data Commons Knowledge Graph. They are flagged as added only relative to the March baseline MCF files which previously lackedstat_var_mcf.Formatted and validated with
./run_tests.sh -l.