TabsdataFunction
class TabsdataFunction(
func: Callable,
name: str | None,
input: SourcePlugin = None,
output: DestinationPlugin = None,
trigger_by: str | list[str] | CronTrigger | StageTrigger | None = None,
output_actions: OnTablesSpec = 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
funcThe function to decorate.
nameThe name with which the function will be registered. If None, the original_function name will be used.
inputThe data to be used when running the function. Must be an instance of SourcePlugin.
outputDestinationPlugin, optionalThe location where the function results will be saved when run. Must be an instance of DestinationPlugin.
trigger_byThe 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).
output_actionsActions to perform on the output tables.
Raises
FunctionConfigurationError InputConfigurationError OutputConfigurationError FormatConfigurationError
Properties
inputSourcePlugin | NoneThe data to be used when running the function.
namestrThe name with which the function will be registered.
original_filestr: The file where the original function is defined in the user's computer
original_folderstrThe folder where the original function is defined, as a local path in the user's computer.
original_functionCallableThe original function that was decorated, without any behaviour modifications.
outputDestinationPlugin | NoneDestinationPlugin: The location where the function results will be saved when run.
output_actionslist[OnTablesAction]Actions to perform on the output tables.
trigger_bylist[str] | CronTrigger | StageTrigger | NoneList[str]: The trigger(s) that will cause the function to execute. It must be another table or tables in the system, a CronTrigger, or a StageTrigger in the case of a publisher.
typestrThe type of the function. It can be "publisher", "transformer" or "subscriber".