ephraimbuddy commented on issue #17686: URL: https://github.com/apache/airflow/issues/17686#issuecomment-932034793
I have thought about this and I think it's ok as it is just that we currently don't know how to use it. If we understand that calling a task decorated function in airflow produces an XComArg then it's not implicit that the relationship is set as is. From the PythonOperator code, you could see that xcoms were passed explicitly, but in the TaskFlow example, because we didn't know we could pass xcom explicitly as we did in the PythonOperator, we created extra tasks while setting up the dependencies. Anytime we call a task decorated function gives us an XComArg. It needs documentation especially in passing xcom as users think they can call the task decorated function many times and it remains the same task. Where possible, we should use `xcom_task2(xcom_task())` which creates the implicit relationship. However, we can pass **kwargs to a task function that has contexts that we can refer to and pull xcoms. -- 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]
