Link Search Menu Expand Document

Snowflake Query Tags

urn:js:virtue:aspire:standard:25.1

TL;DR

If queries are being tagged in Snowflake, those tags should conform to the Query Tag Schema.

Definition

Tagging queries in Snowflake is optional. Automated processes in Snowflake should tag queries. Where queries are tagged, those tags must conform to the Query Tag Schema.

Method

Query Tags are implemented in Snowflake using the QUERY_TAG parameter for the Account / User / Session in question (We will not be setting QUERY_TAGs at the account-level). These can be set at the user-level by a Snowflake Administrator, or at the session-level by the user using the ALTER SESSION command.

Reading Query tags

Query Tags can be read from the QUERY_HISTORY view, or the QUERY_HISTORY / QUERY_HISTORY_BY_* table functions in Snowflake from the QUERY_TAG column.