You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/12/03 09:37:26 UTC

[GitHub] [airflow] turbaszek commented on a change in pull request #12768: Add extended information about XCom backends in docs

turbaszek commented on a change in pull request #12768:
URL: https://github.com/apache/airflow/pull/12768#discussion_r535011924



##########
File path: docs/apache-airflow/concepts.rst
##########
@@ -770,35 +770,131 @@ passed, then a corresponding list of XCom values is returned.
     def pull_function(task_instance):
         value = task_instance.xcom_pull(task_ids='pushing_task')
 
-When specifying arguments that are part of the context, they will be
-automatically passed to the function.
-
 It is also possible to pull XCom directly in a template, here's an example
 of what this may look like:
 
-.. code-block:: jinja
+.. code-block:: python
+
+    "SELECT * FROM {{ task_instance.xcom_pull(task_ids='foo_task', key='table_name') }}"
+
+This can also be done using the ``output`` attribute of an operator. The above example can be then
+simplified:
+
+.. code-block:: python
+
+    f"SELECT * FROM { foo_task.output['table_name'] }"

Review comment:
       Yes, we should. I was to tired to write more about XComArgs




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org