lets us define workflows as DAGs: directed acyclic graphs. A DAG says: • What tasks exist. • What order they run in. • When they are scheduled. • What happens on failure. • How to retry, backfill, observe, and operate them. Airflow tasks are arranged into DAGs with upstream and downstream dependencies; a task is the basic unit of execution. https://airflow.apache.org/docs/apa che-airflow/stable/index.html
tasks to pass small pieces of data to each other. Tasks are isolated, so XCom is mainly for sharing metadata like IDs, paths, counts, flags, or status. Many TaskFlow / operator return values are automatically stored as XComs under the default key return_value. XCom is not for large data such as files, logs, big JSON, or dataframes, because the default backend stores it in the Airflow metadata database. Takeaway: Use XCom for lightweight task coordination, not as a data transport layer.
TaskFlow Good for Python-native logic: Operators Good for predefined external actions: Use TaskFlow when the task is naturally Python code. Use operators when the task is really “ask another system to do something.”