TABLE_SIZE_BYTES

functionsupportedGovernance (policies, tags, data quality)Enterprise+

docs.snowflake.com ↗

Data metric functions

Returns the logical size, in bytes, of the associated table. The value is the same as the BYTES column of the TABLES view in the Information Schema. Data Quality Monitoring requires Enterprise Edition. To inquire about upgrading, please contact Snowflake Support.

Returns

The function returns a scalar value with a NUMBER data type. Values larger than 9007199254740991 bytes (253 − 1, about 9 PB) are returned as 9007199254740991.

Usage notes

Example

Associate the function with the events table, and define an expectation that is violated when the table reaches 1 TB: