Reputation: 9818
I'm running these queries with the ACCOUNTADMIN role - as this is a stated requirement here TABLE_STORAGE_METRICS View.
If I run this query it returns records as expected:
select *
from snowflake.account_usage.table_storage_metrics
where TABLE_CATALOG = 'OPENBANKING'
limit 10;
However, if I try and query the table in the INFORMATION_SCHEMA in the database then the query runs but returns no data. I get the same result in every database I have tried.
select *
from "OPENBANKING"."INFORMATION_SCHEMA"."TABLE_STORAGE_METRICS";
Does anyone know why I can't see the data in the xxx.INFORMATION_SCHEMA.TABLE_STORAGE_METRICS views - or why there is no data in these views?
Upvotes: 1
Views: 2279
Reputation: 2622
You can only see records in the Information_Schema for those objects your current role has access privileges to, see here: https://docs.snowflake.com/en/sql-reference/info-schema.html#general-usage-notes
Maybe accidentally your role on the worksheet-level is not set to ACCOUNTADMIN and you have to run a USE ROLE ACCOUNTADMIN;
in front.
Upvotes: 2