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

User-Defined FunctionsΒΆ

User-defined functions (UDFs) in Snowpark. Refer to UDFRegistration for details and sample code.

Classes

UserDefinedFunction(func, return_type, ...)

Encapsulates a user defined lambda or function that is returned by udf(), UDFRegistration.register() or UDFRegistration.register_from_file().

UDFRegistration(session)

Provides methods to register lambdas and functions as UDFs in the Snowflake database.

Methods

describe(udf_obj)

Returns a DataFrame that describes the properties of a UDF.

register(func[, return_type, input_types, ...])

Registers a Python function as a Snowflake Python UDF and returns the UDF.

register_from_file(file_path, func_name[, ...])

Registers a Python function as a Snowflake Python UDF from a Python or zip file, and returns the UDF.

Attributes

func

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

name

The UDF name.