SnowPro Specialty: Gen AI Question 264
Single answerTracking model usage and consumptionA data platform team is piloting several Cortex AISQL functions and wants to understand which teams are driving spend. They need a way to report model usage and credit consumption by warehouse and user over the last 30 days, using data already available inside Snowflake. Which approach best meets this requirement?
- A
Query Snowflake Account Usage views such as METERING_DAILY_HISTORY and correlate them with query history to identify AISQL queries, the users who ran them, and the warehouses involved.
- B
Enable ACCESS_HISTORY and use it alone to calculate model token usage and Cortex credit consumption for each query.
- C
Review only WAREHOUSE_METERING_HISTORY because all Cortex AISQL model usage is fully attributed there without needing any query-level correlation.
- D
Use the RESULT_SCAN function on past AISQL queries to derive historical credit consumption by team for the last 30 days.
Show answer and explanation
Correct answer: A
Explanation
The best answer is to use Snowflake's Account Usage data for consumption reporting and correlate it with query metadata for attribution. In practice, teams commonly use views such as QUERY_HISTORY, WAREHOUSE_METERING_HISTORY, and METERING_DAILY_HISTORY to understand who ran what, on which warehouse, and how credits were consumed over time. For Cortex AISQL and similar model-driven workloads, query history is important for identifying the relevant SQL statements and tying them back to users or teams. Metering views provide the cost and consumption perspective, but they generally need to be combined with query metadata for actionable chargeback or FinOps reporting. This aligns with Snowflake best practices for observability and cost governance: use Account Usage views for billing and operational telemetry rather than trying to infer spend from result sets or object access logs alone.
- A. Correct.
Correct. For tracking usage and consumption in Snowflake, a practical approach is to combine Account Usage metering views with query history. METERING_DAILY_HISTORY helps report consumed credits over time, while QUERY_HISTORY can be used to identify which users and warehouses executed Cortex AISQL-related SQL statements. This supports chargeback-style reporting by team, warehouse, or user. It reflects how Snowflake usage analysis is typically performed: metering data gives cost/consumption context, and query history provides operational attribution.
- B. Incorrect.
Incorrect. ACCESS_HISTORY is designed for object access auditing and lineage-style analysis, not as a standalone source for computing Cortex model token usage or exact credit consumption. A common misconception is to treat access telemetry as billing telemetry. While ACCESS_HISTORY can be useful for governance, it does not by itself provide the complete cost attribution needed for this scenario.
- C. Incorrect.
Incorrect. WAREHOUSE_METERING_HISTORY can help show warehouse credit consumption, but relying on it alone is insufficient for identifying which specific AISQL queries or users drove that usage. It lacks the query-level attribution needed to separate Cortex-related activity from other SQL workloads on the same warehouse. This option reflects the common mistake of assuming warehouse metering alone answers who-used-what questions.
- D. Incorrect.
Incorrect. RESULT_SCAN returns the result set of a prior query, but it is not a historical cost accounting mechanism. It cannot reliably derive credit consumption by team across 30 days unless that information was explicitly captured in the original result sets, which is not how Snowflake usage accounting works. This distractor targets confusion between querying prior results and querying account usage metadata.