TYPES view | Snowflake Documentation

Schema:

ORGANIZATION_USAGE

This Organization Usage view displays a row for each user-defined type defined in an account.

See also:

TYPES view (Information Schema) , TYPES view (Account Usage)

Columns

Organization-level columns

Additional columns

Usage notes

  • Latency for the view might be up to 24 hours.

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

  • The view doesn’t 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.

Examples

Retrieve all user-defined types in the organization:

SELECT type_name, type_catalog, type_schema, type_owner, base_data_type
  FROM SNOWFLAKE.ORGANIZATION_USAGE.TYPES
  ORDER BY created DESC;

Retrieve user-defined types that have been dropped:

SELECT type_name, type_catalog, type_schema, deleted
  FROM SNOWFLAKE.ORGANIZATION_USAGE.TYPES
  WHERE deleted IS NOT NULL
  ORDER BY deleted DESC;