task
Creates a task, registers it, and hands back its handle, ready to carry configuration and to wire edges with Deps.Flow.before.
var extract = dag.task("extract", Extract.class).config("retries", 2);
var load = dag.task("load", Load.class);
extract.before(load);Content copied to clipboard
Return
The handle representing this task.
Parameters
id
Task identifier, unique within this Dag.
definition
Class that implements Task. Must have a public no-arg constructor.
Throws
if a task with the same ID is already registered.
Declares a task that starts a run of another Dag.
dag.task("trigger_downstream", new TriggerDagRun("downstream_etl"));Content copied to clipboard
The task runs no Java code and takes no arguments, so it has no ID to derive and names one here.
Return
The handle representing this task.
Parameters
id
Task identifier, unique within this Dag.
trigger
What to trigger, and how.
Throws
if a task with the same ID is already registered.