stream_publisher
def stream_publisher(
source: StreamSrc,
flush_interval_mins: FlushIntervalSpec,
output_tables: TableNamesSpec,
on_tables: OnTablesActionSpec | None = None,
) -> Callable
Categories: functions
Decorate a function as a stream publisher.
Consumes a long-lived change stream (CDC, log/queue tail). The
function takes one TableFramesSpec parameter per source slot
(always array mode) and returns one TableFrame per output
table. Unlike the other decorators it must not declare a
ctx parameter -- it runs inside the runtime's stream loop, not
per-trx, so no TrxCtx exists at the call boundary.
Parameters
flush_interval_minsFlushIntervalSpec (int)Fallback rollover window in whole minutes (at least 1); the runtime closes the current batch every N minutes if the source's own threshold has not fired.
output_tablesTableNamesSpec (list[str])Non-empty list of local table names to emit, one
per return slot (valid table names, see publisher).
on_tablesOnTablesActionSpec | None (list[OnTablesAction] | None)Optional list of OnTablesAction side-effects.
Returns
The decorator that wraps the function as a stream-publisher
Raises
ApiException— If the function signature is invalid (e.g. it declares actxparameter).