Skip to content

adding goldens for BLS imports#2090

Open
balit-raibot wants to merge 22 commits into
datacommonsorg:masterfrom
balit-raibot:adding_goldens_bls_imports
Open

adding goldens for BLS imports#2090
balit-raibot wants to merge 22 commits into
datacommonsorg:masterfrom
balit-raibot:adding_goldens_bls_imports

Conversation

@balit-raibot

@balit-raibot balit-raibot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

This PR adds golden data for BLS imports: BLS_CPI, BLS_CES_State, BLS_JOLTS, BLS_CPI_Category and US_CPI.

NOTE: BLS_CPI and BLS_JOLTS don't have observationAbout column in the observations output file.
The imports have only one observation about which is being used by .tmcf file.

@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 adds golden summary reports for the c_cpi_u and cpi_u datasets. The reviewer pointed out that the golden summary report for cpi_w is missing and should be added to ensure complete test coverage for all datasets defined in the manifest.

Comment thread scripts/us_bls/cpi/golden_data/golden_summary_report_cpi_u.csv Outdated
@niveditasing
niveditasing self-requested a review July 10, 2026 06:07
@balit-raibot balit-raibot changed the title adding goldens for BLS_CPI adding goldens for BLS imports Jul 10, 2026
@balit-raibot

Copy link
Copy Markdown
Contributor Author

@gemini-code-assist review

@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 validation configurations and golden summary reports for the US BLS CPI and CES State data imports, updating their manifests to reference the new validation files. The reviewer identified that the relative paths to the golden summary reports in both validation_config.json files are incorrect, pointing to non-existent directories by going up four levels instead of three. Correcting these paths is necessary to ensure the validation runner can locate the golden files.

Comment thread scripts/us_bls/cpi/validation_config.json
Comment thread scripts/us_bls/cpi/validation_config.json
Comment thread statvar_imports/us_bls/bls_ces_state/validation_config.json
@balit-raibot

Copy link
Copy Markdown
Contributor Author

@gemini-code-assist review

@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 adds validation configurations and golden summary reports for several US Bureau of Labor Statistics (BLS) datasets, including CPI, JOLTS, and CES State. Specifically, it introduces validation_config.json files to define validation rules (such as deleted records percentage thresholds and golden data checks) and updates the respective manifest.json files to reference them. It also adds the corresponding golden summary report CSV files. As there are no review comments, I have no feedback to provide.

@pulkeet-wq

Copy link
Copy Markdown
Contributor

LGTM

Comment thread scripts/us_bls/cpi/validation_config.json
Comment thread scripts/us_bls/jolts/validation_config.json
"input_files": "../../../../output/bls_ces_state.csv"
}
}
]

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.

Please also enable checks for MAX_DATE_LATEST and MAX_DATE_CONSISTENT so that deletions fr a few Svs for latest year can be caught as well.

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.

Pls also add SQL_VALIDATOR to check max date is previous month.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added these checks for BLS_CPI_Category as was discussed because of its threshold of 0.6%

@balit-raibot balit-raibot Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These checks were implemented and executed in test environment.

log: https://pantheon.corp.google.com/batch/jobsDetail/regions/us-central1/jobs/bls-cpi-category-balit-20260720-135441/logs?project=datcom-infosys-dev

Seems like we can not add any of these checks as explained below:

  • MAX_DATE_LATEST ==> This will make the import fail in the month of January and February every year (because till 21st February, the max_latest_date will give "year-1" instead of current year.
  • MAX_DATE_CONSISTENT ==> This will fail every time because while cpi_u and cpi_w have latest date as previous month, c_cpu_u has latest date as "previous month -1". Also we found 213 SVs whose max_latest_date is more than 2 months old (even back to 2019) (https://storage.mtls.cloud.google.com/datcom-import-test/statvar_imports/us_bls/cpi_category/BLS_CPI_Category/2026_07_20T06_58_01_530319_07_00/input0/validation/validation_output.csv)
  • SQL_VALIDATOR ==> This will make the import fail every execution before 21st of the month, as source updates data on 21st of every month.
    Also we tried to implement the logic that max_latest_date is either previous or previous-1 month but it also failed as 213 SVs have way too old max_dates (validation report attached above). We can manually exclude these SVs in the SQL query but doesn't seem a good practice.

@balit-raibot
balit-raibot requested a review from ajaits July 20, 2026 12:22
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