COF-C03 Question 207
Single answerACCOUNT_USAGE schemaA Snowflake administrator needs to build a monthly governance report that shows which users ran the most expensive queries across the account during the previous month. The report does not need real-time data, but it must include historical activity across all warehouses in the account. Which Snowflake source should the administrator use?
- A
The ACCOUNT_USAGE schema in the SNOWFLAKE database, using views such as QUERY_HISTORY and WAREHOUSE_METERING_HISTORY
- B
The INFORMATION_SCHEMA in each database, because it stores unlimited historical query and warehouse usage data for the entire account
- C
The SHOW QUERIES and SHOW WAREHOUSES commands, because they are the recommended source for long-term historical reporting
- D
The organization usage views, because they are required for any reporting that spans multiple warehouses in a single account
Show answer and explanation
Correct answer: A
Explanation
For a monthly governance report covering historical activity across an entire Snowflake account, the correct choice is the ACCOUNT_USAGE schema in the shared SNOWFLAKE database. ACCOUNT_USAGE provides account-level historical views such as QUERY_HISTORY, LOGIN_HISTORY, ACCESS_HISTORY, and WAREHOUSE_METERING_HISTORY, making it well suited for auditing, monitoring, and cost/governance reporting. A key practical consideration is that ACCOUNT_USAGE data is not real time and can have latency, which is acceptable in this scenario. INFORMATION_SCHEMA is often confused with ACCOUNT_USAGE, but it is not intended as the primary source for long-term account-wide usage analytics. Likewise, SHOW commands are not designed for historical reporting pipelines. Organization usage is for cross-account reporting at the organization level, not for standard single-account warehouse analysis. These distinctions align with Snowflake documentation and common best practices for monitoring and governance reporting.
- A. Correct.
Correct. The SNOWFLAKE database includes the ACCOUNT_USAGE schema, which provides account-level historical views for governance, monitoring, and reporting. Views such as QUERY_HISTORY can be used to analyze query activity by user, and WAREHOUSE_METERING_HISTORY can be used to analyze warehouse credit consumption over time. This is the appropriate source when account-wide historical reporting is needed and some latency is acceptable.
- B. Incorrect.
Incorrect. INFORMATION_SCHEMA is useful for metadata and some table functions, but it is not the best source for long-term account-wide historical usage reporting. Its history is more limited, and it is scoped differently than ACCOUNT_USAGE. A common misconception is that INFORMATION_SCHEMA can replace ACCOUNT_USAGE for all reporting needs, but ACCOUNT_USAGE is specifically designed for historical account usage analysis.
- C. Incorrect.
Incorrect. SHOW commands are primarily intended for interactive inspection of current objects and limited result sets, not for robust long-term historical analytics. They are not the recommended foundation for building a monthly governance report that requires historical query and warehouse usage analysis across the account.
- D. Incorrect.
Incorrect. Organization usage views are intended for analysis at the organization level, such as across multiple accounts, and require ORGANIZATIONADMIN privileges. For reporting within a single account, ACCOUNT_USAGE is the correct source. The presence of multiple warehouses inside one account does not require organization usage views.