Reputation: 541
I am attempting to query size of databases, schemas, tables for better management. I have a role (say called ABC) that has ACCOUNTADMIN under it. However, when I query TABLE_STORAGE_METRICS it comes back full of nulls. Using the actual ACCOUNTADMIN has it fully populated.
Why wouldn't role ABC be able to query it if ACCOUNTADMIN is under it?
Upvotes: 0
Views: 138
Reputation: 1321
I believe ABC role given by account admin. May this role don't have privileges to access the metrics table.
Check access privileges for role - ABC.
Upvotes: 0
Reputation: 541
@karthik - Recommendation 1
Try below
USE ROLE accountadmin;
USE SCHEMA snowflake.account_usage;
Upvotes: 1