TaskDef

class TaskDef(val id: String, val definition: Class<out Task>) : Endpoint

One task definition: its ID, the class that implements it, its upstream dependencies, and its task-level configuration.

Edges are drawn on the handles that DagDef.task returns, not here:

var dag = new DagDef("java_etl");
dag.addTask(new TaskDef("extract", Extract.class).config("retries", 2));

Parameters

id

Task identifier, unique within a DagDef.

definition

Class that implements Task. Must have a public no-arg constructor.

See also

Throws

if definition is an InputTask whose declared input cannot be bound, so that a mis-declared input fails while the Bundle is built rather than mid-run.

Constructors

Link copied to clipboard
constructor(id: String, definition: Class<out Task>)
constructor(id: String, trigger: TriggerDagRun)

Declares a task that starts a run of another Dag instead of running Java code.

Properties

Link copied to clipboard
Link copied to clipboard
val id: String

Functions

Link copied to clipboard
fun config(key: String, value: Any?): TaskDef

Sets one task-level configuration value.