DROP FUNCTION (Snowpark Container Services)¶

Removes the specified service function.

See also:

Service functions, CREATE FUNCTION, ALTER FUNCTION, DESC FUNCTION

Syntax¶

DROP FUNCTION [ IF EXISTS ] <name> ( [ <arg_data_type> , ... ] )
Copy

Parameters¶

name

Specifies the identifier for the service function to drop. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case sensitive.

arg_data_type [ , ... ]

Specifies the data type of the argument(s), if any, for the service function. The argument types are necessary because service functions support name overloading (that is, two service functions in the same schema can have the same name) and the argument types are used to identify the UDF you wish to drop.

Usage notes¶

Dropped functions cannot be recovered; they must be recreated.

Examples¶

This demonstrates the DROP FUNCTION command:

DROP FUNCTION my_echo_udf(VARCHAR);
Copy

Example output:

+-----------------------------------+
| status                            |
|-----------------------------------|
| MY_ECHO_UDF successfully dropped. |
+-----------------------------------+