This repository was archived by the owner on May 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
This repository was archived by the owner on May 5, 2022. It is now read-only.
chain function with esri source fails #727
Copy link
Copy link
Open
Description
Lines 309 to 334 in 5ec8ff8
| def field_names_to_request(conform): | |
| ''' Return list of fieldnames to request based on conform, or None. | |
| ''' | |
| if not conform: | |
| return None | |
| fields = set() | |
| for k, v in conform.items(): | |
| if k in attrib_types: | |
| if isinstance(v, dict): | |
| # It's a function of some sort? | |
| if 'function' in v: | |
| if v['function'] in ('join', 'format'): | |
| fields |= set(v['fields']) | |
| else: | |
| fields.add(v.get('field')) | |
| elif isinstance(v, list): | |
| # It's a list of field names | |
| fields |= set(v) | |
| else: | |
| fields.add(v) | |
| if fields: | |
| return list(filter(None, sorted(fields))) | |
| else: | |
| return None |
Surfaced in https://s3.amazonaws.com/data.openaddresses.io/runs/664080/output.txt from openaddresses/openaddresses#4599
the above function fails for an ESRI source when using a chain function.
Metadata
Metadata
Assignees
Labels
No labels