Allie Gabbard-Meller
10/06/2025, 9:39 PMkapa.ai
10/06/2025, 9:39 PMkapa.ai
10/06/2025, 9:39 PMAllie Gabbard-Meller
10/06/2025, 9:42 PMkapa.ai
10/06/2025, 9:42 PMkapa.ai
10/06/2025, 9:42 PMdata_monitoring_metrics table specifically to avoid recalculating historical training data every time a test runs. When an anomaly detection test executes, it queries this table for historical metrics and only needs to calculate new metrics for the latest data since the last run. This incremental approach is designed to reduce query costs and improve efficiency, especially on large tables. The historical metrics are used as the training set for anomaly detection, so only new or missing data points are computed, not the entire history each time [Elementary dbt package models](https://docs.elementary-data.com/dbt/package-models#anomaly-detection). If you notice recalculation of older data, it may be due to configuration issues (such as changes in the timestamp column or a full refresh), but the intended behavior is to leverage the stored metrics to minimize redundant computation [Slack discussion](https://slack.com/archives/C02CTC89LAX/p1650989426047689).Allie Gabbard-Meller
10/06/2025, 9:59 PMkapa.ai
10/06/2025, 9:59 PMkapa.ai
10/06/2025, 9:59 PMdimension_anomalies test calculates and monitors the row count per dimension value, not the percentage of total or distribution share. The metric stored and analyzed is the absolute count of rows for each unique value in the specified dimension(s) over time. This is explicitly described in the documentation and confirmed in multiple community discussions: > The test counts rows grouped by given dimensions (columns/expressions). > This test practically monitors the frequency of values in the configured dimension over time, and alerts on unexpected changes in the distribution. > It is best to configure it on low-cardinality fields. > If timestamp_column is configured, the distribution is collected per time_bucket. If not, it counts the total rows per dimension. [dimension_anomalies documentation](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/dimension-anomalies) Several users have requested the ability to monitor percentages or more complex metrics (like share of total, or custom aggregations) per dimension, but as of now, this is not supported. The test only tracks row counts, not proportions or percentages of the total. This limitation is also discussed in community threads and GitHub issues, where the need for percentage-based or custom metric monitoring by dimension is a known feature request, but not yet available [Slack discussion](https://slack.com/archives/C02CTC89LAX/p1671712508592539), [Slack discussion](https://slack.com/archives/C02CTC89LAX/p1678792941742089). If you need to monitor the percentage of total per dimension, you would currently need to pre-aggregate your data or create a custom model that calculates these percentages, and then run anomaly detection on that model using a different test (such as column_anomalies), but this is a workaround and not natively supported by dimension_anomalies. Let me know if you need guidance on how to set up such a workaround!Allie Gabbard-Meller
10/06/2025, 10:01 PM