Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update xcom docs #46284

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

rawwar
Copy link
Collaborator

@rawwar rawwar commented Jan 30, 2025

minor rewrite of the sentence regarding pushing of multiple XComs

@rawwar rawwar requested a review from potiuk as a code owner January 30, 2025 12:30
@rawwar rawwar requested review from hussein-awala and potiuk and removed request for potiuk January 30, 2025 12:32
@rawwar
Copy link
Collaborator Author

rawwar commented Jan 30, 2025

When pushing multiple XCom values, we can still pull them using the 'return_value' key if we aren't explicitly pushing using a new key. So, we aren't exactly renaming anything here. Rather, we can now also pull using the keys within the returned XCom dictionary.

@rawwar rawwar requested a review from RNHTTR January 30, 2025 12:53
Copy link
Contributor

@RNHTTR RNHTTR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be helpful to add a code snippet here demonstrating what you mean. Just by reading this, I'd have no idea how to actually implement this.

It would also probably be helpful to add additional context as to why someone would want to push multiple xcoms

@@ -52,7 +52,7 @@ You can also use XComs in :ref:`templates <concepts:jinja-templating>`::

XComs are a relative of :doc:`variables`, with the main difference being that XComs are per-task-instance and designed for communication within a DAG run, while Variables are global and designed for overall configuration and value sharing.

If you want to push multiple XComs at once or rename the pushed XCom key, you can use set ``do_xcom_push`` and ``multiple_outputs`` arguments to ``True``, and then return a dictionary of values.
If you want to push multiple XComs at once you can set ``do_xcom_push`` and ``multiple_outputs`` arguments to ``True``, and then return a dictionary of values.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you want to push multiple XComs at once you can set ``do_xcom_push`` and ``multiple_outputs`` arguments to ``True``, and then return a dictionary of values.
If you want to push multiple XComs at once, you can set ``do_xcom_push`` and ``multiple_outputs`` arguments to ``True``. This will return a dictionary of values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants