SCHEMA_CHANGE_DROP_COUNT

functionsupportedGovernance (policies, tags, data quality)Enterprise+

docs.snowflake.com ↗

Data metric functions

Returns the number of columns dropped from the associated table or view since the previous evaluation of the function. On the first evaluation, the function records a baseline of the object’s columns and returns 0. 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.

Usage notes

Example

Associate the function with the customers table, and define an expectation that is violated when a column is dropped: