Functions
A Function is a decorated Python callable that defines one step in a Tabsdata workflow. Its decorator declares the Function type, the Tables or external system it reads, the Tables or external system it writes, and any Trigger that starts it.
Registering a Function packages its Python code and definition and stores them in a Collection on the Server. The Server uses the declared inputs and outputs to determine the Function's data dependencies and to build an Execution Plan when the Function is triggered.
Function types
A Function's type follows from what it reads and what it writes.
Reads an external system and writes Tabsdata Tables.
Reads Tabsdata Tables and writes new Tabsdata Tables.
Reads Tabsdata Tables and writes an external system.
Follow the dedicated guides for Publishers, Transformers, and Subscribers.
Inputs and outputs
The decorator maps declared inputs to the Python callable's parameters. It also maps returned values to output Tables or to destination slots in an external system. The number and order of parameters and returned values must match the corresponding declarations.
Publishers and Subscribers use a Connector for the system-specific read or write operation. The Collection's Connection supplies the configuration and credentials used by that Connector. Transformers work entirely with Tabsdata Tables and do not use an external Connection.
Output Tables belong to the Collection where the Function is registered. Input Table references can identify Tables in other Collections within the same Project, allowing Functions to connect into a larger workflow.
Triggers
A Trigger determines when a Function starts. A Function without trigger_by runs only when manually triggered. Set trigger_by to a schedule or one or more Table references when the Function should run automatically.
Registration
Registration sends the Function definition, source code, and required bundle metadata to the Server. A Function name must be unique within its Collection.
Register a decorated callable from a Python file with:
tdk fn register --coll <collection_name> --path <path_to_python_file>::<function_name>
Pass --update when the same command should update an existing Function with that name. Registration records the definition; it does not execute the Function.
See Register a Function for the full procedure.
Execution
A manual Trigger can start any registered Function:
tdk fn trigger --coll <collection_name> --name <function_name>
The Server evaluates the Function's dependencies and creates an Execution Plan. Each Function included in that plan gets a Function Run, and a Worker executes each attempt. A successful run that produces Tables creates new Table Versions; the Server keeps the registered Function definition after the Worker exits.
Function code does not run in the CLI process that sends the command. The CLI requests the Trigger, while the Server coordinates and records the execution.