Schema:

ACCOUNT_USAGE

TAGS view

This Account Usage view lists the tags in an account.

Columns

Column nameData typeDescription
TAG_IDNUMBERThe local identifier of a tag.
TAG_NAMETEXTThe name of a tag.
TAG_SCHEMA_IDNUMBERThe local identifier of the tag schema.
TAG_SCHEMATEXTThe name of schema in which the tag exists.
TAG_DATABASE_IDNUMBERThe local identifier of the database in which the tag exists.
TAG_DATABASETEXTThe name of the database in which the tag exists.
TAG_OWNERTEXTThe name of the role that owns the tag.
TAG_COMMENTVARIANTComments for the tag, if any.
CREATEDTIMESTAMP_LTZDate and time when the tag was created.
LAST_ALTEREDTIMESTAMP_LTZ

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

DELETEDTIMESTAMP_LTZDate and time when the tag was dropped, or the date and time when its parents were dropped.
ALLOWED_VALUESVARIANTSpecifies 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 Set a list of allowed tag values.
OWNER_ROLE_TYPETEXT

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.

PROPAGATEVARCHAR

Indicates whether the tag is configured for automatic propagation. Possible values are the following:

  • NULL — Tag is not propagated.
  • ON_DEPENDENCY — Tag is propagated when there is an object dependency (for example, creating a view from a tagged table).
  • ON_DATA_MOVEMENT — Tag is propagated when there is data movement (for example, using a CTAS statement to create a table from a tagged table).
  • ON_DEPENDENCY_AND_DATA_MOVEMENT — Tag is propagated for both object dependencies and data movement.
ON_CONFLICTVARCHAR

If the tag is configured for automatic propagation, indicates what happens when the value of the tag being propagated conflicts with the value that was specified when the tag was manually applied to the same object. For more information, see Tag propagation conflicts.

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;