import(stage1): validate YRBS 2021 and 2023 layouts

This commit is contained in:
Jinotech
2026-09-20 09:04:42 +12:00
parent 64e05f42d0
commit a6df01da7e
13 changed files with 488 additions and 85 deletions
+60 -2
View File
@@ -2,6 +2,35 @@
Command failures and integration errors.
---
## [ERR-20260920-026] sas-input-block-comment-collision
**Logged**: 2026-09-20
**Priority**: low
**Status**: resolved
**Area**: data
### Summary
The first YRBS fixed-width layout parser matched the words “Input Program” in the SAS header comment instead of the executable `Input` statement.
### Error
`ValueError: No fields parsed` for the official 2021 SAS input program.
### Context
The broad first-occurrence regular expression selected a comment fragment. No Parquet or audit output was written.
### Suggested Fix
Anchor the parser to a line containing only the SAS `Input` keyword, then parse the following field declarations.
### Metadata
- Reproducible: yes
- Related Files: `research/stage1/import_yrbs_2021_2023.py`
- Pattern-Key: parser.comment-keyword-collision
### Resolution
- **Resolved**: 2026-09-20
- **Notes**: The input-block expression is line-anchored and the import is rerun from the official files.
---
## [ERR-20260920-036] pdf-text-console-encoding
@@ -1055,7 +1084,7 @@ Remove the override and tolerate the harmless warning, or use an actual readable
- **Notes**: The override is removed; no index changes occurred in the failed attempt.
---
## [ERR-20260920-024] parquet-field-name-assumption
## [ERR-20260920-037] parquet-field-name-assumption
**Logged**: 2026-09-20
**Priority**: low
@@ -1084,7 +1113,7 @@ Inspect the authoritative schema before column projection and use the source-spe
- **Notes**: Re-ran the count query against `YEAR` and obtained annual distributions for `YUSUITHK` and `YUSUIPLN`.
---
## [ERR-20260920-025] yrbs-attempt-response-shape
## [ERR-20260920-038] yrbs-attempt-response-shape
**Logged**: 2026-09-20
**Priority**: medium
@@ -1113,3 +1142,32 @@ Apply the shared five-level frequency mapping to both GSHS and YRBS attempt item
- **Notes**: Canonical attempt categories are now `zero`, `one`, `two_or_three`, `four_or_five`, and `six_or_more` in both surveys.
---
## [ERR-20260920-039] sas-input-parser-edge-cases
**Logged**: 2026-09-20
**Priority**: low
**Status**: resolved
**Area**: data
### Summary
The first two YRBS fixed-width parser attempts encountered a SAS header-comment keyword collision and the SAS numeric missing token `.`.
### Error
The first attempt found no layout fields; the second could not convert `.` to a float.
### Context
Both failures occurred before a complete Parquet/audit output was accepted.
### Suggested Fix
Anchor the layout parser to a line containing only `Input` and map the SAS numeric missing token `.` to null.
### Metadata
- Reproducible: yes
- Related Files: `research/stage1/import_yrbs_2021_2023.py`
- Pattern-Key: parser.sas-fixed-width-edge-cases
### Resolution
- **Resolved**: 2026-09-20
- **Notes**: Both cases are handled explicitly and the official-layout import is rerun from source.
---