Reputation: 21
I discovered while gathering metadata stom SNOWFLAKE - "ACCOUNT USAGE VIEWS" that the values in TABLES(ROW_COUNT, BYTES) are not being updated. I expect that there is some LATENCY period delay, but for most objects I have "0". I have to clearly state that those tables are not new. They are there for months.
While comparing with INFORMATION_SCHEMA.TABLES I see the up to date figures. Other (also ACCOUNT_USAGE) view TABLE_STORAGE_METRICS show at least information about size. And its calculated there.
This is my account_usage select:
use schema snowflake.account_usage;
Select table_id, table_catalog, table_schema,table_name, ROW_COUNT , bytes From tables where TABLE_TYPE='BASE TABLE' AND DELETED IS NULL AND table_owner IS NOT NULL
and the information_schema select is:
SELECT table_catalog, table_schema,table_name, ROW_COUNT , bytes From CS_DB.INFORMATION_SCHEMA.TABLES where TABLE_TYPE='BASE TABLE'
Account Usage INFORMATION_SCHEMA
@snowflake Please could you help, I believe its an error, and it would be benefiacial for all if Snowflake fix the problem. Or would be someone be able to explain why there is discrepancy? I dont have 0 for all tables(account_usage), but in most tables.
Best regards, Petr
Upvotes: 2
Views: 547
Reputation: 2920
I'd strongly recommend you document this like you have here and open a Snowflake Support Request.
Here is the link that explains how to do this:
I hope this helps...Rich
Upvotes: 2