Skip to main content
GuideServerConfigure and deploy Tabsdata servers on your machine.TutorialsConfigure data integration workflows within a running Tabsdata server.API ReferenceCLI ReferenceRelease Notes
Version: 2.1.0

transformer

function
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​

parameter

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

parameter
output_tablesTableNamesSpec (list[str])

Non-empty list of local table names to emit, one per return slot (valid table names, see publisher).

parameter

Optional CronTrigger / TablesTrigger / AllTablesTrigger; if omitted the function fires only on a manual run.

parameter
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 the input_tables / output_tables counts.