Skip to content

get_array_type_columns fails for index without records #38

@Alexander-N

Description

@Alexander-N

For an index (table) which contains no records the following code will break with IndexError which is not catched:

try:
_source = resp["hits"]["hits"][0]["_source"]
except KeyError as e:
raise exceptions.DataError(
f"Error inferring array type columns {self.url}: {e}"
)

This means that if there exists any empty index, then the IndexError will be thrown when calling

metadata.reflect(bind=engine)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions