snowflake.snowpark.udf.UserDefinedFunction¶
- class snowflake.snowpark.udf.UserDefinedFunction(func: Union[Callable, Tuple[str, str]], return_type: DataType, input_types: List[DataType], name: str, is_return_nullable: bool = False, packages: Optional[List[Union[str, module]]] = None)[source]¶
Bases:
object
Encapsulates a user defined lambda or function that is returned by
udf()
,UDFRegistration.register()
orUDFRegistration.register_from_file()
. The constructor of this class is not supposed to be called directly.Call an instance of
UserDefinedFunction
to generateColumn
expressions. The input type can be a column name as astr
, or aColumn
object.See also
Attributes
The Python function or a tuple containing the Python file path and the function name.
The UDF name.