You are viewing documentation about an older version (1.18.0). View latest version

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]

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 UserDefinedAggregateFunction to generate a Column instance. The input type can be a column name as a str, or a Column object.

Attributes

handler

The Python class or a tuple containing the Python file path and the function name.

name

The UDAF name.