DDL for User-Defined Functions, External Functions, and Stored Procedures

UDFs (user-defined functions) and stored procedures are two programming constructs that allow you to extend Snowflake SQL.

In this Topic:

UDF Management

UDFs can be used to perform operations that are not available via the system-defined functions provided by Snowflake. Snowflake provides the following DDL commands for creating and managing UDFs:

Note

UDFs can contain SQL or JavaScript; however, DDL and DML operations are not supported in UDFs.

External Function Management

External functions can be used to perform operations that are not available via the system-defined functions provided by Snowflake. External functions are a type of UDF, but their syntax is different enough that they have their own CREATE, ALTER, and SHOW statements.

Snowflake provides the following DDL commands for creating and managing external functions:

External functions use API integrations. Snowflake provides the following DDL commands for creating and managing API integrations:

Stored Procedure Management

Snowflake provides the following DDL commands for creating and managing stored procedures:

In addition, Snowflake provides the following command for using stored procedures: