uranusjr commented on a change in pull request #17749: URL: https://github.com/apache/airflow/pull/17749#discussion_r693308881
########## File path: airflow/example_dags/example_xcom.py ########## @@ -81,3 +90,28 @@ def puller(**kwargs): ) pull << [push1, push2] + + bash_push = BashOperator( + task_id='bash_push', + bash_command='echo "bash_push demo" && ' + 'echo "Manually set xcom value ' + '{{ti.xcom_push(key="manually_pushed_value", value="manually_pushed_value") }}" && ' + 'echo "value_by_return"', + ) + bash_pull = BashOperator( + task_id='bash_pull', + bash_command='echo "bash pull demo" && ' + 'echo "The xcom pushed manually is ' + '"{{ ti.xcom_pull(task_ids="bash_push",key="manually_pushed_value") }}" && ' + 'echo "The returned_value xcom is ' + '"{{ ti.xcom_pull(task_ids="bash_push",key="return_value") }}" && ' + 'echo "finished"', + do_xcom_push=False, + ) Review comment: ```suggestion bash_pull = BashOperator( task_id='bash_pull', bash_command='echo "bash pull demo" && ' 'echo "The xcom pushed manually is ' '"{{ ti.xcom_pull(task_ids="bash_push", key="manually_pushed_value") }}" && ' 'echo "The returned_value xcom is ' '"{{ ti.xcom_pull(task_ids="bash_push", key="return_value") }}" && ' 'echo "finished"', do_xcom_push=False, ) ``` -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org