This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 113bfdf Document overriding ``XCom.clear`` for data lifecycle
management (#17589)
113bfdf is described below
commit 113bfdff6161b357b7b1e1d442f4f2b2bd1c6940
Author: Kaxil Naik <[email protected]>
AuthorDate: Fri Aug 13 00:36:46 2021 +0100
Document overriding ``XCom.clear`` for data lifecycle management (#17589)
This was added in https://github.com/apache/airflow/pull/17405 but was not
documented
---
docs/apache-airflow/concepts/xcoms.rst | 2 ++
1 file changed, 2 insertions(+)
diff --git a/docs/apache-airflow/concepts/xcoms.rst
b/docs/apache-airflow/concepts/xcoms.rst
index 9bd20db..315c872 100644
--- a/docs/apache-airflow/concepts/xcoms.rst
+++ b/docs/apache-airflow/concepts/xcoms.rst
@@ -47,3 +47,5 @@ The XCom system has interchangeable backends, and you can set
which backend is b
If you want to implement your own backend, you should subclass
:class:`~airflow.models.xcom.BaseXCom`, and override the ``serialize_value``
and ``deserialize_value`` methods.
There is also an ``orm_deserialize_value`` method that is called whenever the
XCom objects are rendered for UI or reporting purposes; if you have large or
expensive-to-retrieve values in your XComs, you should override this method to
avoid calling that code (and instead return a lighter, incomplete
representation) so the UI remains responsive.
+
+You can also override the ``clear`` method and use it when clearing results
for given dags and tasks. This allows the custom XCom backend process the data
lifecycle easier.