@task def load(transformed: dict): print(f"Saving: transformed['result']") # no need to pull — Airflow passes XCom automatically
Last updated: 2025 Applies to Apache Airflow 2.0+ airflow xcom exclusive
with DAG('exclusive_xcom_demo', start_date=datetime(2023,1,1), schedule=None) as dag: t1 = PythonOperator(task_id='extract', python_callable=extract) t2 = PythonOperator(task_id='transform', python_callable=transform) t3 = PythonOperator(task_id='load', python_callable=load) schedule=None) as dag: t1 = PythonOperator(task_id='extract'
Use ShortCircuitOperator with exclusive mode to stop downstream tasks if a certain key’s value doesn’t meet a threshold: airflow xcom exclusive
(---- Related search suggestions provided)
The metadata DB stores only small JSON pointers; actual data lives in S3 with an automatic 24-hour TTL. Debugging becomes linear: each task’s inputs are fully determined by its explicit upstream keys.
Master Airflow XCom: From Basics to Advanced Custom Backends