transformer
def transformer(
input_tables: CollTableVersionsNamesSpec,
output_tables: TableNamesSpec,
trigger_by: TransformerTriggerBySpec | None = None,
on_tables: OnTablesActionSpec | None = None,
) -> Callable
Categories: functions
Decorate a function as a transformer (table-to-table, no external connection).
Reads input_tables and emits output_tables. The function
takes one parameter per input table (TableFrameSpec or
TableFramesSpec) plus an optional trailing ctx: TrxCtx,
and returns one TableFrame per output table. Any input slot may
be None when the upstream table produced no batch.
Parameters
input_tablesCollTableVersionsNamesSpec (list[str])Non-empty list of [collection/]table[@versions]
references to read (collection/ may be omitted for a
same-collection table; @versions selects a version, a
v..v range, a comma-separated list, or NEW).
output_tablesTableNamesSpec (list[str])Non-empty list of local table names to emit, one
per return slot (valid table names, see publisher).
trigger_byTransformerTriggerBySpec | None (CronTrigger | TablesTrigger | AllTablesTrigger | None)Optional CronTrigger / TablesTrigger /
AllTablesTrigger; if omitted the function fires only on
a manual run.
on_tablesOnTablesActionSpec | None (list[OnTablesAction] | None)Optional list of OnTablesAction side-effects.
Returns
The decorator that wraps the function as a transformer
Raises
ApiException— If the function signature does not match theinput_tables/output_tablescounts.