FUNCTIONS view

This Information Schema view displays a row for each user-defined function (UDF), external function, or data metric function defined in the specified (or current) database.

For more information about external functions, see Writing external functions. For more information about UDFs, see User-defined functions overview.

Columns

Column Name

Data Type

Description

FUNCTION_CATALOG

VARCHAR

Database to which the function belongs.

FUNCTION_SCHEMA

VARCHAR

Schema to which the function belongs.

FUNCTION_NAME

VARCHAR

Function name.

FUNCTION_OWNER

VARCHAR

Name of the role that owns the function.

ARGUMENT_SIGNATURE

VARCHAR

Type signature of the function’s arguments.

DATA_TYPE

VARCHAR

Data type of the function’s return value.

CHARACTER_MAXIMUM_LENGTH

NUMBER(9,0)

Maximum length in characters of a string return value.

CHARACTER_OCTET_LENGTH

NUMBER(9,0)

Maximum length in bytes of a string return value.

NUMERIC_PRECISION

NUMBER(9,0)

Numeric precision of numeric return value.

NUMERIC_PRECISION_RADIX

NUMBER(9,0)

Radix of precision of numeric return value.

NUMERIC_SCALE

NUMBER(9,0)

Scale of numeric return value.

FUNCTION_LANGUAGE

VARCHAR

Language of the function’s handler.

FUNCTION_DEFINITION

VARCHAR

Definition of the function’s handler.

VOLATILITY

VARCHAR

VOLATILE if the function is volatile; IMMUTABLE if it is immutable.

IS_NULL_CALL

VARCHAR(3)

YES if the function is called on null input; otherwise, NO.

IS_SECURE

VARCHAR(3)

YES if the function is secure; otherwise, NO.

CREATED

TIMESTAMP_LTZ(9)

Creation time of the function.

LAST_ALTERED

TIMESTAMP_LTZ(9)

Date and time the object was last altered by a DML, DDL, or background metadata operation. See Usage Notes.

COMMENT

VARCHAR

Comment for the function.

IS_EXTERNAL [1]

VARCHAR(3)

YES if the function is an external function; otherwise, NO.

API_INTEGRATION [1]

VARCHAR

Name of the API integration object to authenticate the call to the proxy service an external function makes.

CONTEXT_HEADERS [1]

VARCHAR

Context header information for the external function.

MAX_BATCH_ROWS [1]

NUMBER(9,0)

Maximum number of rows in each batch sent to the proxy service for an external function.

REQUEST_TRANSLATOR [1]

VARCHAR

Name of the external function’s request translator (if any).

RESPONSE_TRANSLATOR [1]

VARCHAR

Name of the external function’s response translator (if any).

COMPRESSION [1]

VARCHAR

Type of compression used for serializing function payload.

IMPORTS

VARCHAR

Names of files (including their stage location and path) containing imported libraries.

HANDLER

VARCHAR

Name of the handler function or class.

TARGET_PATH

VARCHAR

Path to the stage in which Snowflake stores the compiled result of inline handler code.

RUNTIME_VERSION

VARCHAR

Runtime version of the function’s handler language; NULL if the function handler is written in SQL or JavaScript.

PACKAGES

VARCHAR

Names of packages specified in the PACKAGES clause of the CREATE FUNCTION statement. Currently, this column applies only when the handler is written in Python, Java, or Scala.

INSTALLED_PACKAGES

VARCHAR

Names of all packages installed by the function. This includes packages specified by the PACKAGES clause as well as their installed dependencies. Currently, this column applies only when the handler is written in Python.

IS_MEMOIZABLE

VARCHAR(3)

YES if the function is memoizable; otherwise, NO.

IS_DATA_METRIC

VARCHAR(3)

YES if the function is a data metric function; otherwise, NO.

Usage notes

  • The view only displays objects for which the current role for the session has been granted access privileges. The view does not honor the MANAGE GRANTS privilege and consequently might show less information compared to a SHOW command when both are executed by a user who holds the MANAGE GRANTS privilege.

  • Omitting a length for the VARCHAR type results in a VARCHAR that specifies the default maximum length. For more information, see VARCHAR.

  • The LAST_ALTERED column is updated when the following operations are performed on an object:

    • DDL operations.

    • DML operations (for tables only). This column is updated even when no rows are affected by the DML statement.

    • Background maintenance operations on metadata performed by Snowflake.