Skip to content

CSCL log: ThinLION lookup misses and SAF invalid-B7SC / missing-name drops - #2817

Open
alexrichey wants to merge 1 commit into
mainfrom
ar-logcats
Open

alexrichey wants to merge 1 commit into
mainfrom
ar-logcats

Conversation

@alexrichey

Copy link
Copy Markdown
Contributor

The CSCL build log (log.csv) now covers three of the checks prod's ETL logs that we didn't. log__thinlion_lookup_not_found writes one row for each ThinLION lookup that finds nothing: CensusTract2020, CensusTract2010 or HealthArea. Each row uses prod's message ("Could not find a feature using query ''.") and puts the number of atomic polygons affected in record_count. Prod logs the same miss once per atomic polygon. log__saf_invalid_b7sc logs G/N/X CommonPlaces whose B7SC is shorter than 8 characters, which is prod's "[DATA ERROR]" check. log__saf_name_missing logs the G/N/X CommonPlaces SAF leaves out because no principal name matches their B7SC, which is prod's "[NAME MISSING]" check. SAF already drops both kinds of record, so no output changes. Prod's SAF "[NAME WARNING]" lines are deliberately not logged. The new models are documented in _log_files.yml.

I built them on the 26c DuckDB (dbt build of models/log_files plus int__saf_segments: 18 pass), and sqlfluff passes. On 26c the log has 3 ThinLION rows (HealthArea in boroughs 3/4/5, covering 27/18/33 atomic polygons; prod's thinlion_all has the same blank health areas), 4 invalid-B7SC rows and 2 missing-name rows. All 6 SAF records also appear in prod's 26c SAF log. Prod's log has 2 more ThinLION misses (CensusTract2010 BOROCT 3990100/5990100): the source BOROCT field reads 4990100 on both tracts. It also has 1 more invalid-B7SC record, which has a valid B7SC in our 26c source and the same single output row on both sides. Neither changes the output. Bead: inv-2cy.58.

…drops, as prod logs them

log__thinlion_lookup_not_found writes one row per distinct CensusTract2020/2010 or
HealthArea lookup that finds nothing, with the atomic polygon count; prod logs the same
message once per atomic polygon. log__saf_invalid_b7sc and log__saf_name_missing log the
G/N/X CommonPlaces SAF leaves out.
@alexrichey
alexrichey marked this pull request as ready for review October 23, 2026 14:51
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.

1 participant