snowflake.snowpark.udaf.UserDefinedAggregateFunction¶
- class snowflake.snowpark.udaf.UserDefinedAggregateFunction(handler: Union[Callable, Tuple[str, str]], name: str, return_type: DataType, input_types: List[DataType], packages: Optional[List[Union[str, module]]] = None)[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/udaf.py#L43-L105)¶
Bases:
objectEncapsulates a user defined aggregate function that is returned by
udaf(),UDAFRegistration.register()orUDAFRegistration.register_from_file(). The constructor of this class is not supposed to be called directly.Call an instance of
UserDefinedAggregateFunctionto generate aColumninstance. The input type can be a column name as astr, or aColumnobject.See also
Attributes
The Python class or a tuple containing the Python file path and the function name.
The UDAF name.