Lakeflow Jobs versus Airflow for production data orchestration
Summary
- Lakeflow Jobs is workflow automation for Databricks. A job is made of tasks shown as a Directed Acyclic Graph, with triggers, parameters, notifications and Git settings.
- Apache Airflow is an open-source platform where workflows are defined entirely in Python as Dags. A scheduler and executors run them, and a metadata database stores their state.
- Choose Lakeflow Jobs when most tasks run on Databricks. Choose Airflow when workflows reach many systems, when you want workflows as Python code, or when Airflow is already in place.
- Both support dependencies, retries, schedules and event-based starts. Lakeflow Jobs has file arrival and table update triggers, and Airflow 3.0 added event-driven scheduling.
- They can work together: the Databricks provider for Airflow can run an existing Databricks job, and those runs appear in the Lakeflow Jobs UI.
Lakeflow Jobs versus Airflow for production data orchestration
Lakeflow Jobs and Apache Airflow both orchestrate multi-step data workflows, and they differ in scope and in how you define work. Lakeflow Jobs orchestrates tasks that run on Databricks, such as notebooks, Lakeflow Pipelines, SQL and dbt. Airflow orchestrates tasks across many systems through operators, with workflows written in Python.
What is Lakeflow Jobs?
Lakeflow Jobs provides orchestration for data processing workloads on Databricks. A job consists of one or more tasks, represented as a Directed Acyclic Graph, with dependencies, branching (if/else) and looping (for each). A trigger defines when a job runs: on a schedule, when source tables update, when new files arrive, continuously, or manually. You manage jobs through the UI, the Databricks CLI, Declarative Automation Bundles, the Databricks SDKs and the Jobs REST API.
What is Apache Airflow?
Apache Airflow is an open-source platform for developing, scheduling and monitoring workflows. A Dag defines tasks and the dependencies between them. A scheduler submits tasks to an executor, such as the Local, Celery or Kubernetes executors, and a metadata database stores the state of tasks and Dags. You can operate Airflow yourself or use a managed Airflow service.
Lakeflow Jobs vs Airflow: how they compare
| Aspect | Lakeflow Jobs | Apache Airflow |
|---|---|---|
| Defining workflows | UI, Declarative Automation Bundles, CLI, SDKs or the Jobs REST API | Python Dags, with dynamic Dag generation |
| Task types | Notebook, Pipeline, Python script, Python wheel, SQL, dbt, JAR, Run Job, If/else, For each | Operators and Python tasks, extended by provider packages |
| Control flow | Run if dependencies, If/else, For each, Run Job | Task dependencies, branching with @task.branch, dynamic task mapping |
| Triggers | Scheduled, table update, file arrival, continuous, manual | Time-based schedules, asset-aware scheduling, event-driven scheduling |
| Retries | Per-task retry policy; the default for most configurations is no retries | retries and retry_delay task parameters, plus optional retry policies |
| Where tasks run | On Databricks compute, including serverless | On workers through an executor |
| What you operate | Jobs are created and run in the Databricks workspace | A scheduler, Dag processor, API server and metadata database, or a managed Airflow service |
| Monitoring | Run history in the Jobs UI, notifications, system tables, lineage for Unity Catalog tables | Airflow UI with graph and grid views and task logs |
When does Lakeflow Jobs fit?
- Most of your tasks run on Databricks: notebooks, pipelines, SQL, dbt or Python.
- You want work to start when data arrives. A file arrival trigger starts a run when new files land in a Unity Catalog volume or external location, and a table update trigger starts a run when source tables change, without a continuously running cluster.
- You want repair runs. After a failure in a multi-task job, you can re-run only the unsuccessful tasks and their dependent tasks.
When does Airflow fit?
- Your workflows reach many systems. Airflow's docs list plug-and-play operators for Google Cloud, AWS, Azure and other third-party services.
- You want workflows as code. Airflow's docs list version control, team collaboration, testing and extensibility as benefits of defining workflows in Python.
- You already run Airflow, or you want an open-source project built by a global community.
Can you run both?
Yes. The open-source Databricks provider for Airflow includes DatabricksRunNowOperator, which triggers an existing Databricks job through the jobs/run-now API. Databricks recommends it over DatabricksSubmitRunOperator because it reduces duplication of job definitions, and its runs can be found in the Jobs UI. Runs submitted through the runs/submit endpoint are one-time runs that are not backed by a saved job. The Databricks integration requires Airflow 2.5.0 or later, and Databricks does not directly support the open-source Airflow packages.
FAQs
Can I migrate an Airflow Dag to Lakeflow Jobs?
It depends on what the tasks do. Tasks that run Databricks notebooks, pipelines, SQL, dbt or Python can be defined as job tasks with dependencies between them. Tasks that call other systems can stay in Airflow, which can start the Databricks part as one job run.
Does Lakeflow Jobs support branching and loops?
Yes. The If/else task runs part of a job DAG based on a boolean expression. The For each task loops another task over an input array that you specify or generate dynamically. The Run Job task triggers another job in the workspace.
How do retries and failure handling compare?
In Lakeflow Jobs you configure a retry policy per task, and for most configurations no retries happen by default. Job-level notifications are not sent when failed tasks are retried, so use task notifications. A repair run re-runs only the unsuccessful tasks and their dependents. In Airflow, you set retries and retry_delay on tasks, and you can rerun only failed tasks.
Can Airflow orchestrate Databricks jobs?
Yes. Use DatabricksRunNowOperator with the job ID of an existing job. The Databricks guide connects Airflow with a personal access token and notes that Databricks recommends OAuth tokens for automated tools, or tokens that belong to service principals if you use personal access tokens.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.