-
BashOperator: This operator allows you to execute a bash command or script as a task within your DAG.
-
PythonOperator: This operator enables you to run arbitrary Python functions as tasks within your DAG.
Besides these two, Airflow provides a wide range of operators to suit various needs. Some of the other commonly used operators include:
-
BranchPythonOperator: This operator allows you to execute different tasks in your DAG based on the result of a Python function.
-
DummyOperator: This operator is a simple no-op operator that can be used as a placeholder or to mark points in your DAG.
-
PythonVirtualenvOperator: Similar to the
PythonOperator
, but it executes within a virtual environment. -
SubDagOperator: This operator allows you to include a DAG as a task within another DAG, effectively creating a hierarchical structure.
-
EmailOperator: This operator sends an email as a task in your DAG.
-
HttpOperator: This operator enables you to make HTTP requests as tasks within your DAG.
-
PostgresOperator, MySqlOperator, SqliteOperator: These operators allow you to execute SQL commands or scripts against different databases.
-
Sensor operators: Airflow provides a variety of sensor operators (e.g.,
HttpSensor
,SqlSensor
,S3KeySensor
) to wait for certain conditions to be met before proceeding with the DAG.