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

    Domain 4 · Lesson 15/16

    Model monitors, drift and retraining in Snowflake

    Determine the effectiveness of a model and retrain if necessary.

    18 min read
    8.33% of exam
    5 sources
    Published 20 Oct 2026
    Docs as of 4 Oct 2026

    What you will be able to do

    • Tell data drift apart from concept drift, and explain why each one causes model decay
    • Define a model version monitor with a source table, prediction, actual and timestamp columns, and a baseline
    • Query drift metrics (Jensen-Shannon, Wasserstein, PSI, difference of means) for feature and prediction columns
    • Say which columns a monitor needs before it can report AUC, accuracy, precision, recall or RMSE
    • Decide from monitor trends when to investigate, when to retrain, and when the data pipeline is the real fault

    Key concept

    Model decay through drift — A registered model version never changes, but the data it scores and the patterns behind that data do. Decay is the drop in prediction quality that follows. You detect it by comparing production data and outcomes against a baseline.

    1.Why a deployed model stops being right

    A model is frozen when you register it, but the world keeps moving. Snowflake names the usual causes: input drift, stale training assumptions and data pipeline issues. The first two are what people mean by model decay. The model's code is the same, the registered version is the same, and its predictions still get worse.

    Data drift happens when the distribution of an input feature in production moves away from the one the model was trained on. Take a demand forecast trained on 2023 data. Six months after deployment, its STORE_FOOTFALL feature has a higher mean and a wider spread than in the training table. The model now sees values it rarely or never saw while it was fitted. That is not overfitting, which is a training-time flaw that shows up from the first day. It is not a version conflict either, because only one unchanged version is serving. It is not label leakage, which is a defect in how the feature set was built. The inputs have moved, and that is drift.

    Concept drift is the stale-assumption case. The features look the same, but what they mean for the target has changed. After a competitor's new pricing plan changes why customers leave, a customer with the same tenure and the same spend has different odds of churning than before. Drift metrics on feature columns stay flat because the inputs really have not moved. The model still decays, and the only place that shows up is a falling performance metric. Two other explanations don't fit the timing. Class imbalance would have hurt accuracy from the first scoring day. Training-serving skew, where the feature pipeline transforms data differently at scoring time than at training time, would also be present from deployment, not start after an outside event.

    Checkpoint 1 of 9· Check yourself

    A fraud model was registered and deployed unchanged. After the bank expands into a new region, the TRANSACTION_AMOUNT feature in production has a higher mean and a wider range than in the training table. Fraud rates and what drives fraud have not changed. Which explanation fits best?

    Checkpoint 2 of 9· 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?

    Checkpoint 3 of 9· 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?

    Sources1

    2.What a model monitor is built from

    A model version monitor watches one registered model version through its stored inference data. The pairing is strict: each version can have exactly one monitor, and each monitor watches exactly one version. The monitor reads a source table on a schedule and refreshes its monitoring logs, which hold an ID, a timestamp, features, predictions and the ground-truth label. It then updates its reports from those logs. Inference does not have to run inside Snowflake. What matters is that the results are stored in a Snowflake table the monitor can read.

    CREATE MODEL MONITOR syntax for a model version monitorsql
    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 monitor settings that decide what it can measure
    SettingWhat it controls
    SOURCEThe production table or view of stored inference rows that the monitor reads on each refresh
    TIMESTAMP_COLUMNHow rows are placed in time. Must be TIMESTAMP_NTZ
    AGGREGATION_WINDOWThe smallest time bucket the monitor stores, given in days, with a minimum of 1 day
    REFRESH_INTERVALHow often the monitor queries the source and updates its logs, using the named WAREHOUSE
    PREDICTION_CLASS_COLUMNS / PREDICTION_SCORE_COLUMNSThe model's outputs. At least one is required, and both must be NUMBER
    ACTUAL_CLASS_COLUMNS / ACTUAL_SCORE_COLUMNSGround-truth labels. Optional, but needed for any accuracy metric
    BASELINEThe reference snapshot that drift is measured against. Without it, the monitor cannot detect drift

    The baseline is easy to misread. It is a table holding a snapshot of data similar to SOURCE. The training set is a common choice. That snapshot is embedded in the monitor and used for one job: it gives the reference distributions that production rows are compared against when drift is computed. It does not store the monitor's daily results, because those live in the monitoring logs. It does not filter which source rows get processed. It is not labelled data that the monitor re-scores or retrains on, because a monitor never retrains anything.

    Choose the baseline before you run CREATE. A monitor's basic configuration, including its model and source table, cannot be changed after it is created. A monitor created without a baseline can only gain one by being dropped and created again. Segment columns are the exception to that rigidity. These are STRING columns, at most five per monitor, ideally with fewer than 25 values each. They split every metric by a category such as region, and they can be added later with ALTER MODEL MONITOR.

    Checkpoint 4 of 9· Match them up

    Match each CREATE MODEL MONITOR setting to the job it does in a model version monitor.

    Tap a term, then the definition that fits it.

    Checkpoint 5 of 9· 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?

    Sources12

    3.Measuring drift against the baseline

    Drift is a distance between two distributions: the baseline snapshot and the production rows in one time window. MODEL_MONITOR_DRIFT_METRIC returns it for one column at a time. It accepts four metric names. DIFFERENCE_OF_MEANS compares the averages. JENSEN_SHANNON, WASSERSTEIN and POPULATION_STABILITY_INDEX compare the shape of the whole distribution. A rising value means the window looks less like the baseline. The numeric metrics only apply to numeric columns, and asking for one on a non-numeric feature returns an error.

    The column argument accepts any feature column, prediction column or actual column. That lets one function answer two different questions. Drift on a feature column asks whether the data the model is scoring looks like the data it was trained on. Drift on the prediction column asks whether the model's output distribution has moved. If the score distribution shifts while the population is supposed to be stable, check the inputs and the pipeline feeding them before you trust the outputs. Both checks need a baseline. A monitor without one returns an error instead of a number.

    Daily Jensen-Shannon drift of the prediction column over the last 30 dayssql
    SELECT * FROM TABLE(MODEL_MONITOR_DRIFT_METRIC(
    'MY_MONITOR', 'JENSEN_SHANNON', 'MODEL_PREDICTION', '1 DAY', DATEADD('DAY', -30, CURRENT_DATE()), CURRENT_DATE())
    )

    Each output row is one time bucket. Granularity defaults to 1 DAY, and the window defaults to the last 60 days. Read METRIC_VALUE together with COL_COUNT_USED and BASELINE_COL_COUNT_USED. A large drift value computed from a handful of rows is weak evidence. The optional seventh argument narrows the query to one segment, such as CUSTOMER_TIER = PREMIUM, so drift that affects only one customer group isn't averaged away.

    Checkpoint 6 of 9· Check yourself

    Your team created a model version monitor with no BASELINE. Weeks later, someone calls MODEL_MONITOR_DRIFT_METRIC with 'JENSEN_SHANNON' on the MODEL_PREDICTION column. What happens, and how do they get drift values?

    Sources3

    4.Performance metrics need ground truth

    Drift tells you the data has changed. Performance metrics tell you whether the predictions have become wrong, and that requires the true outcomes. The monitor reports the same measures used to validate a model before release, including the Confusion matrix, accuracy, precision and recall. For production data, though, it can compute them only once ground-truth label columns arrive in the source table. Actual columns are optional when you create a monitor, but leave them out and accuracy metrics are never computed. Declare them but leave them empty, and the metric query errors.

    Columns each performance metric needs in the monitored data
    Model typeMetric nameRequired columns
    Binary classificationROC_AUCprediction_score and actual_class
    Binary classificationCLASSIFICATION_ACCURACY, PRECISION, RECALL, F1_SCOREprediction_class and actual_class
    Multi-class classificationCLASSIFICATION_ACCURACY, MACRO_AVERAGE_PRECISION, MACRO_AVERAGE_RECALL, MICRO_AVERAGE_PRECISION, MICRO_AVERAGE_RECALLprediction_class and actual_class
    RegressionRMSE, MAE, MAPEprediction_score and actual_score

    AUC is the row that catches people out. As covered under Decision thresholds, ROC curves and AUC, AUC summarizes ranking quality across every threshold. A predicted class has already had one threshold applied, so AUC can't be computed from it. A monitor that logs only the 0/1 class can report accuracy, precision and recall, but not ROC_AUC. To get AUC, log the probability in a prediction score column. For multi-class models, the macro averages give every class equal weight, so a rare category counts as much as a common one. The micro averages pool every row.

    For regression, RMSE is the metric to track, alongside MAE and MAPE. Regression metrics (MAE, MSE, RMSE, R²) and residuals explains what the number measures. In production, the trend is what counts. A RMSE that rises compared with what the model scored on its baseline period is the signal to investigate or retrain. The classifier equivalents work the same way. Falling precision means more of the rows the model flags are false alarms. Falling recall means it is missing more real positives. Accuracy that falls while feature drift stays flat points to the concept drift described earlier.

    Daily RMSE over the last 30 dayssql
    SELECT * FROM TABLE(MODEL_MONITOR_PERFORMANCE_METRIC(
    'MY_MONITOR', 'RMSE', '1 DAY', DATEADD('DAY', -30, CURRENT_DATE()), CURRENT_DATE())
    )

    Every row includes COUNT_USED and COUNT_UNUSED, so you can see how many labelled rows support the number. Labels often arrive days after the predictions, so a recent bucket may rest on very few rows. Where it is returned, CI_VALUE gives a 95% confidence interval: Wilson for accuracy, precision, recall and F1, Wald for MSE, RMSE and MAE. A dip that stays inside the previous interval is not yet evidence of decay.

    Checkpoint 7 of 9· Check yourself

    Which metric request will fail on a binary classification monitor whose source table logs only PREDICTED_CHURN (the 0/1 class) and ACTUAL_CHURN (the true 0/1 label)?

    Checkpoint 8 of 9· Fill the gap

    A regression model's monitor logs both prediction scores and actual scores. To see whether its predictions are getting less accurate, you want daily RMSE for the last 30 days. Which function completes the query?

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

    Sources4

    5.Deciding when to retrain, and automating it

    A monitor measures, and you decide. Retraining starts when a metric crosses a threshold you have set against the baseline. That might be Jensen-Shannon drift above a chosen value on a key feature, or RMSE several days above its baseline level. The monitor refreshes on its REFRESH_INTERVAL, and the metric functions are plain SQL table functions. That means the same queries can feed a Snowsight dashboard, a custom Streamlit page, or the alerts and notifications Snowflake supports for monitoring metrics.

    Reading the two signals together
    Drift metricPerformance metricLikely meaningAction
    RisingStableInputs moved, but the model still copesInvestigate and watch closely. Retraining is not yet required
    RisingFallingData drift is causing decayRetrain on recent data that reflects the new distribution
    FlatFallingConcept drift: the feature-to-target relationship changedRetrain on recent labelled data. Input checks alone will not catch this
    Missing for recent daysMissing for recent daysRefreshes have stoppedCheck monitor status before blaming the model

    The last row matters because a broken pipeline can look like a silent model. After five consecutive refresh failures tied to its source tables, a monitor suspends its own refreshes. DESCRIBE MODEL MONITOR shows SUSPENDED in aggregation_status and the SQL error in aggregation_last_error. Fix the source, then run ALTER MODEL MONITOR … RESUME. Retraining would not fix it.

    Automation turns the decision into a pipeline. Snowflake Task Graphs can chain feature refresh, training, evaluation and deployment, for example a weekly run that retrains and deploys only if the new model scores better. The retrained model is registered as a new version. Because a monitor's model and version are fixed at creation, the new version needs its own monitor, again with a baseline, before its effectiveness can be tracked.

    Checkpoint 9 of 9· Check yourself

    For the past nine days, a churn model's dashboard shows no new drift or performance values. The last values before the gap looked normal. What should the team do first?

    Sources152

    Sources

    (5)

    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 a deployed model stops being right
      “Each model version can have exactly one monitor, and each monitor can monitor exactly one model version; they cannot be shared.”
      ↩︎ What a model monitor is built from
      “The monitor object automatically refreshes the monitor logs by querying source data and updates the monitoring reports based on the logs.”
      ↩︎ What a model monitor is built from
      “The minimum time granularity at which data is stored (aggregation window), currently 1 day minimum.”
      ↩︎ What a model monitor is built from
      “You can set up alerts and notifications for your monitoring metrics.”
      ↩︎ Deciding when to retrain, and automating it
      “You can use the results from the metric functions to create custom dashboards in Streamlit or other centralized monitoring tools.”
      ↩︎ Deciding when to retrain, and automating it
      “Model behavior can change over time due to input drift, stale training assumptions, and data pipeline issues”
      ↩︎ Key concept
      “Drift calculation requires baseline data; without it, to add baseline data, you must drop the monitor and create it again.”
      ↩︎ Exam trap 2
      “Model monitors automatically suspend refreshes when they encounter five consecutive refresh failures related to the source tables.”
      ↩︎ Exam trap 5
      “Drift calculation requires baseline data; without it, to add baseline data, you must drop the monitor and create it again.”
      ↩︎ 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.”
      ↩︎ What a model monitor is built from
      “A snapshot of this data is embedded within the monitor object.”
      ↩︎ What a model monitor is built from
      “cannot be changed after the monitor is created”
      ↩︎ Deciding when to retrain, and automating it
      “Name of the baseline table that contains a snapshot of data similar to SOURCE, which is used to compute drift.”
      ↩︎ Exam trap 1
      “Actual columns are optional, but accuracy metrics are not computed if they are not specified.”
      ↩︎ Exam trap 4
      “Name of the baseline table that contains a snapshot of data similar to SOURCE, which is used to compute drift.”
      ↩︎ Checkpoint
    3. 3.
      “Valid values: 'JENSEN_SHANNON' 'DIFFERENCE_OF_MEANS' 'WASSERSTEIN' 'POPULATION_STABILITY_INDEX'”
      ↩︎ Measuring drift against the baseline
      “For model version monitors, any string that exists as a feature column, prediction column, or actual column.”
      ↩︎ Measuring drift against the baseline
      “Request a numerical drift metric for a non-numeric feature.”
      ↩︎ Measuring drift against the baseline
    4. 4.
      “RMSE: Requires the prediction_score and actual_score columns”
      ↩︎ Performance metrics need ground truth
      “Fail to provide data in the actual_score or actual_class column.”
      ↩︎ Performance metrics need ground truth
      “95% confidence interval with lower and upper bounds.”
      ↩︎ Performance metrics need ground truth
      “ROC_AUC: Requires the prediction_score and actual_class columns”
      ↩︎ Exam trap 3
      “ROC_AUC: Requires the prediction_score and actual_class columns”
      ↩︎ Checkpoint
    5. 5.
      “Use CoCo to build Snowflake Task Graphs (DAGs) that chain feature refresh, training, evaluation, and deployment.”
      ↩︎ Deciding when to retrain, and automating it

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