RNHTTR commented on code in PR #33296: URL: https://github.com/apache/airflow/pull/33296#discussion_r1291720444
########## docs/apache-airflow/core-concepts/taskflow.rst: ########## @@ -66,9 +66,16 @@ If you want to learn more about using TaskFlow, you should consult :doc:`the Tas Context ------- -When running your callable, Airflow will pass a set of keyword arguments that can be used in your function. This set of kwargs correspond exactly to the :ref:`context variables<templates:variables>` you can use in your Jinja templates. +When running a ``@task`` decorated Python function, Airflow can pass a set of keyword arguments to the function. +These keyword arguments correspond exactly to the :ref:`context variables<templates:variables>` that can be used in +Jinja templates. + +To access all of these context variables, pass ``**kwargs`` to the function's parameters and access them from the ``kwargs`` +dictionary (e.g. ``kwargs["task_instance"]``). Alternatively, you can add a specific keyword argument you would like to access. +For example, to access a task's ``task_instance`` object at runtime, you could do so as follows: + +.. include:: ../../shared/template-examples/taskflow.rst Review Comment: Agreed -- 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]
