Schema:

ACCOUNT_USAGE

FUNCTIONS view¶

This Account Usage view displays a row for each user-defined function (UDF) defined in the account.

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

Columns¶

Column Name

Data Type

Description

FUNCTION_ID

NUMBER

Internal/system-generated identifier for the UDF.

FUNCTION_NAME

TEXT

Name of the UDF.

FUNCTION_SCHEMA_ID

NUMBER

Internal/system-generated identifier for the schema of the UDF.

FUNCTION_SCHEMA

TEXT

Schema which the UDF belongs to.

FUNCTION_CATALOG_ID

NUMBER

Internal/system-generated identifier for the database of the UDF.

FUNCTION_CATALOG

TEXT

Database which the UDF belongs to.

FUNCTION_OWNER

TEXT

Name of the role that owns the UDF.

ARGUMENT_SIGNATURE

TEXT

Type signature of the UDF’s arguments.

DATA_TYPE

TEXT

Return value data type.

CHARACTER_MAXIMUM_LENGTH

NUMBER

Maximum length in characters of string return value.

CHARACTER_OCTET_LENGTH

NUMBER

Maximum length in bytes of string return value.

NUMERIC_PRECISION

NUMBER

Numeric precision of numeric return value.

NUMERIC_PRECISION_RADIX

NUMBER

Radix of precision of numeric return value.

NUMERIC_SCALE

NUMBER

Scale of numeric return value.

FUNCTION_LANGUAGE

TEXT

Language of the UDF.

FUNCTION_DEFINITION

TEXT

UDF definition.

VOLATILITY

TEXT

Whether the UDF is volatile or immutable.

IS_NULL_CALL

TEXT

Whether the UDF is called when input is null.

CREATED

TIMESTAMP_LTZ

Date and time when the UDF was created.

LAST_ALTERED

TIMESTAMP_LTZ

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

DELETED

TIMESTAMP_LTZ

Date and time when the UDF was dropped.

COMMENT

TEXT

Comment for the function.

IS_EXTERNAL [1]

VARCHAR(3)

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

API_INTEGRATION [1]

VARCHAR

The name of the API integration object to authenticate the call to the proxy service.

CONTEXT_HEADERS [1]

VARCHAR

The context header information for the external function.

MAX_BATCH_ROWS [1]

NUMBER

The maximum number of rows in each batch sent to the proxy service.

COMPRESSION [1]

STRING

The type of compression.

PACKAGES

STRING

Packages requested by the function.

RUNTIME_VERSION

STRING

Runtime version of the language used by the function. NULL if the function is SQL or JavaScript.

INSTALLED_PACKAGES

STRING

All packages installed by the function. Output for Python functions only.

OWNER_ROLE_TYPE

TEXT

The type of role that owns the object, for example ROLE. . If a Snowflake Native App owns the object, the value is APPLICATION. . Snowflake returns NULL if you delete the object because a deleted object does not have an owner role.

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.

SECRETS

JSON map

Map of secrets specified by the function’s SECRETS parameter, where map keys are secret variable names and map values are secret object names.

EXTERNAL_ACCESS_INTEGRATIONS

VARCHAR

Names of external access integrations specified by the function’s EXTERNAL_ACCESS_INTEGRATION parameter.

Usage notes¶

  • Latency for the view can be up to 120 minutes (2 hours).

  • The view only displays objects for which the current role for the session has been granted access privileges.

  • The view does not recognize the MANAGE GRANTS privilege and consequently might show less information compared to a SHOW command executed by a user who holds the MANAGE GRANTS privilege.

  • 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.