randr97 commented on a change in pull request #9170:
URL: https://github.com/apache/airflow/pull/9170#discussion_r441023949
##########
File path: airflow/api_connexion/endpoints/xcom_endpoint.py
##########
@@ -26,18 +32,35 @@ def delete_xcom_entry():
raise NotImplementedError("Not implemented yet.")
-def get_xcom_entries():
+@provide_session
+def get_xcom_entries(dag_id, dag_run_id, task_id, session):
"""
Get all XCom values
"""
- raise NotImplementedError("Not implemented yet.")
+ query = session.query(XCom)
+ query = query.filter(and_(XCom.dag_id == dag_id,
+ XCom.task_id == task_id))
+ query = query.join(DR, and_(XCom.dag_id == DR.dag_id, XCom.execution_date
== DR.execution_date))
+ query = query.filter(DR.run_id == dag_run_id)
+ return
xcom_collection_schema.dump(XComCollection(xcom_entries=query.all(),
total_entries=query.count()))
Review comment:
Then there should be some order-by if I'm not wrong @mik-laj . Can we
look at this - https://github.com/wizeline/sqlalchemy-pagination
What is ur take on this?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]