Categories:

User & Security DDL

SHOW TAGS

Lists the tag information.

Syntax

SHOW TAGS [ LIKE '<pattern>' ] [ IN { ACCOUNT | DATABASE [ <database_name> ] | [ SCHEMA ] [ <schema_name> ] } ];

Parameters

LIKE 'pattern'

Filters the command output by object name. The filter uses case-insensitive pattern matching, with support for SQL wildcard characters (% and _).

For example, the following patterns return the same results:

... LIKE '%testing%' ... ... LIKE '%TESTING%' ...

Usage Notes

  • The command does not require a running warehouse to execute.

  • The value for LIMIT rows cannot exceed 10000. If LIMIT rows is omitted, the command results in an error if the result set is larger than 10K rows.

    To view results for which more than 10K records exist, either include LIMIT rows or query the corresponding view in the Information Schema.

  • To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.

  • For more information on tag DDL authorization, see required privileges.

Examples

Show tags in a given schema:

show tags in schema my_db.my_schema;

------------------------------+----------------+---------------+-------------+--------------+--------------------+
                   created_on | name           | database_name | schema_name | owner        | comment            |
------------------------------+----------------+---------------+-------------+--------------+--------------------+
2021-03-20 21:09:38.317 +0000 | CLASSIFICATION | MY_DB         | MY_SCHEMA   | ACCOUNTADMIN | secure information |
2021-03-20 21:08:59.000 +0000 | COST_CENTER    | MY_DB         | MY_SCHEMA   | ACCOUNTADMIN | cost_center tag    |
------------------------------+----------------+---------------+-------------+--------------+--------------------+