uranusjr opened a new pull request #22609: URL: https://github.com/apache/airflow/pull/22609
This adds the ability to pass a map index or multiple indexes to the function to explicitly ask for values from corresponding task instances. More importantly, if no map indexes are explicitly passed and one single task is requested, values returned by all task instances of a mapped task is "aggregated" automatically into an iterator, so a mapped task's downstream can do xcom_pull() on the task to retrieve all xcoms pushed by the task's expanded instances, achieving the "reduce" semantic. This is _almost_ working, except for some reason I can’t order the XComs by `map_index`. ```sql SELECT xcom.map_index AS xcom_map_index, xcom.value AS xcom_value FROM xcom JOIN dag_run ON xcom.dag_run_id = dag_run.id WHERE xcom."key" = ? AND xcom.task_id = ? AND xcom.dag_id = ? AND xcom.run_id = ? ORDER BY dag_run.execution_date DESC, xcom.timestamp DESC, xcom.map_index ASC ``` WHY DOES THIS NOT WORK. I keep getting map index 1 before 0… -- 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]
