Categories:

Data metric functions

SCHEMA_CHANGE_COUNT (system data metric function)

Returns the number of schema change operations (column add, drop, rename, or type change) detected on the associated table since the previous evaluation of the function. On the first run, the function records a baseline snapshot of the table’s columns and returns 0.

In addition to the aggregate count written to DATA_QUALITY_MONITORING_RESULTS, this function writes one row per detected change to the DATA_QUALITY_MONITORING_LOGS view, correlated by run_id.

Syntax

Not applicable.

Returns

The function returns a scalar value with a NUMBER data type.

Usage notes

You can’t call this function directly. To learn how to associate the function with a table or view so it runs at regular intervals, see Associate a DMF.