astro.custom_backend.astro_custom_backend
Module Contents
Classes
The Astro custom xcom backend is an xcom custom backend wrapper that handles serialization and deserialization |
- class astro.custom_backend.astro_custom_backend.AstroCustomXcomBackend(context=None)
Bases:
airflow.models.xcom.BaseXCom
The Astro custom xcom backend is an xcom custom backend wrapper that handles serialization and deserialization of command data types used in astro. The astro library overrides the
TaskInstance.XCom
object with this wrapper.Once the wrapper has properly serialized the objects, the json-safe dictionaries are then passed to the original XCom object. This ensures that custom backends still work and there are no breaking changes to airflow users.
- static serialize_value(value, **kwargs)
Serialize the return value of a taskinstance and then pass it to the XCom.serialize_value function. :param value: object to be serialized. :param kwargs: :return:
- Parameters:
value (Any) –
- Return type:
Any
- static deserialize_value(result)
Deserializing the result of a xcom_pull before passing th result to the next task. :param result: :return:
- Parameters:
result (airflow.models.xcom.XCom) –
- Return type:
Any