josh-fell commented on a change in pull request #16866:
URL: https://github.com/apache/airflow/pull/16866#discussion_r689944981
##########
File path: airflow/example_dags/example_xcom.py
##########
@@ -78,6 +104,14 @@ def puller(**kwargs):
pull = PythonOperator(
task_id='puller',
python_callable=puller,
+ op_kwargs={
+ 'pulled_value_1': push1.output['value from pusher 1'],
+ 'pulled_value_3': push2.output,
+ },
Review comment:
I do have #9415 assigned to me as well to update all of the example DAGs
to use the Taskflow API so eventually we'll be getting to a point where
`PythonOperator` and `PythonVirtualEnvOperator` (and perhaps `TaskGroup`
context manager if it makes sense in the example) are not used in the examples
or documentation.
Initially the thought was to tackle #10285 first (this PR and others to use
the `.output` property and refactoring the `default_args` pattern mainly) then
go back to tackle #9415 since I was already deep into updating 86 files
encompassing #10285.
Seems like it makes sense to remove the Taskflow API and
`get_current_context()` examples in `example_xcom.py` and then continue/revisit
this discussion in a later PR. WDYT?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]