transformer
functionView source ↗
def transformer(
input_tables: TableInput | str | List[str],
output_tables: TableOutput | str | List[str],
name: str = None,
trigger_by: TransformerTriggerBySpec = '*',
on_output_tables: OnTablesSpec = None,
) -> callable
Categories: transformer
Decorator to define a function to transform data present in Tabsdata.
Parameters
parameter
input_tablesTableInput | str | List[str]Where to obtain the data that will be provided as an input to the function.
parameter
output_tablesTableOutput | str | List[str]Where to store the output of the function.
parameter
namestr, optionalThe name with which the function will be registered. If not provided, the current function name will be used.
parameter
trigger_byTransformerTriggerBySpec, optionalThe trigger that will cause the function to execute. It can be a table in the system, a list of tables, None (in which case it must be triggered manually), or a CronTrigger. Defaults to all dependencies.
parameter
on_output_tablesOnTablesSpec, optionalActions to perform on output tables after executing the function. Can be a single action or a list of them. Defaults to None.
Returns
callable: The function converted to a Tabsdata Function.