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

  • Node
  • TaskRef

Properties

dagId: string

readonly
dag.ts:174

Overrides dagId

Identifier of the Dag this task belongs to.

taskId: string

readonly
dag.ts:176

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 <<.

CODE
cleaned.after(loaded, transformed); // [load, transform] >> cleanup

Fan-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

before(...downstream: readonly Node[]): TaskRef<TReturn>

Overrides before

Run this task before each of downstream, carrying no value — the TypeScript spelling of Python's >>.

CODE
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