airflow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAirflow
Airflow
Apache Airflow is the standard for data engineering pipelines. v3.0 (2025) introduces Event-driven Triggers and a modern React UI.
Apache Airflow 是数据工程管道的行业标准。2025年发布的v3.0版本引入了事件驱动触发器和现代化的React UI。
When to Use
适用场景
- ETL/ELT: Scheduling nightly data warehouse loads.
- ML Ops: Retraining models when new data arrives.
- Dependency Management: "Run Task B only if Task A succeeds".
- ETL/ELT:调度夜间数据仓库加载任务。
- ML Ops:当有新数据到达时重新训练模型。
- 依赖管理:"仅在任务A成功后才运行任务B"。
Core Concepts
核心概念
DAGs (Directed Acyclic Graphs)
DAGs(有向无环图)
Defined in Python.
通过Python定义。
Task SDK
Task SDK
New in v3.0. Allows writing tasks in any language, not just Python.
v3.0版本新增功能。支持使用任意语言编写任务,而不仅限于Python。
Edge Executor
Edge Executor
Run tasks on remote edge devices.
在远程边缘设备上运行任务。
Best Practices (2025)
2025年最佳实践
Do:
- Use the TaskFlow API: decorators are cleaner than
@task.PythonOperator - Use Datasets: Define data-aware scheduling ().
schedule=[Dataset("s3://bucket/file")]
Don't:
- Don't put top-level code in DAG files: It runs every scheduler heartbeat.
建议:
- 使用TaskFlow API:装饰器比
@task更简洁。PythonOperator - 使用Datasets:定义数据感知调度()。
schedule=[Dataset("s3://bucket/file")]
禁忌:
- 不要在DAG文件中编写顶层代码:调度器每次心跳时都会执行这些代码。