TaskRef
interface TaskRef<TReturn = unknown> extends Node {
dagId: string;
taskId: string;
after(...upstream: readonly Node[]): TaskRef<TReturn>;
before(...downstream: readonly Node[]): TaskRef<TReturn>;
}Source: dag.ts:172
Type Parameters
TReturn=unknown
Hierarchy
NodeTaskRef
Properties
dagId: string
Overrides dagId
Identifier of the Dag this task belongs to.
taskId: string
Airflow task ID, including any TaskGroup prefix.
Methods
after(...upstream: readonly Node[]): TaskRef<TReturn>
Overrides after
Run this task after each of upstream, carrying no value — Python's <<.
cleaned.after(loaded, transformed); // [load, transform] >> cleanupFan-in that carries data is the wiring object instead (summarize({ north: extractNorth(), south: extractSouth() })), so each direction has an answer: named keys when values flow, after when only order does.
Parameters
upstream(readonly Node[])
Returns
TaskRef<TReturn>
before(...downstream: readonly Node[]): TaskRef<TReturn>
Overrides before
Run this task before each of downstream, carrying no value — the TypeScript spelling of Python's >>.
loaded.before(cleaned, notified); // loaded >> [cleanup, notify]Variadic, so one call fans out, and it returns its own receiver rather than its arguments: a fan-out has no single "next" reference to hand back. Declaring an edge that already exists changes nothing.
Parameters
downstream(readonly Node[])
Returns
TaskRef<TReturn>