1. An engineer wants to attribute warehouse credit consumption to specific business units by tagging queries at runtime. After setting the session parameter QUERY_TAG = 'BU:Finance' before a batch of queries, where can this tag be found for post-hoc analysis, and what is a key limitation of this approach?
- A. The tag appears in ACCOUNT_USAGE.QUERY_HISTORY.QUERY_TAG; the key limitation is that QUERY_TAG values are limited to 50 characters and cannot contain special characters
- B. The tag appears in ACCOUNT_USAGE.QUERY_HISTORY.QUERY_TAG; the key limitation is that this column is only populated for queries run by ACCOUNTADMIN or SYSADMIN roles
- C. The tag appears in ACCOUNT_USAGE.QUERY_HISTORY.QUERY_TAG; a key limitation is that the tag must be set per session and does not persist across sessions or connections, requiring every client connection to explicitly set it before execution✓ Correct
- D. The tag appears in ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY as a labeled dimension; the limitation is a 24-hour delay before tagged credits appear in that view
Explanation
QUERY_TAG is a session-level parameter stored in ACCOUNT_USAGE.QUERY_HISTORY.QUERY_TAG. It is an effective attribution tool for BI tools or ETL frameworks that can inject the tag at connection time. Its primary operational limitation is that it is session-scoped: every new connection or session must explicitly set the parameter, making it fragile in connection-pooling environments where sessions are reused across business units without being reset. Why the distractors are wrong: - QUERY_TAG supports up to 2,000 characters and can contain most printable characters including colons, slashes, and JSON; the 50-character / special character restriction is incorrect. - QUERY_TAG is available regardless of role; it is not restricted to ACCOUNTADMIN or SYSADMIN. - WAREHOUSE_METERING_HISTORY records credit consumption aggregated by warehouse and does not store per-query tags; there is no QUERY_TAG dimension in that view.