shobia
11/24/2025, 7:11 AMkapa.ai
11/24/2025, 7:11 AMkapa.ai
11/24/2025, 7:11 AMdata_monitoring_metrics – stores the raw metric values per bucket (e.g. per day/hour) for each anomaly test. [[DBT artifacts](https://slack.com/archives/C02CTC89LAX/p1663047264555179); [Tables overview](https://slack.com/archives/C02CTC89LAX/p1666376716952649)] Standard deviation and other training stats (avg, training set size, etc.) are then calculated in: - metrics_anomaly_score – a model/view that reads from data_monitoring_metrics and computes: - training_avg - training_stddev - training_set_size - anomaly_score [[Anomaly scores SQL](https://slack.com/archives/C02CTC89LAX/p1687939167177509); [Tables overview](https://slack.com/archives/C02CTC89LAX/p1666376716952649)] Per‑test temporary tables ending with __anomaly_scores in the elementary__tests schema also contain training_stddev, training_avg, min_metric_value, max_metric_value, etc. [[Per‑test scores](https://slack.com/archives/C02CTC89LAX/p1687939167177509)] ### 2. Example queries a. See all training stddev values from the central model: sql SELECT full_table_name, column_name, metric_name, bucket_start, bucket_end, metric_value, training_avg, training_stddev, training_set_size, anomaly_score FROM <db>.<elementary_schema>.metrics_anomaly_score ORDER BY bucket_end DESC; b. Check the raw metrics going into the calculation: sql SELECT full_table_name, column_name, metric_name, bucket_start, bucket_end, metric_value, updated_at FROM <db>.<elementary_schema>.data_monitoring_metrics ORDER BY bucket_end DESC; c. Look at a specific anomaly test’s own __anomaly_scores table (if you know its name): sql SELECT anomaly_score, anomaly_score_threshold, training_avg, training_stddev, min_metric_value, max_metric_value, bucket_start, metric_value FROM <db>.<elementary_tests_schema>.<some_test_name__anomaly_scores> ORDER BY bucket_start DESC; In all cases, training_stddev is the standard deviation Elementary uses to compute the z‑score–based anomaly_score. [[Anomaly method](https://docs.elementary-data.com/data-tests/data-anomaly-detection); [Anomaly scores SQL](https://slack.com/archives/C02CTC89LAX/p1687939167177509)]