airflow.providers.common.io.xcom.backend

Module Contents

Classes

XComObjectStorageBackend

XCom backend that stores data in an object store or database depending on the size of the data.

Attributes

T

SECTION

airflow.providers.common.io.xcom.backend.T[source]
airflow.providers.common.io.xcom.backend.SECTION = 'common.io'[source]
class airflow.providers.common.io.xcom.backend.XComObjectStorageBackend(name, doc)[source]

Bases: airflow.models.xcom.BaseXCom

XCom backend that stores data in an object store or database depending on the size of the data.

If the value is larger than the configured threshold, it will be stored in an object store. Otherwise, it will be stored in the database. If it is stored in an object store, the path to the object in the store will be returned and saved in the database (by BaseXCom). Otherwise, the value itself will be returned and thus saved in the database.

static serialize_value(value, *, key=None, task_id=None, dag_id=None, run_id=None, map_index=None)[source]

Serialize XCom value to str or pickled object.

static deserialize_value(result)[source]

Deserializes the value from the database or object storage.

Compression is inferred from the file extension.

static purge(xcom, session)[source]

Purge an XCom entry from underlying storage implementations.

Was this entry helpful?