dabla commented on code in PR #70223:
URL: https://github.com/apache/airflow/pull/70223#discussion_r3630134349
##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/xcoms.py:
##########
@@ -356,6 +358,38 @@ def get_xcom(
return XComResponse(key=key, value=(result[0] if isinstance(result, tuple)
else result).value)
[email protected](
+ "/{dag_id}/{run_id}/{task_id}/keys",
+ summary="Get multiple XCom values by keys",
+ description=(
+ "Fetch multiple XCom values by key list in a single database query. "
+ "Optimised for XComIterable iteration, reducing N round-trips to one."
+ ),
+)
+def get_xcom_by_keys(
+ dag_id: str,
+ run_id: str,
+ task_id: str,
+ request_body: XComKeysRequest,
+ session: SessionDep,
+ map_index: Annotated[int, Query()] = -1,
Review Comment:
It is not used for the slicing, but it can be used in combination with
batch, which means each IterableOperator will have it's own instance of
XComIterable and thus have a map_index associated with it.
--
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]