Xcom In Airflow May 2026

No xcom_push or xcom_pull needed – the TaskFlow wiring handles it. With traditional operators, you must push/pull manually.

from airflow.decorators import dag, task from datetime import datetime @dag(start_date=datetime(2024,1,1), schedule=None, catchup=False) def xcom_demo(): xcom in airflow

process_record(get_latest_record_id()) @task def produce_data(): return "ids": [1,2,3], "source": "api" @task def consume_one(data): return f"Got data['ids'][0]" No xcom_push or xcom_pull needed – the TaskFlow

process(extract()) # XCom passed implicitly xcom in airflow