Open AlefRP opened 12 hours ago
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst) Here are some useful points:
docs/
directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.Given that we plan to move decorators to standard provider https://github.com/apache/airflow/pull/44027 it's best to add new decorators to the standard provider directly rather than to the old path
Add EmptyOperator with @task.empty decorator
Objective
This PR introduces a new operator called
EmptyOperator
with support for the@task.empty
decorator. This operator serves as a placeholder for tasks in DAGs that do not have any execution logic but are useful for defining the structure of the workflow.Key Changes
airflow/decorators/empty.py
with the implementation ofEmptyOperator
and the@task.empty
decorator.airflow/decorators/__init__.pyi
to expose the newempty
decorator.args/kwargs
and log custom messages when executing tasks decorated with@task.empty
.Example Usage