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.23.0/src/snowflake/snowpark/udaf.py#L46-L108)¶
- Bases: - object- Encapsulates a user defined aggregate function that is returned by - udaf(),- UDAFRegistration.register()or- UDAFRegistration.register_from_file(). The constructor of this class is not supposed to be called directly.- Call an instance of - UserDefinedAggregateFunctionto generate a- Columninstance. The input type can be a column name as a- str, or a- Columnobject.- See also - Attributes - The Python class or a tuple containing the Python file path and the function name. - The UDAF name.