ferruzzi opened a new issue, #24880:
URL: https://github.com/apache/airflow/issues/24880

   ### Apache Airflow version
   
   2.3.2 (latest released)
   
   ### What happened
   
   If you have an Operator returning a dict value such as from an API call, and 
that dict contains datetime objects, XCOM will fail with the message "datetime 
object not serializable"
   
   For example, the SageMaker operators return a dict which includes the 
timestamp that the object was created, see 
https://github.com/apache/airflow/pull/23628
   
   ### What you think should happen instead
   
   The suggestion from @uranusjr was to use 'AirflowJsonEncoder' directly in 
XCom’s 'serialize' function.
   
   ### How to reproduce
   
   _No response_
   
   ### Operating System
   
   not relevant
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Other
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   I have this on my backlog to fix, but figure if I but it out there, someone 
else may get to it sooner.
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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