Package org.apache.airflow.sdk
Interface Task
-
- All Implemented Interfaces:
public interface TaskA single unit of work executed by Airflow.
Prefer using the Builder.Task annotation with Builder.Dag to have the annotation processor generate an implementation for you. Only use this interface if you need to do low-level plumbing.
Implement this interface to define task logic. Airflow instantiates the class via its no-argument constructor, then calls execute once per task-instance run.
-
-
Method Summary
-
-
Method Detail
-
execute
abstract Unit execute(Context context, Client client)
Executes this task.
Any exception thrown marks the task instance as failed. Use client to read connections, variables, pull XComs, or to push an XCom for downstream tasks.
- Parameters:
context- Runtime context for the current execution workload.client- Client for Airflow API calls scoped to this exxecution.
-
-
-
-