Repository navigation
Request first_non_empty fields when fetching Esri layers - #117
Merged
iandees merged 2 commits intoOct 6, 2026
Merged
Conversation
fields_from_conform_function only treated join and format as
multi-field functions, so first_non_empty fell through to
v.get('field') and contributed None. Esri downloads then omitted the
listed fields and conform failed with a KeyError.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 6, 2026
Merged
Member
|
This is deployed. |
jeffdefacto
added a commit
to openaddresses/openaddresses
that referenced
this pull request
Oct 13, 2026
About 800 rows in each layer have a blank TOWN_VIL_1. Use first_non_empty to fall back to PO_NAME. This was left out of #9973 because batch-machine didn't request first_non_empty fields for ESRI sources; fixed in openaddresses/batch-machine#117 (10.5.0). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
For ESRI sources,
EsriRestDownloadTask.fields_from_conform_functiondecides which fields go intooutFields. Onlyjoinandformatare treated as functions that take a list offields. Every other function falls through tov.get('field').first_non_emptyalso uses afieldslist, so it addsNone, and none of its fields are downloaded.Conform then fails in
row_fxn_first_non_empty:This turned up in openaddresses/openaddresses#9973 (run https://batch.openaddresses.io/run/16806). Two ESRI sources using
first_non_emptyforcityfailed. Two sibling sources with a plaincitymapping passed. That PR now uses a plain mapping as a workaround.Change
first_non_emptyto the multi-field branch infields_from_conform_function.first_non_emptycase totest_field_names_to_request.Testing
python -m unittest openaddr.tests.cache: all pass.🤖 Generated with Claude Code