Skip to main content
Version: 1.3.0

TabsdataFunction

class TabsdataFunction(
func: Callable,
name: str | None,
input: SourcePlugin = None,
output: DestinationPlugin = None,
trigger_by: str | List[str] | None = None,
)

Categories: function

Class to decorate a function with metadata and methods for use in a Tabsdata environment.

Attributes:

Initializes the TabsDataFunction with the given function, input, output and trigger.

Parameters

parameter
funcCallable

The function to decorate.

parameter
namestr

The name with which the function will be registered. If None, the original_function name will be used.

parameter
inputSourcePlugin, optional

The data to be used when running the function. Must be an instance of SourcePlugin.

parameter
outputDestinationPlugin, optional

The location where the function results will be saved when run. Must be an instance of DestinationPlugin.

parameter
trigger_bystr | List[str], optional

The trigger(s) that will cause the function to execute. It can be a table in the system, a list of tables or None (in which case it will be inferred from the dependencies).

Raises

FunctionConfigurationError InputConfigurationError OutputConfigurationError FormatConfigurationError

Properties

property
inputSourcePlugin | None

The data to be used when running the function.

property
namestr

The name with which the function will be registered.

property
original_file

str: The file where the original function is defined in the user's computer

property
original_folderstr

The folder where the original function is defined, as a local path in the user's computer.

property
original_functionCallable

The original function that was decorated, without any behaviour modifications.

property
outputDestinationPlugin | None

DestinationPlugin: The location where the function results will be saved when run.

property
trigger_byList[str] | None

List[str]: The trigger(s) that will cause the function to execute. It must be another table or tables in the system.

property
typestr

The type of the function. It can be "publisher", "transformer" or "subscriber".