tabsdatak.api
AllTablesTrigger | Fire when any upstream table the function reads from produces a new batch. |
BasicDictSpec | |
BasicTypeSpec | |
CollTableNameSpec | |
CollTableNamesSpec | |
CollTableVersionsNameSpec | |
CollTableVersionsNamesSpec | |
ContextKeySpec | |
CronMaskSpec | |
CronTrigger | Fire on a cron schedule. |
Dest | Abstract destination. |
FlushIntervalSpec | |
OnTablesAction | Abstract base for declarative table-side-effect actions. |
OnTablesActionSpec | |
publisher | Decorate a function as a batch publisher. |
PublisherTriggerBySpec | |
Secret | Reference to a secret value, used for credential fields. |
Src | Abstract batch source. |
stream_publisher | Decorate a function as a stream publisher. |
StreamSrc | Abstract stream source. |
StrOrSecretSpec | A connector field that accepts either a plain string or a Secret. |
subscriber | Decorate a function as a subscriber (push tables to an external destination). |
SubscriberTriggerBySpec | |
TableFrameSpec | |
TableFramesSpec | |
TableNameSpec | |
TableNamesSpec | |
TablesTrigger | Fire when one of a named set of upstream tables produces a new batch. |
transformer | Decorate a function as a transformer (table-to-table, no external connection). |
TransformerTriggerBySpec | |
Trigger | Abstract base for the trigger family. |
TrxCtx | Per-trx context handed by the runtime to every decorated function and connector plugin. |
BasicDictSpec
type_aliasBasicDictSpec: dict[str, BasicTypeSpec]
Resolved type:
dict[str, str | int | float | bool]
BasicTypeSpec
type_aliasBasicTypeSpec: Union[str, int, float, bool]
Resolved type:
str | int | float | bool
CollTableNameSpec
type_aliasCollTableNameSpec: str
CollTableNamesSpec
type_aliasCollTableNamesSpec: list[CollTableNameSpec]
Resolved type:
list[str]
CollTableVersionsNameSpec
type_aliasCollTableVersionsNameSpec: str
CollTableVersionsNamesSpec
type_aliasCollTableVersionsNamesSpec: list[CollTableVersionsNameSpec]
Resolved type:
list[str]
ContextKeySpec
type_aliasContextKeySpec: str
CronMaskSpec
type_aliasCronMaskSpec: str
FlushIntervalSpec
type_aliasFlushIntervalSpec: int
OnTablesAction
classclass 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_aliasOnTablesActionSpec: list[OnTablesAction]
PublisherTriggerBySpec
type_aliasPublisherTriggerBySpec: Union[CronTrigger, TablesTrigger]
Resolved type:
CronTrigger | TablesTrigger
SubscriberTriggerBySpec
type_aliasSubscriberTriggerBySpec: Union[CronTrigger, TablesTrigger, AllTablesTrigger]
Resolved type:
CronTrigger | TablesTrigger | AllTablesTrigger
TableFrameSpec
type_aliasTableFrameSpec: TableFrame | None
TableFramesSpec
type_aliasTableFramesSpec: list[TableFrame | None] | None
TableNameSpec
type_aliasTableNameSpec: str
TableNamesSpec
type_aliasTableNamesSpec: list[TableNameSpec]
Resolved type:
list[str]
TransformerTriggerBySpec
type_aliasTransformerTriggerBySpec: Union[CronTrigger, TablesTrigger, AllTablesTrigger]
Resolved type:
CronTrigger | TablesTrigger | AllTablesTrigger
TrxCtx
classclass 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).
get_attrdef get_attr(attr: ContextKeySpec) -> BasicTypeSpec | None
Read a per-flow scratch value (returns None if
unset).
Parameters:
attrContextKeySpec (str)set_attrdef 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:
attrContextKeySpec (str)valBasicTypeSpec | None (str | int | float | bool | None)add_metadatadef add_metadata(attr: ContextKeySpec, val: BasicTypeSpec | None)
Attach trx-level metadata for observability / lineage. Not durable across trx invocations.
Parameters:
attrContextKeySpec (str)valBasicTypeSpec | None (str | int | float | bool | None)