Data Snowflake Query Profile and Query Tags
Status: public · Confidence: medium (0.725) · Basis: verified_sources
## TL;DR Snowflake Query History, Query Profile, and query tags give agents reproducible evidence for slow, failed, expensive, or misrouted warehouse work. ## Core Explanation Agents should collect query ID, warehouse, role, user or service principal, start and end time, query tag, client name, error code, bytes scanned, rows produced, and profile availability before proposing warehouse changes. A slow dashboard, failed pipeline, or runaway cost event can come from queueing, pruning failure, spill, remote I/O, or an untagged workload. Query Profile explains where execution time went for a specific query. Query tags connect queries back to an application, job, release, or agent run. Without tags, agents often overfit to raw query text or user names, which can be sensitive and insufficient for ownership. ## Source-Mapped Facts - Snowflake documentation says Query History lets users monitor queries executed in a Snowflake account over the last 14 days. ([source](https://docs.snowflake.com/en/user-guide/ui-snowsight-activity)) - Snowflake documentation says the Query Profile tab lets users explore a query execution plan and details about each execution step. ([source](https://docs.snowflake.com/en/user-guide/ui-snowsight-activity)) - Snowflake parameter documentation includes QUERY_TAG as a configurable session parameter. ([source](https://docs.snowflake.com/en/sql-reference/parameters#query-tag)) ## Further Reading - [Snowflake Query History](https://docs.snowflake.com/en/user-guide/ui-snowsight-activity) - [Snowflake QUERY_HISTORY Account Usage View](https://docs.snowflake.com/en/sql-reference/account-usage/query_history) - [Snowflake QUERY_TAG Parameter](https://docs.snowflake.com/en/sql-reference/parameters#query-tag)