Skip to content

Conversation

@Ariel2400
Copy link
Owner

Due to changes introduced in apache#36205, we experienced breakage in our SQLExecuteQueryOperator. In short, our assumption was that the handler is able to also transform the data type returned from the query. For example our handler looked something like this:

def custom_handler(cursor):
    results = fetch_all_handler(cursor)
    columns = [column[0] for column in cursor.description]
     result_dicts = [dict(zip(columns, record)) for record in results]
     return [SomeDataclass(col_a=d[“COL_A”]

As that was changed, that led to errors in our dags. We now moved to use the _process_output method as we should’ve done in the first place, but we this type hint will prevent further confusion as to what are the constraints of the handler passed to the operator.

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.

3 participants