การสร้าง Data Pipeline ด้วย Airflow
Volker Janz
Senior Developer Advocate at Astronomer

xcom_push() และ xcom_pull() โดยตรง
@task จะกลายเป็น XComArg
@task def get_config(): return {"name": "daily_etl"} @task def run_pipeline(config): print(config["name"])config = get_config() # XComArgrun_pipeline(config) # dependency + data
get_timestamp = BashOperator( task_id="get_timestamp", bash_command="date +%Y-%m-%d") @task def log_timestamp(ts_value): print(f"Timestamp: {ts_value}")log_timestamp(get_timestamp.output)


AIRFLOW__COMMON_IO__XCOM_OBJECTSTORAGE_THRESHOLD: จัดเก็บ XCom ใน object storage เมื่อถึง threshold ที่กำหนดการสร้าง Data Pipeline ด้วย Airflow