CertSafari
    Snowflake SnowPro Advanced: Data Scientist (DSA-C03)· Lessons

    Domain 4 · Lesson 15/16

    Model Monitoring in Snowflake: Drift, AUC, Precision, Recall and RMSE

    Determine the effectiveness of a model and retrain if necessary.

    17 min read
    8.33% of exam
    6 sources
    Published 5 Oct 2026
    Docs as of 4 Oct 2026

    What you will be able to do

    • Explain why a deployed model decays and what a Snowflake model version monitor records to detect it
    • Query drift and statistical metrics that compare production data with a baseline
    • Pick the right performance metric (accuracy, precision, recall, ROC_AUC, RMSE) for a model type and name the columns each one needs
    • Read monitor results by segment, recover a suspended monitor, and know where alerts fit

    Key concept

    Baseline (for drift detection) — A baseline is a snapshot of reference data, usually data like the training data, that is stored inside a model version monitor. The monitor measures drift by comparing production data with this baseline, so a monitor created without one cannot report drift.

    1.Why deployed models decay, and what a monitor watches

    A model that scored well at training time is not guaranteed to keep scoring well. Snowflake's ML Observability documentation names the usual causes: the inputs change, the assumptions baked in at training go stale, and upstream pipelines break. Traffic also changes over time. This gradual loss of quality is what the exam guide calls model decay. Deciding whether to retrain starts with measuring the deployed model against two references: the data it was trained on, and the outcomes that actually happened.

    Snowflake does this measuring with a model version monitor. The monitor works on stored inference data. When you run a registered model, its predictions come back as a DataFrame, and teams usually write them to a Snowflake table even when inference runs outside Snowflake. Each row in the monitoring logs holds an ID, a timestamp, the features, the prediction, and (once known) the ground-truth value. Keeping features and predictions together over time is what makes both questions in the exam guide answerable: has the input data moved away from training, and are the predictions themselves shifting?

    A monitor is tied to one model version. It refreshes its logs by querying the source data, and it aggregates them over an aggregation window, currently at least one day. An optional baseline table holds the reference data that drift is measured against. Monitors support regression, binary classification and multi-class classification models, and only single-output models.

    CREATE MODEL MONITOR syntax for a model version monitor. VERSION ties it to one version, BASELINE enables drift, and the ACTUAL_* columns enable performance metrics.sql
    CREATE [ OR REPLACE ] MODEL MONITOR [ IF NOT EXISTS ] <monitor_name> WITH
        MODEL = <model_name>
        VERSION = '<version_name>'
        FUNCTION = '<function_name>'
        SOURCE = <source_name>
        WAREHOUSE = <warehouse_name>
        REFRESH_INTERVAL = '<num> { seconds | minutes | hours | days }'
        AGGREGATION_WINDOW = '<num> days'
        TIMESTAMP_COLUMN = <timestamp_name>
        [ BASELINE = <baseline_name> ]
        [ ID_COLUMNS = <id_column_name_array> ]
        [ PREDICTION_CLASS_COLUMNS = <prediction_class_column_name_array> ]
        [ PREDICTION_SCORE_COLUMNS = <prediction_column-name_array> ]
        [ ACTUAL_CLASS_COLUMNS = <actual_class_column_name_array> ]
        [ ACTUAL_SCORE_COLUMNS = <actual_column_name_array> ]
        [ SEGMENT_COLUMNS = <segment_column_name_array> ]
        [ CUSTOM_METRIC_COLUMNS = <custom_metric_column_name_array> ]
        [ COMMENT = '<string_literal>' ]

    The column rules matter later. Timestamp columns must be TIMESTAMP_NTZ, and prediction and actual columns must be NUMBER. Each column can appear only once across the monitor's parameters, so the ID column cannot also serve as the prediction column. Invalid values, such as nulls, NaNs, infinities or probability scores outside 0–1, can make the monitor fail and suspend. A monitor reports three families of metrics: drift, performance, and statistical counts such as nulls.

    Checkpoint 1 of 8· Check yourself

    A team has deployed versions V1 and V2 of the same registered model and wants a model version monitor on each. What do they need?

    Sources1

    2.Data drift: comparing production data with the baseline

    The exam guide's first drift question is: do the data making predictions look like the training data? In Snowflake, you answer it with the baseline. The baseline table holds a snapshot of data similar to the source, and that snapshot is stored inside the monitor object. Drift metrics compare the distribution of a column in production with the same column in the baseline, one time bucket at a time. Without a baseline, MODEL_MONITOR_DRIFT_METRIC returns an error.

    The column you compare does not have to be an input. For a model version monitor, column_name can be a feature column, a prediction column or an actual column. Drift on a feature answers "are the inputs different from training?" Drift on the prediction column answers "has the model's output distribution moved?" That is how the sources address the exam guide's second question about whether the deployed model behaves as it did. The sources do not describe a row-by-row check that identical inputs still produce identical predictions. What they offer is distribution drift on the prediction column, plus the stored log of IDs, features and predictions you can query yourself.

    Four drift metric names are valid: JENSEN_SHANNON, DIFFERENCE_OF_MEANS, WASSERSTEIN and POPULATION_STABILITY_INDEX. The reference gives no formulas or alert thresholds for them, so don't rely on memorised cut-offs here. (One example on the observability page passes 'PSI', but the function reference lists POPULATION_STABILITY_INDEX as the valid value.) Requesting a numerical drift metric for a non-numeric feature is listed as an error. The optional arguments are granularity (default 1 DAY), start time (default 60 days ago) and end time (default now).

    Checkpoint 2 of 8· Fill the gap

    Which function completes this query for 30 days of Jensen-Shannon drift on the prediction column?

    SELECT * FROM TABLE( ? (
    'MY_MONITOR', 'JENSEN_SHANNON', 'MODEL_PREDICTION', '1 DAY', DATEADD('DAY', -30, CURRENT_DATE()), CURRENT_DATE())
    )

    Drift works alongside a simpler signal. MODEL_MONITOR_STAT_METRIC returns COUNT, COUNT_NULL, MIN, MAX, AVG and SUM for a column. The count metrics work on any column type, while the other four work only on numeric columns. A sudden jump in nulls or a collapse in row count usually points to a broken pipeline, not real-world drift, and the two call for different fixes.

    Checkpoint 3 of 8· Exam question

    A retail team's demand-forecasting model was trained on 2023 data. Six months after deployment, the monitored `STORE_FOOTFALL` feature has a clearly higher mean and wider spread than in the training table, while the model code and registered version are unchanged. Which term describes this situation?

    Sources234

    3.Accuracy, precision and recall: what they measure and what the monitor needs

    Drift tells you the data has moved. It does not tell you the model is now wrong. To measure that, you need ground truth. For classifiers, Snowflake's documentation builds the metrics from four counts: true positives (TP, correct predictions of positive instances), true negatives (TN), false positives (FP, incorrect predictions of positive instances) and false negatives (FN).

    - Precision = TP / (TP + FP): of everything predicted positive, how much really was positive. - Recall (sensitivity) = TP / (TP + FN): of everything really positive, how much the model caught. - F1 is the harmonic mean of precision and recall. - Accuracy = (TP + TN) / all predictions. The documentation warns this metric can be misleading in unbalanced cases.

    In a model monitor, these metrics come from MODEL_MONITOR_PERFORMANCE_METRIC, and the names you can request depend on the model type. Binary classifiers accept CLASSIFICATION_ACCURACY, PRECISION, RECALL, F1_SCORE and ROC_AUC. Multi-class classifiers accept CLASSIFICATION_ACCURACY plus MACRO_AVERAGE_PRECISION, MACRO_AVERAGE_RECALL, MICRO_AVERAGE_PRECISION and MICRO_AVERAGE_RECALL. The sources name the macro and micro variants without defining how each one averages, so learn the names here. The documentation also notes that for binary classification you can use the micro-average metrics much as you would use classification accuracy in multi-class classification.

    Every accuracy-family metric needs actual values. Actual columns are optional when you create the monitor, but if you leave them out these metrics are not computed. Leaving the actual column empty also causes errors.

    Performance metric names by model type, and the monitor columns each one requires
    Metric name(s)Model typeRequired columns
    CLASSIFICATION_ACCURACYBinary and multi-classprediction_class + actual_class
    PRECISION, RECALL, F1_SCOREBinaryprediction_class + actual_class
    ROC_AUCBinaryprediction_score + actual_class
    MACRO_AVERAGE_PRECISION, MACRO_AVERAGE_RECALL, MICRO_AVERAGE_PRECISION, MICRO_AVERAGE_RECALLMulti-classprediction_class + actual_class
    RMSE, MAE, MAPERegressionprediction_score + actual_score

    Checkpoint 4 of 8· Check yourself

    A binary churn monitor was created with PREDICTION_CLASS_COLUMNS but no ACTUAL_CLASS_COLUMNS. Drift queries work. What happens when the team requests PRECISION?

    Checkpoint 5 of 8· Exam question

    A data scientist monitors a churn model with a Snowflake model monitor. Feature distributions look unchanged, yet the share of correct predictions has steadily fallen since a competitor launched a new pricing plan that changed why customers leave. What is the MOST accurate diagnosis?

    Sources56

    4.Area under the ROC curve: a score-based metric

    Here is why AUC is different. A classifier turns a probability into a class by comparing it with a threshold: a sample belongs to a class if its predicted probability exceeds the threshold. Precision, recall and accuracy are each measured at one threshold. Snowflake's classification documentation describes threshold metrics that sweep the threshold from 0 to 1. At each threshold it computes the true positive rate (TPR, the same as recall) and the false positive rate (FPR, the share of actual negatives wrongly predicted positive). These pairs can be used to plot ROC and PR curves. The area under the ROC curve therefore summarises performance across all thresholds, which is why it needs the raw score. A hard class label has already lost the threshold information.

    In practice, if your inference table stores only a 0/1 label, ROC_AUC cannot be computed. When you design the source table, keep the probability in a PREDICTION_SCORE_COLUMNS column as well as the class. Remember that probability scores outside 0–1 count as invalid values that can suspend the monitor.

    AUC also differs on confidence intervals. The performance function's CI_VALUE column returns a Wilson interval for CLASSIFICATION_ACCURACY, PRECISION, RECALL, F1_SCORE and the micro-average metrics. ROC_AUC is not in that list, so its CI_VALUE is NULL.

    Checkpoint 6 of 8· Match them up

    Match each quantity to its definition

    Tap a term, then the definition that fits it.

    Sources56

    5.RMSE for regression, then reading and acting on the results

    Regression models get a separate set of performance metrics: RMSE, MAE, MAPE and MSE. RMSE, MAE and MAPE all need prediction_score and actual_score, because a regression output is a number, not a class. The sources do not give the RMSE formula. They expand the name (Root Mean Square Error), list its required columns, and say that CI_VALUE for RMSE, MSE and MAE is a Wald interval, where the classification metrics use Wilson. The query pattern matches the other metrics, here with daily buckets over the last 30 days:

    Daily RMSE for the last 30 days from a model version monitorsql
    SELECT * FROM TABLE(MODEL_MONITOR_PERFORMANCE_METRIC(
    'MY_MONITOR', 'RMSE', '1 DAY', DATEADD('DAY', -30, CURRENT_DATE()), CURRENT_DATE())
    )

    Each result row has EVENT_TIMESTAMP, METRIC_VALUE, COUNT_USED and COUNT_UNUSED. Check the counts: a metric computed on few records is weak evidence either way.

    An overall average can hide a segment that is failing. If the monitor was created with SEGMENT_COLUMNS, you can pass a JSON extra_args value to get any drift, performance or stat metric for one segment. Segment columns must be string categorical columns, with at most 5 per monitor (a hard limit) and fewer than 25 unique values each (a recommendation). Segment values are case sensitive, special characters are not supported in segment queries, and each call accepts only one column:value pair.

    Format of extra_args for a segment-specific queryjson
    '{"SEGMENTS": [{"column": "<segment_column_name>", "value": "<segment_value>"}]}'

    You can view results in two places. The Snowsight ML Monitoring dashboard (AI & ML » Models, then a model's Monitors list) plots metrics over time and can compare two version monitors. The metric functions return rows you can feed into Streamlit or another monitoring tool. You can also set up alerts and notifications on monitoring metrics. The sources here point to a separate Alerts and Notifications page and do not describe its mechanics.

    A monitor can also stop reporting on its own. After five consecutive refresh failures related to the source tables, it suspends refreshes. DESCRIBE MODEL MONITOR shows aggregation_status (with SUSPENDED values) and aggregation_last_error (the SQL error). After you fix the cause, ALTER MODEL MONITOR … RESUME restarts refreshes. A flat dashboard may mean a suspended monitor, not a healthy model.

    Rising drift or falling precision, recall, AUC or RMSE quality is the evidence for retraining. How you schedule and promote a retrained version is covered in the neighbouring lessons, not here.

    Checkpoint 7 of 8· Put it in order

    A monitor's dashboard has stopped updating. Put the recovery steps in order.

    1. 1.Issue ALTER MODEL MONITOR … RESUME
    2. 2.Fix the root cause of the refresh failure in the source data
    3. 3.The monitor hits five consecutive refresh failures related to its source tables and suspends refreshes
    4. 4.Run DESCRIBE MODEL MONITOR and read aggregation_status and aggregation_last_error

    Checkpoint 8 of 8· Exam question

    A team creates a model monitor for a fraud model and supplies a baseline table built from the training set. What does Snowflake use the baseline table for?

    Sources61

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.A monitor created without a BASELINE can be given one later with ALTER MODEL MONITOR so drift starts working.Why is that wrong?

      Drift needs baseline data, and a baseline cannot be added afterwards. You must drop the monitor and create it again with BASELINE set.

      Covered in Data drift: comparing production data with the baseline

    2. 2.ROC_AUC can be computed from the same prediction_class column used for precision and recall.Why is that wrong?

      ROC_AUC reads the predicted score, not the class, so the monitor needs a prediction_score column alongside actual_class.

      Covered in Area under the ROC curve: a score-based metric

    3. 3.High accuracy on an imbalanced dataset shows the model is performing well.Why is that wrong?

      Accuracy counts true negatives, so a dominant negative class can inflate it while recall on the rare class stays poor.

      Covered in Accuracy, precision and recall: what they measure and what the monitor needs

    4. 4.One segment query can filter on REGION and CHANNEL together by passing two entries in SEGMENTS.Why is that wrong?

      Each call accepts only one segment column:value pair, so querying two segments takes two separate calls.

      Covered in RMSE for regression, then reading and acting on the results

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Model behavior can change over time due to input drift, stale training assumptions, and data pipeline issues”
      ↩︎ Why deployed models decay, and what a monitor watches
      “The monitoring logs store the inference data and the predictions so that the ML Observability feature can observe changes in predictions over time.”
      ↩︎ Why deployed models decay, and what a monitor watches
      “The minimum time granularity at which data is stored (aggregation window), currently 1 day minimum.”
      ↩︎ Why deployed models decay, and what a monitor watches
      “Timestamp columns must be of type TIMESTAMP_NTZ; prediction and actual columns must be NUMBER.”
      ↩︎ Why deployed models decay, and what a monitor watches
      “A maximum of 5 segment columns per model version monitor (hard limit).”
      ↩︎ RMSE for regression, then reading and acting on the results
      “Model monitors automatically suspend refreshes when they encounter five consecutive refresh failures related to the source tables.”
      ↩︎ RMSE for regression, then reading and acting on the results
      “You can set up alerts and notifications for your monitoring metrics.”
      ↩︎ RMSE for regression, then reading and acting on the results
      “You can use the results from the metric functions to create custom dashboards in Streamlit or other centralized monitoring tools.”
      ↩︎ RMSE for regression, then reading and acting on the results
      “Drift calculation requires baseline data; without it, to add baseline data, you must drop the monitor and create it again.”
      ↩︎ Exam trap 1
      “Currently, segment queries support only 1 segment column:value pair per query.”
      ↩︎ Exam trap 4
      “Each model version can have exactly one monitor, and each monitor can monitor exactly one model version; they cannot be shared.”
      ↩︎ Checkpoint
      “Drift calculation requires baseline data; without it, to add baseline data, you must drop the monitor and create it again.”
      ↩︎ Prediction
      “At least one prediction column (class or score) is required; actual columns are optional but needed for accuracy metrics.”
      ↩︎ Checkpoint
      “After resolving the root cause of the refresh failure, resume the monitor by issuing ALTER MODEL MONITOR … RESUME.”
      ↩︎ Checkpoint
    2. 2.
      “Although this parameter is optional, if it is not set, the monitor cannot detect drift.”
      ↩︎ Data drift: comparing production data with the baseline
      “Although this parameter is optional, if it is not set, the monitor cannot detect drift.”
      ↩︎ Key concept
    3. 3.
      “For model version monitors, any string that exists as a feature column, prediction column, or actual column.”
      ↩︎ Data drift: comparing production data with the baseline
      “Valid values: 'JENSEN_SHANNON' 'DIFFERENCE_OF_MEANS' 'WASSERSTEIN' 'POPULATION_STABILITY_INDEX'”
      ↩︎ Data drift: comparing production data with the baseline
      “Request a numerical drift metric for a non-numeric feature.”
      ↩︎ Data drift: comparing production data with the baseline
    4. 5.
      “Precision: The ratio of true positives to the total predicted positives.”
      ↩︎ Accuracy, precision and recall: what they measure and what the monitor needs
      “Recall (Sensitivity): The ratio of true positives to the total actual positives.”
      ↩︎ Accuracy, precision and recall: what they measure and what the monitor needs
      “Accuracy: The ratio of correct predictions (both true positives and true negatives) to the total number of predictions”
      ↩︎ Accuracy, precision and recall: what they measure and what the monitor needs
      “The sample is classified as belonging to a class if the predicted probability of being in that class exceeds the specified threshold.”
      ↩︎ Area under the ROC curve: a score-based metric
      “This can be used to plot ROC and PR curves or do threshold tuning if desired.”
      ↩︎ Area under the ROC curve: a score-based metric
      “False positive rate (FPR): The proportion of actual negative instances that were incorrectly predicted as positive.”
      ↩︎ Area under the ROC curve: a score-based metric
      “This metric can be misleading in unbalanced cases.”
      ↩︎ Exam trap 3
      “True positive rate (TPR): The proportion of actual positive instances that the model correctly identifies (equivalent to Recall).”
      ↩︎ Checkpoint
    5. 6.
      “For binary classification, you can use micro-average precision and recall metrics similarly to how you use classification accuracy in multi-class classification.”
      ↩︎ Accuracy, precision and recall: what they measure and what the monitor needs
      “Fail to provide data in the actual_score or actual_class column.”
      ↩︎ Accuracy, precision and recall: what they measure and what the monitor needs
      “ROC_AUC: Requires the prediction_score and actual_class columns”
      ↩︎ Area under the ROC curve: a score-based metric
      “Valid values if the model monitor is attached to a regression model: 'RMSE' 'MAE' 'MAPE' 'MSE'”
      ↩︎ RMSE for regression, then reading and acting on the results
      “RMSE: Requires the prediction_score and actual_score columns”
      ↩︎ RMSE for regression, then reading and acting on the results
      “ROC_AUC: Requires the prediction_score and actual_class columns”
      ↩︎ Exam trap 2

    Spotted a mistake, or was something unclear? Tell us.