Skip to main content
GuideServerConfigure and deploy Tabsdata servers on your machine.TutorialsConfigure data integration workflows within a running Tabsdata server.Advanced TutorialsBuild end-to-end workflows between two specific systems.API ReferenceCLI ReferenceRelease Notes
Version: 2.0.0

tabsdatak.api

AllTablesTriggerFire when any upstream table the function reads from produces a new batch.
BasicDictSpec
BasicTypeSpec
CollTableNameSpec
CollTableNamesSpec
CollTableVersionsNameSpec
CollTableVersionsNamesSpec
ContextKeySpec
CronMaskSpec
CronTriggerFire on a cron schedule.
DestAbstract destination.
FlushIntervalSpec
OnTablesActionAbstract base for declarative table-side-effect actions.
OnTablesActionSpec
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.
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 when one of a named set of upstream tables produces a new batch.
transformerDecorate a function as a transformer (table-to-table, no external connection).
TransformerTriggerBySpec
TriggerAbstract base for the trigger family.
TrxCtxPer-trx context handed by the runtime to every decorated function and connector plugin.

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

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]

TransformerTriggerBySpec

type_alias
TransformerTriggerBySpec: Union[CronTrigger, TablesTrigger, AllTablesTrigger]

Resolved type:

CronTrigger | TablesTrigger | AllTablesTrigger

TrxCtx

class
class TrxCtx

Bases: ABC

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

A function receives it by declaring a trailing ctx: TrxCtx parameter (not allowed on @stream_publisher). Carries trx-level identifiers (exec_plan_id, trx_id, exec_plan_ts), a per-flow scratch store that survives across invocations (get_attr / set_attr), and a metadata sink (add_metadata).

property
exec_plan_idstr

Unique id of the running execution plan.

property
trx_idstr

Unique id of the current trx within the plan.

property
exec_plan_tsstr

ISO-8601 timestamp of when the plan started.

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

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

Parameters:

parameter

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

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

Connectors may reserve namespaces under this scratch 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)