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

tabsdatak.api

AllTablesTriggerFire on a new version of any table the function reads, other than the ones it writes.
BasicDictSpec
BasicTypeSpec
BatchBytesSpec
BatchRowsSpec
BatchSecondsSpec
BatchThresholdsHow a stream publisher's batches are bounded in time and size.
BufferThresholdsHow a stream publisher's in-memory buffer is bounded before it is written to a file: max_rows rows, max_bytes bytes (None for no byte limit) or max_secs since the last write.
CollTableNameSpec
CollTableNamesSpec
CollTableVersionsNameSpec
CollTableVersionsNamesSpec
ContextKeySpec
CronMaskSpec
CronTriggerFire on a cron schedule.
DestAbstract destination.
FlowCtxFlow-level identifiers (project / collection / function) shared by every role that runs inside a trx -- plugins and user-decorated functions.
FlushIntervalSpec
FunctionCtxContext handed to a user-decorated function (@publisher / @transformer / @subscriber) that declares a trailing ctx parameter.
OnTablesActionAbstract base for declarative table-side-effect actions.
OnTablesActionSpec
PollThresholdsHow a stream publisher polls its source: max_secs is the budget of one ingestion iteration, idle_secs the wait before the next one when the iteration read nothing.
publisherDecorate a function as a batch publisher.
PublisherTriggerBySpec
SecretReference to a secret value, used for credential fields.
SrcAbstract batch source.
stream_publisherDecorate a function as a stream publisher.
StreamSrcAbstract stream source.
StreamThresholdsThe thresholds of a stream publisher's data flow, one substructure per level: batch (what a function run receives), buffer (the in-memory buffer written to files) and poll (the source polling).
StrOrSecretSpecA connector field that accepts either a plain string or a Secret.
subscriberDecorate a function as a subscriber (push tables to an external destination).
SubscriberTriggerBySpec
TableFrameSpec
TableFramesSpec
TableNameSpec
TableNamesSpec
TablesTriggerFire on a new version of any of the named tables.
TransactionCtxPer-trx context handed by the runtime to every decorated function and connector plugin.
transformerDecorate a function as a transformer (table-to-table, no external connection).
TransformerTriggerBySpec
TriggerAbstract base for the trigger family.

BasicDictSpec

type_alias
BasicDictSpec: dict[str, BasicTypeSpec]

Resolved type:

dict[str, str | int | float | bool]

BasicTypeSpec

type_alias
BasicTypeSpec: Union[str, int, float, bool]

Resolved type:

str | int | float | bool

BatchBytesSpec

type_alias
BatchBytesSpec: int

BatchRowsSpec

type_alias
BatchRowsSpec: int

BatchSecondsSpec

type_alias
BatchSecondsSpec: int

CollTableNameSpec

type_alias
CollTableNameSpec: str

CollTableNamesSpec

type_alias
CollTableNamesSpec: list[CollTableNameSpec]

Resolved type:

list[str]

CollTableVersionsNameSpec

type_alias
CollTableVersionsNameSpec: str

CollTableVersionsNamesSpec

type_alias
CollTableVersionsNamesSpec: list[CollTableVersionsNameSpec]

Resolved type:

list[str]

ContextKeySpec

type_alias
ContextKeySpec: str

CronMaskSpec

type_alias
CronMaskSpec: str

FlushIntervalSpec

type_alias
FlushIntervalSpec: int

OnTablesAction

class
class OnTablesAction

Bases: ABC, JsonSerde

Abstract base for declarative table-side-effect actions.

An action fires alongside a function's normal output (e.g. publish a notification, write an audit row) and only when the function's primary output succeeds. Passed via the on_tables argument of @publisher / @stream_publisher / @transformer.


OnTablesActionSpec

type_alias
OnTablesActionSpec: list[OnTablesAction]

PublisherTriggerBySpec

type_alias
PublisherTriggerBySpec: Union[CronTrigger, TablesTrigger]

Resolved type:

CronTrigger | TablesTrigger

SubscriberTriggerBySpec

type_alias
SubscriberTriggerBySpec: Union[CronTrigger, TablesTrigger, AllTablesTrigger]

Resolved type:

CronTrigger | TablesTrigger | AllTablesTrigger

TableFrameSpec

type_alias
TableFrameSpec: TableFrame | None

TableFramesSpec

type_alias
TableFramesSpec: list[TableFrame | None] | None

TableNameSpec

type_alias
TableNameSpec: str

TableNamesSpec

type_alias
TableNamesSpec: list[TableNameSpec]

Resolved type:

list[str]

TransactionCtx

class
class TransactionCtx

Bases: TransactionCtxLegacy, ABC

Per-trx context handed by the runtime to every decorated function and connector plugin.

A function receives it by declaring a trailing ctx: TransactionCtx parameter (not allowed on @stream_publisher). Carries the identifiers of the execution, transaction and function run it belongs to (named as the server API names them), a per-flow attribute store that survives across invocations (get_attr / set_attr), and a metadata sink (add_metadata).

property
execution_idstr

Unique id of the execution the run belongs to.

property
executionstr | None

Execution name, or None when the execution has none.

property
transaction_idstr

Unique id of the transaction the run belongs to.

property
logical_function_run_idstr

Unique id of the function run, the same across its retries.

property
physical_function_run_idstr

Unique id of this attempt of the function run; each retry gets a new one.

property
triggered_ondatetime

When the function run was triggered, as a timezone-aware UTC datetime.

method
get_attr
def get_attr(attr: ContextKeySpec) -> BasicTypeSpec | None

Read a per-flow attribute (returns None if unset).

Parameters:

parameter

method
set_attr
def set_attr(attr: ContextKeySpec, val: BasicTypeSpec | None)

Write a per-flow attribute -- persists across trx invocations within the same flow.

Connectors may reserve namespaces under this attribute store for their own internal bookkeeping (file-lastmod.* is the only one today). Writing to such names from user code can corrupt connector state -- pick names that don't collide with these prefixes.

Parameters:

parameter

parameter
valBasicTypeSpec | None (str | int | float | bool | None)

method
add_metadata
def add_metadata(attr: ContextKeySpec, val: BasicTypeSpec | None)

Attach trx-level metadata for observability / lineage. Not durable across trx invocations.

Parameters:

parameter

parameter
valBasicTypeSpec | None (str | int | float | bool | None)

TransformerTriggerBySpec

type_alias
TransformerTriggerBySpec: Union[CronTrigger, TablesTrigger, AllTablesTrigger]

Resolved type:

CronTrigger | TablesTrigger | AllTablesTrigger