liveBook · Manning

EdgeExecutor

As explained in Data Pipelines with Apache Airflow, Second Edition

EdgeExecutor is an Airflow executor that assigns tasks to workers running outside the Airflow instance environment.

Suppose Airflow runs in the cloud, but a DAG task must run on premises. EdgeExecutor lets a worker run outside the environment hosting the other Airflow components, so that task can run where it needs to. section 15.2.2 section 15.2.3

The remote executor needs the Airflow API server URL and an API token to communicate with it. EdgeExecutor is distributed, but its fit is location-specific: CeleryExecutor and KubernetesExecutor are alternatives when the main goal is scaling tasks across machines. section 15.2.2

Select EdgeExecutor for a task

A task can name EdgeExecutor explicitly: hello = BashOperator( task_id="hello", bash_command="echo 'hello'", executor='airflow.providers.edge3.executors.EdgeExecutor' ) This leaves room for another task in the DAG to use a different executor. section 15.2.3 section 15.10

For an installation, check these points:

  • Install the Edge provider with `pip install apache-airflow-providers-edge3`; Airflow also exposes `AIRFLOW__CORE__EXECUTOR` for selecting an executor. section 15.2.3
  • Run a DAG to validate executor pickup: a task reaching `running` has passed through scheduling and queuing. section 15.2.3
  • Allow for experimental status, logging limitations, and untested performance when assessing production use. section 15.10 section 15.2.2
Figure 15.6 With the EdgeExecutor, the worker runs in a separate environment, outside the environment in which Airflow runs.
A black screen with orange squares

AI-generated content may be incorrect.

The diagram locates the EdgeExecutor worker outside Airflow’s main environment—the distinction that makes it useful for location-specific tasks. section 15.2.3

How Data Pipelines with Apache Airflow, Second Edition covers it

How deep it goes
Shows task-level executor selection, installation, and validation, but does not establish production performance.
Examples
Uses an on-premises worker with cloud-hosted Airflow and a BashOperator task that selects EdgeExecutor.
What it assumes
Assumes familiarity with DAG tasks and Airflow components; identifies the API URL and token required for remote communication.
What you can do after
Apply it via Airflow configuration to select EdgeExecutor for a task and verify that an executor picks up a DAG task.
How it connects
Relates EdgeExecutor to DAG tasks, the Airflow API server, LocalExecutor, CeleryExecutor, and KubernetesExecutor.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Pipelines with Apache Airflow, Second Edition. The section links point to the parts of the book it draws on.