Ariel2400 opened a new pull request, #42275:
URL: https://github.com/apache/airflow/pull/42275

   Due to changes introduced in https://github.com/apache/airflow/pull/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:
   ```python
   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. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to