DESCRIBE FUNCTION (Snowpark Container Services)¶

Describes the specified service function, including the signature (arguments), return value, language, and body (path to the Snowpark Container Services service).

See also:

Service functions, CREATE FUNCTION, ALTER FUNCTION, DROP FUNCTION

Syntax¶

{ DESC | DESCRIBE } FUNCTION [ IF EXISTS ] <name> ( [ <arg_data_type> ] [ , ... ] )
Copy

Required parameters¶

name

Specifies the identifier for the service function to describe. 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_name arg_data_type ] [ , ... ] )

Specifies the arguments/inputs for the service function. These should correspond to the arguments that the service expects.

If there are no arguments, then include the parentheses without any argument name(s) and data type(s).

Access control requirements¶

A role used to execute this SQL command must have the following privileges at a minimum:

Privilege

Object

Notes

USAGE

Service function

Note that operating on any object in a schema also requires the USAGE privilege on the parent database and schema.

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Examples¶

In Tutorial-1, you create a service function (my_echo_udf). The following DESC FUNCTION command returns the service function description:

DESC FUNCTION my_echo_udf(VARCHAR);
Copy

Example output:

+------------------+----------------------+
| property         | value                |
|------------------+----------------------|
| signature        | (INPUTTEXT VARCHAR)  |
| returns          | VARCHAR(16777216)    |
| language         | NULL                 |
| null handling    | CALLED ON NULL INPUT |
| volatility       | VOLATILE             |
| body             | /echo                |
| headers          | null                 |
| context_headers  | null                 |
| max_batch_rows   | not set              |
| service          | ECHO_SERVICE         |
| service_endpoint | echoendpoint         |
+------------------+----------------------+