# From Airflow to Flyte

A staged guide to migrating Airflow DAGs to Flyte 2.

The migration is split by operator family. Each section maps an Airflow construct to its Flyte 2 equivalent.

### [Part 1 — Vanilla Operators](https://www.union.ai/docs/v2/union/user-guide/migration/from-airflow/part-1-vanilla-operators/page.md)

PythonOperator, TaskFlow, BashOperator, KubernetesPodOperator, plus DAG schedules, the driver task model, and orchestration patterns (parallelism, conditionals, error handling).

> [!NOTE]
> **Part 2** (later) covers provider operators: Beam, Dataproc, BigQuery, Databricks, Spark, and sensors.

## Subpages

- [Part 1 — Vanilla Operators](https://www.union.ai/docs/v2/union/user-guide/migration/from-airflow/part-1-vanilla-operators/page.md)
  - 1. Where dependencies are specified
  - 2. The driver task (in place of DAGs)
  - 3. Triggers (in place of schedules)
  - 4. PythonOperator to `@env.task`
  - File and Dir — for data that doesn't fit in a return value
  - 5. TaskFlow to `@env.task`
  - TaskFlow decorator variants
  - 6. BashOperator to ContainerTask
  - When to use `ContainerTask`
  - How the arguments map
  - 7. KubernetesPodOperator to TaskEnvironment + PodTemplate
  - Where every KPO knob lands
  - What a fully-specified task looks like
  - 8. Orchestration: parallelism, conditionals, error handling
  - Parallelism
  - Dynamic mapping
  - Conditionals
  - Error handling
  - What's next
  - Caching
  - Reusable containers
  - Reports
  - Apps

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/user-guide/migration/from-airflow/_index.md
**HTML**: https://www.union.ai/docs/v2/union/user-guide/migration/from-airflow/
