@task def process_record(record_id: int): print(f"Processing record record_id")
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 . xcom in airflow
For your reference, here is the technical breakdown of the concepts covered in the story: Airflow is still using XComs
"Look," Mara beamed. "No context['ti'] . No pulling. You just call the function like a normal variable. Under the hood, Airflow is still using XComs, but it’s abstracted away. It looks like standard Python, but it acts like a distributed workflow." catchup=False) def xcom_demo():
@dag(start_date=datetime(2024,1,1), schedule=None, catchup=False) def xcom_demo():