Skip to content

Push uri as Xcom#10

Merged
corsettigyg merged 4 commits into
mainfrom
push-uri-xcom
Jan 20, 2026
Merged

Push uri as Xcom#10
corsettigyg merged 4 commits into
mainfrom
push-uri-xcom

Conversation

@corsettigyg
Copy link
Copy Markdown
Owner

This pull request introduces a new feature to optionally emit dataset URIs as XCom values in Cosmos, along with comprehensive documentation and tests. The feature is controlled by a new configuration setting and is designed to help users access dataset URIs in downstream Airflow tasks when needed.

The most important changes are:

Feature: Emit Dataset URIs as XCom

  • Added a new setting, enable_uri_xcom, to cosmos/settings.py to control whether dataset URIs are pushed to XCom after task execution.
  • Updated the _handle_datasets method in cosmos/operators/local.py to push outlet URIs to XCom with the key "uri" when enable_uri_xcom is enabled and outlets are present.

Documentation

  • Added a section to docs/configuration/scheduling.rst explaining the new enable_uri_xcom feature, how to enable it, and how to access the emitted URIs in downstream tasks.

Testing

  • Added multiple tests to tests/operators/test_local.py to verify that URIs are pushed to XCom only when the feature is enabled, and to check correct behavior for single, multiple, and missing outlets.

@corsettigyg corsettigyg merged commit b6392fc into main Jan 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant