ALTER MODEL MONITOR

Modifies the properties of a model monitor:

  • Suspends or resumes the monitor.

  • Sets the baseline table the monitor uses.

  • Sets the refresh interval for dynamic table operations within the monitor.

  • Sets the warehouse the monitor uses.

  • Adds or removes segment columns for monitoring specific data segments.

See also:

CREATE MODEL MONITOR, SHOW MODEL MONITORS, DESCRIBE MODEL MONITOR, DROP MODEL MONITOR

Syntax

ALTER MODEL MONITOR [ IF EXISTS ] <monitor_name> { SUSPEND | RESUME }

ALTER MODEL MONITOR [ IF EXISTS ] <monitor_name> SET
   [ BASELINE='<baseline_table_name>' ]
   [ REFRESH_INTERVAL='<refresh_interval>' ]
   [ WAREHOUSE=<warehouse_name> ]

ALTER MODEL MONITOR [ IF EXISTS ] <monitor_name> ADD segment_column = '<segment_column_name>'

ALTER MODEL MONITOR [ IF EXISTS ] <monitor_name> DROP segment_column = '<segment_column_name>'
Copy

Parameters

monitor_name

Specifies the identifier (i.e. name) of the model monitor.

If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

For more information, see Identifier requirements.

SET ...

Specifies one or more model monitor properties to be set.

BASELINE='<baseline_table_name>'

Sets the baseline table that the monitor uses.

WAREHOUSE = warehouse_name

Sets the warehouse that the monitor uses.

REFRESH_INTERVAL = 'refresh_interval'

The interval at which the monitor refreshes its internal state. The value must be a string representing a time period, such as '1 day'. Supported units include seconds, minutes, hours, days, weeks, months, quarters, and years. You may use singular (“hour”) or plural (“hours”) for the interval name, but may not abbreviate.

ADD segment_column = '<segment_column_name>'

Adds a segment column to the monitor. The specified column must exist in the source data and be of type STRING. You can add up to 5 segment columns per monitor. Each segment column should have fewer than 25 unique values for optimal performance.

DROP segment_column = '<segment_column_name>'

Removes a segment column from the monitor.

For more information about segments, see ML Observability: Monitoring model behavior over time.

Access control requirements

A role used to execute this operation must have the following privileges at a minimum:

Privilege

Object

Notes

Modify

Model monitor

The USAGE privilege on the parent database and schema are required to perform operations on any object in a schema. Note that a role granted any privilege on a schema allows that role to resolve the schema. For example, a role granted CREATE privilege on a schema can create objects on that schema without also having USAGE granted on that schema.

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Language: English