ADA-C01 Question 426
Single answerMonitor AI and ML function costsA Snowflake administrator needs to determine which teams are driving unexpected costs from AI and ML features after several departments began using Snowflake Cortex functions in production. Leadership wants a daily report that attributes spend by user and function type, without relying on warehouse metering because some of these costs are not tied directly to virtual warehouse usage. Which approach should the administrator use?
- A
Query ACCOUNT_USAGE.CORTEX_FUNCTIONS_USAGE_HISTORY and aggregate cost and usage metrics by user, function name, and date.
- B
Query ACCOUNT_USAGE.QUERY_HISTORY and sum warehouse credits for queries that contain AI function names in the SQL text.
- C
Use WAREHOUSE_METERING_HISTORY to identify which warehouse executed the AI function calls, then allocate all warehouse cost to the calling users.
- D
Use RESOURCE_MONITORS on the warehouses that run AI workloads, because resource monitors directly track and report Cortex function charges by model and user.
Show answer and explanation
Correct answer: A
Explanation
When the requirement is to monitor AI and ML function costs in Snowflake, administrators should use the dedicated Account Usage views for those services rather than infer cost from warehouse activity. For Snowflake Cortex function monitoring, ACCOUNT_USAGE.CORTEX_FUNCTIONS_USAGE_HISTORY is the correct source because it provides usage and cost details specific to Cortex functions. This is important because AI/ML function charges may be billed separately from virtual warehouse credits, so QUERY_HISTORY and WAREHOUSE_METERING_HISTORY do not provide authoritative cost attribution. Resource monitors are also not designed to report service-level AI function charges. Best practice is to build reporting from the service-specific Account Usage views and aggregate by date, user, and function to support chargeback or showback reporting.
- A. Correct.
Correct. For monitoring Snowflake AI/ML function costs such as Cortex function usage, the administrator should use the account usage view designed for that purpose: CORTEX_FUNCTIONS_USAGE_HISTORY. This view supports analysis of usage and billed cost for Cortex functions over time and can be grouped by dimensions such as user and function. This is the appropriate method when leadership wants attribution that is not based only on warehouse consumption.
- B. Incorrect.
Incorrect. QUERY_HISTORY can help identify which SQL statements invoked AI functions, but summing warehouse credits from query execution does not accurately capture Cortex function charges. Snowflake AI function costs are tracked separately from standard warehouse metering, so searching SQL text is incomplete and can misattribute or omit billed usage.
- C. Incorrect.
Incorrect. WAREHOUSE_METERING_HISTORY shows warehouse credit consumption, not the direct billed usage of Cortex functions. Even if an AI-related query ran on a warehouse, warehouse credits do not represent the full or correct cost of Snowflake-managed AI/ML function usage. This option reflects the common misconception that all Snowflake compute-related spend is visible only through warehouse metering.
- D. Incorrect.
Incorrect. Resource monitors can track and control warehouse credit consumption, but they do not directly measure or report Cortex function charges by model, function, or user. They are useful for warehouse budgets, not for detailed monitoring of separately metered AI function usage.