Schema:

ACCOUNT_USAGE

TAGS view¶

This Account Usage view lists the tags in an account.

Columns¶

Column Name

Data Type

Description

TAG_ID

NUMBER

The local identifier of a tag.

TAG_NAME

TEXT

The name of a tag.

TAG_SCHEMA_ID

NUMBER

The local identifier of the tag schema.

TAG_SCHEMA

TEXT

The name of schema in which the tag exists.

TAG_DATABASE_ID

NUMBER

The local identifier of the database in which the tag exists.

TAG_DATABASE

TEXT

The name of the database in which the tag exists.

TAG_OWNER

TEXT

The name of the role that owns the tag.

TAG_COMMENT

TEXT

Comments for the tag, if any.

CREATED

TIMESTAMP_LTZ

Date and time when the tag 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 tag was dropped, or the date and time when its parents were dropped.

ALLOWED_VALUES

ARRAY

Specifies the possible string values that can be assigned to the tag when the tag is set on an object or NULL if the tag does not have any specified allowed values. For details, see Specify tag values.

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.

Usage notes¶

  • Latency for the view may 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 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¶

Return the tag references for your Snowflake account:

select * from snowflake.account_usage.tags
order by tag_name;
Copy