Adonis HARROUK
11/25/2025, 1:27 PMkapa.ai
11/25/2025, 1:27 PMkapa.ai
11/25/2025, 1:27 PMAdonis HARROUK
11/25/2025, 1:37 PM- name: purchased_rank_stats
description: "Metrics for purchased rank statistics."
config:
elementary:
timestamp_column: "ranking_date"
columns:
- name: mpr
description: "Mean purchased rank"
tests:
- elementary.column_anomalies:
column_anomalies:
- min
- max
- average
- standard_deviation
where_expression: >
n_orders > 50 AND agora_variation NOT IN ('drk_popularity')
tags: ["elementary", "monitoring_purchased_rank_stats", "anomaly_detection"]
severity: warnkapa.ai
11/25/2025, 1:37 PMkapa.ai
11/25/2025, 1:38 PMcolumn_anomalies) only evaluate completed time buckets. For daily buckets, this means the test should only consider yesterday’s data (i.e., 2025-11-24 if today is 2025-11-25), not today’s partial data. This is designed to avoid false positives from incomplete data loads [volume_anomalies documentation](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/volume-anomalies). However, if your data for "yesterday" (2025-11-24) is still incomplete at the time of the test run, you may still get anomalies due to low row counts, as you observed. ### Your Specific Need: Test on the Last Fully Loaded Day Currently, Elementary does not natively support skipping the most recent day and testing the last fully loaded day (e.g., 2025-11-23 in your case) if yesterday’s data is incomplete. The system always tests the most recent completed bucket based on the timestamp column and the time the test is run. If the data for that bucket is incomplete, it can lead to the kind of false positives you’re seeing. This limitation is a known issue and has been discussed in the community. There have been feature requests to allow for a configurable delay or to skip the most recent X days, but as of now, this is not available out-of-the-box [Slack discussion](https://slack.com/archives/C02CTC89LAX/p1680016519796649). ### Workarounds - Delay Test Runs: The recommended workaround is to schedule your dbt/Elementary test runs to occur only after you are confident that the previous day’s data is fully loaded. This ensures that the “yesterday” bucket is complete when the test runs [Slack discussion](https://slack.com/archives/C02CTC89LAX/p1671002553673119). - Custom Filtering: You could add a where_expression to further restrict the data Elementary tests on, but this won’t dynamically skip incomplete days—it will only filter rows within the selected bucket. - Feature Request: If this is a recurring issue, consider upvoting or contributing to the relevant feature request on GitHub, as the Elementary team is aware of this need [Slack discussion](https://slack.com/archives/C02CTC89LAX/p1680016519796649). ### Summary - Elementary tests only completed buckets (usually yesterday), but if yesterday’s data is incomplete, it will still be tested and may cause false positives. - There is no built-in way to automatically skip to the last fully loaded day (e.g., two days ago) if yesterday is incomplete. - Best practice: Schedule your tests after data loads are complete, or monitor for future updates from Elementary that may address this feature. If you need help with scheduling or want to discuss a more advanced workaround, let me know!Adonis HARROUK
11/26/2025, 11:22 AMkapa.ai
11/26/2025, 11:22 AMkapa.ai
11/26/2025, 11:22 AMtimestamp_column: "DATE_ADD(ranking_date, INTERVAL 1 DAY)" is officially supported in Elementary’s test configuration. The documentation and Slack discussions indicate that the timestamp_column parameter expects a column name, and while there have been user requests to support calculated fields or expressions, this is not currently a documented feature [Slack discussion](https://elementary-community.slack.com/archives/C02CTC89LAX/p1683764020831119). A collaborator suggested the idea of supporting calculated fields or a convert_timezone config, but as of now, this is not implemented. The recommended approach remains to use a column name for timestamp_column and, if needed, create a new column in your model or staging layer that contains the adjusted date, then reference that column in your test configuration. In summary: Using an expression like DATE_ADD(ranking_date, INTERVAL 1 DAY) directly in the timestamp_column parameter is not officially supported according to the current knowledge sources. If you need this logic, you should create a new column in your model with the adjusted date and use that column as your timestamp_column [Slack discussion](https://elementary-community.slack.com/archives/C02CTC89LAX/p1683764020831119).