uranusjr opened a new pull request, #49054:
URL: https://github.com/apache/airflow/pull/49054
This essentially adds a shorthand for doing XCom with ti information in an
asset event. Instead of doing
event = context["inlet_events"][asset][-1]
XCom.get_one(
dag_id=event.source_dag_id,
task_id=event.source_task_id,
run_id=event.source_run_id,
map_index=event.source_map_index,
)
You can simply do
context["inlet_events"][asset][-1].source_task_instance.xcom_pull()
This was already possible in 2.x since the event is an SQLAlchemy model
object, and can access the source_task_instance relationship. A simple wrapper
has been added so we can do the same inside the task runner.
--
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]