You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Airflow 2.3.4 (but actual code seems to have same behaviour).
I have mapped task with xcom value.
I want to get xcom value of particular instance or xcom values of all task instances.
I am using standard REST API method /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key}
And it throws an error File "/home/airflow/.local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2850, in one_or_none return self._iter().one_or_none() File "/home/airflow/.local/lib/python3.9/site-packages/sqlalchemy/engine/result.py", line 1510, in one_or_none return self._only_one_row( File "/home/airflow/.local/lib/python3.9/site-packages/sqlalchemy/engine/result.py", line 614, in _only_one_row raise exc.MultipleResultsFound( sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when one or none was required
Is it any way of getting xcom of mapped tasks via API?
What you think should happen instead
No response
How to reproduce
Make dag with mapped task. Return xcom value in every task. Try to get xcom value via API.
The endpoint doesn't accept map_index. Would the fix be to allow map_index as query parameter defaulting to -1 for backwards compatibility through which users can get the relevant xcom? Another approach would be a new endpoint that has map_index in the url path but that wouldn't fix this issue though.
Apache Airflow version
Other Airflow 2 version (please specify below)
What happened
Airflow 2.3.4 (but actual code seems to have same behaviour).
I have mapped task with xcom value.
I want to get xcom value of particular instance or xcom values of all task instances.
I am using standard REST API method /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key}
And it throws an error
File "/home/airflow/.local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2850, in one_or_none return self._iter().one_or_none() File "/home/airflow/.local/lib/python3.9/site-packages/sqlalchemy/engine/result.py", line 1510, in one_or_none return self._only_one_row( File "/home/airflow/.local/lib/python3.9/site-packages/sqlalchemy/engine/result.py", line 614, in _only_one_row raise exc.MultipleResultsFound( sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when one or none was required
Is it any way of getting xcom of mapped tasks via API?
What you think should happen instead
No response
How to reproduce
Make dag with mapped task. Return xcom value in every task. Try to get xcom value via API.
Operating System
ubuntu 20.04
Versions of Apache Airflow Providers
No response
Deployment
Other
Deployment details
Standard
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: