Xcom In Airflow Jun 2026
One of the first surprises when learning Airflow is that tasks run from each other. You can’t just set task_2.data = task_1.data . So how do you pass a value from one task to another? XComs .
First, keep data small. Limit XCom usage to metadata, small configuration snippets, or unique identifiers. For large data transfers, use XCom to pass the path or URI of the data stored in an external system like Amazon S3, Google Cloud Storage, or a data warehouse. xcom in airflow
@dag(dag_id='modern_xcom_example', schedule=None, start_date=datetime(2023, 1, 1)) def my_dag(): One of the first surprises when learning Airflow