Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

chain function with esri source fails #727

Open
andrewharvey opened this issue Jul 30, 2019 · 0 comments
Open

chain function with esri source fails #727

andrewharvey opened this issue Jul 30, 2019 · 0 comments

Comments

@andrewharvey
Copy link
Contributor

machine/openaddr/cache.py

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant