Florian Dawans
11/19/2025, 8:47 AMkapa.ai
11/19/2025, 8:47 AMkapa.ai
11/19/2025, 8:47 AMFlorian Dawans
11/19/2025, 8:50 AMkapa.ai
11/19/2025, 8:50 AMkapa.ai
11/19/2025, 8:51 AMFlorian Dawans
11/19/2025, 8:53 AMkapa.ai
11/19/2025, 8:53 AMkapa.ai
11/19/2025, 8:53 AMyaml models: elementary: +schema: elementary +enabled: "{{ target.name == 'prod' }}" With this setup, Elementary models (including data monitors and alerting) will not run in PR or CI environments where the target name is not 'prod', effectively suppressing alerts from those runs. This approach has been confirmed as effective by community members and support staff in the Elementary Slack community [Slack discussion](https://slack.com/archives/C02CTC89LAX/p1738778909958349). Make sure your PR jobs are using a different target name than production, and verify your dbt_project.yml is set up accordingly.Florian Dawans
11/24/2025, 3:46 PMkapa.ai
11/24/2025, 3:46 PMkapa.ai
11/24/2025, 3:46 PMyaml vars: disable_warn_alerts: false This will enable Slack alerts for both warn and error freshness statuses when you run edr monitor. If this variable is not set (or set to true), only error alerts will be sent for freshness issues [Slack discussion](https://slack.com/archives/C02CTC89LAX/p1689088826025229).Florian Dawans
12/03/2025, 10:20 AMkapa.ai
12/03/2025, 10:20 AMkapa.ai
12/03/2025, 10:20 AM-tz, --timezone option is a general CLI option that can be used with Elementary commands (it’s documented in the shared CLI options list), and it controls “the timezone that will be used upon calculating the alerts’ time field.” [[CLI options](https://docs.elementary-data.com/oss/cli-commands#cli-options)] However, from the community discussions: - It is supported for alerts (i.e., with edr monitor). [[Slack Q&A timezone](https://elementary-community.slack.com/archives/C02CTC89LAX/p1694165297650309); [CLI options](https://docs.elementary-data.com/oss/cli-commands#cli-options)] - It is not currently supported for the report summary sent by edr send-report, and the maintainer explicitly confirmed that limitation. [[GH issue 1879](https://github.com/elementary-data/elementary/issues/1879)] The docs and threads you provided do not explicitly confirm or show an example of --timezone being used with edr report itself, only with edr monitor and as a global CLI option. Because of that, I can confidently say: - You can use -tz/--timezone with edr monitor. - The knowledge sources do not clearly state that -tz/--timezone affects edr report, so I can’t guarantee it applies there based on the available documentation.Florian Dawans
12/04/2025, 1:12 PMkapa.ai
12/04/2025, 1:12 PMkapa.ai
12/04/2025, 1:12 PMdetection_period controls which recent time buckets are checked for anomalies. When you set: yaml detection_period: period: day count: 1 it means: - Only data points in the last 1 day (1 detection period) are in the detection set and can be flagged anomalous. [[detection_period](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/detection-period); [how it works](https://docs.elementary-data.com/data-tests/how-anomaly-detection-works)] - All earlier buckets (still within the training_period) are used only to learn the “normal” behavior (the training set), not to trigger alerts. [[how it works](https://docs.elementary-data.com/data-tests/how-anomaly-detection-works)] Important implementation detail: - For daily buckets, “1 day” means the last full daily bucket, not “last 24 rolling hours”. So with daily time_bucket, a detection_period of 1 day will typically evaluate yesterday’s bucket (midnight–midnight), not partial data from today. [[detection_period issue discussion](https://github.com/elementary-data/elementary/issues/1523)]Florian Dawans
12/04/2025, 1:15 PMkapa.ai
12/04/2025, 1:15 PMkapa.ai
12/04/2025, 1:15 PMdetection_delay if you want to test “yesterday” (the last complete day). Here’s how the two work together: yaml detection_period: period: day count: 1 detection_delay: period: day count: 1 - detection_period = length of the window you test for anomalies (1 day). [[detection period](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/detection-period)] - detection_delay = how far back you shift that window, to ignore the most recent data (often “today”, which may be partial). [[detection delay](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/detection-delay)] With this combo, Elementary will: - Skip the latest 1 day (today), - Evaluate anomalies for the day before that (yesterday’s full bucket). So if your goal is to detect anomalies for the previous complete day, your current settings are correct and you should not remove detection_delay.Florian Dawans
12/04/2025, 1:16 PMtime_bucket, a detection_period of 1 day will typically evaluate yesterday’s bucket (midnight–midnight), not partial data from today_kapa.ai
12/04/2025, 1:16 PMkapa.ai
12/04/2025, 1:16 PMdetection_period: 1 day does detection_period defines how long the detection window is, not how far back it is shifted. With: yaml detection_period: period: day count: 1 Elementary will look for anomalies in a 1‑day detection window. [[detection period](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/detection-period)] With daily time_bucket, that window is applied over completed daily buckets only – “The test will only run on completed time buckets”. [[volume anomalies](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/volume-anomalies)] However, by itself, detection_period: 1 day does not guarantee “yesterday only” in all situations; the exact cut is implemented in SQL and there has been confusion/bugs around it (non‑strict >= in the detection filter, etc.). [[GH issue 1523](https://github.com/elementary-data/elementary/issues/1523)] ### 2. What detection_delay: 1 day adds detection_delay is the only explicit knob to skip the most recent data: yaml detection_delay: period: day count: 1 > “The duration for retracting the detection period… useful when the latest data should be excluded from the test (e.g. test runs before table is fully populated). It does not affect detection_period or training_period.” [[detection delay](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/detection-delay)] So, with: yaml time_bucket: period: day count: 1 detection_period: period: day count: 1 detection_delay: period: day count: 1 the logic is: - Use daily completed buckets. - Ignore the last 1 day (today’s bucket, or the most recent full bucket). - Detect anomalies on the 1‑day window immediately before that → effectively “yesterday” in a daily pipeline that loads with one‑day delay. [[detection delay](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/detection-delay)] ### 3. So should you remove detection_delay? If your data for the previous day is only complete with one day lag (common case), and you want to test “yesterday” as of today’s run: - You should keep detection_delay: 1 day. - It ensures the detection window is shifted back so that you are not looking at an in‑flight or misaligned latest bucket. [[detection delay](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/detection-delay)] If, instead, you want to test the most recent full bucket with no delay (e.g. data is complete as soon as the day closes and your run is late enough), then you could remove detection_delay and rely on detection_period alone plus the “completed buckets only” rule. But note that the open GitHub issue around detection_period semantics shows some edge‑case confusion, so the behavior there has not been fully clarified/fixed yet. [[GH issue 1523](https://github.com/elementary-data/elementary/issues/1523)] Given the current docs, using detection_delay: 1 day is the safest and most explicit way to guarantee that you’re checking the prior day, not the most recent bucket.Florian Dawans
12/09/2025, 9:42 AMkapa.ai
12/09/2025, 9:42 AMkapa.ai
12/09/2025, 9:43 AMedr monitor run, it sends any pending alerts from the last N days. [[Slack pending alerts](https://elementary-community.slack.com/archives/C02CTC89LAX/p1682315767505949); [GitHub 1972 comments](https://github.com/elementary-data/elementary/issues/1972)] This means: - A failure yesterday can still generate an alert today, even if today’s run passed, if: - edr monitor didn’t run (or couldn’t write) yesterday, or - the alert stayed in a pending state. So first question: are you running edr monitor after every dbt test/run, or on a different schedule? If you want alerts to reflect only the latest state, the current workaround many users take is to run edr monitor right after every dbt execution. [[Slack latest state discussion](https://elementary-community.slack.com/archives/C02CTC89LAX/p1712245885735629)] --- ### 2. Check if alerts are staying “pending” Look at your Elementary schema (warehouse): 1. For OSS, check the alerts tables: - alerts / alerts_dbt_tests / alerts_models / alerts_source_freshness (exact tables depend on your version). 2. Inspect whether old alerts have sent_at populated or NULL. Example from a similar case: many alerts had sent_at still NULL, so Elementary kept trying to send them again. [[Slack Redshift sent_at issue](https://elementary-community.slack.com/archives/C02CTC89LAX/p1684173645049519)] If you see: - Many rows with sent_at IS NULL for old failures → alerts are not being marked as sent. Then: - Verify that the user Elementary uses has INSERT/UPDATE privileges on the Elementary schema and alert tables. [[Permissions check thread](https://elementary-community.slack.com/archives/C02CTC89LAX/p1684173645049519)] Also note there was a known Redshift / dbt-redshift issue where run-operation didn’t commit updates, so sent_at never got written, causing repeated alerts. [[Slack Redshift root cause](https://elementary-community.slack.com/archives/C02CTC89LAX/p1684173645049519)] --- ### 3. Check for duplicate senders If you are on Elementary Cloud and also running the CLI edr monitor in your DAG, both can send alerts: - This leads to duplicates or alerts appearing “again” when the DAG re‑runs. [[Slack double alerts cloud+CLI](https://elementary-community.slack.com/archives/C02CTC89LAX/p1690801293721309)] To debug: - Confirm whether Elementary Cloud is enabled for the same environment. - If yes, and you still run edr monitor in Airflow / CI, remove the CLI part and let Cloud handle alerts. --- ### 4. Confirm test failures really exist only in older runs Sometimes what looks like a “ghost” alert is actually: - A failure from a local run against production, or - Another job writing artifacts into the same Elementary schema. Those failures can surface later as alerts, even if your main production job is green. [[Slack local runs causing repeats](https://elementary-community.slack.com/archives/C02CTC89LAX/p1747400841069959)] To debug: - Check dbt_invocations / test results tables for runs from: - Local machines - Other CI jobs / DAGs - Consider: - Running local dbt against a separate target. - Or disabling artifact uploads for non‑prod targets using the on‑run-end hooks config. [[Disable artifact upload](https://elementary-community.slack.com/archives/C02CTC89LAX/p1747400841069959)] --- ### 5. Look at the monitor logs and macros being run When edr monitor runs, it: - Queries “pending” alerts via macros like: - get_pending_model_alerts - get_pending_source_freshness_alerts - Then updates them to “sent”. [[Slack logs with get_pending_*](https://elementary-community.slack.com/archives/C02CTC89LAX/p1694422097058109)] To debug: - Check edr.log and the internal dbt log for the monitor project: - It’s under the elementary/monitor/dbt_project/logs/dbt.log path in your Python env. [[Internal project log location](https://elementary-community.slack.com/archives/C02CTC89LAX/p1684173645049519)] - Verify those macros complete without errors and that “update sent times” queries are not failing silently. --- ### 6. Specific patterns to watch for From similar reported cases: - Source freshness alerts resent after dbt run Past‑day freshness alerts were marked sent, then later changed back to pending after another run, and resent. [[Slack source freshness repeating](https://elementary-community.slack.com/archives/C02CTC89LAX/p1698758233878939)] - Delayed warn alerts warn-severity singular tests appeared a day late because of a suppression or hidden config; overriding with --suppression-interval 0 helped debug. [[Slack delayed warn alerts](https://elementary-community.slack.com/archives/C02CTC89LAX/p1737531383494819)] If you see a consistent 24h delay, try: bash edr monitor --override-dbt-project-config --suppression-interval 0 and see if the behavior changes. [[Slack delayed warn alerts](https://elementary-community.slack.com/archives/C02CTC89LAX/p1737531383494819)] --- ### 7. Current limitation: “only latest state” alerts Multiple users have asked for: “only send alerts for the latest run / don’t alert if the issue is already fixed.” Today: - Elementary will send an alert for a failure once it’s recorded, even if a later run already passed before the alert fires. [[Slack lifecycle discussion](https://elementary-community.slack.com/archives/C02CTC89LAX/p1690801293721309); [Slack same concern](https://elementary-community.slack.com/archives/C02CTC89LAX/p1712245885735629); [GitHub issue 1972](https://github.com/elementary-data/elementary/issues/1972)] The main mitigations are: - Run edr monitor as close as possible to each dbt run. - Avoid extra runs (local, CI) writing into the same Elementary schema. - Ensure sent_at is updated correctly so alerts are not resent. --- ### If you share more details If you can share: - How/when you run dbt test and edr monitor, - Whether you use Cloud + CLI together, - Which warehouse & adapter you use, I can point you to the most likely cause among the patterns above and suggest a narrower next step (e.g., specific queries to run on your Elementary schema).Florian Dawans
12/09/2025, 9:44 AMkapa.ai
12/09/2025, 9:44 AMkapa.ai
12/09/2025, 9:45 AMbash dbt run --select elementary.edr.dbt_artifacts This runs the dbt_artifacts models (e.g. dbt_models, dbt_tests, dbt_sources, etc.) which keep your project metadata up to date. This is exactly what we recommend when you disable the automatic artifact upload (disable_dbt_artifacts_autoupload: true) and want to refresh artifacts manually after code/config changes. [[On‑run‑end hooks](https://docs.elementary-data.com/dbt/on-run-end_hooks); [dbt artifacts](https://docs.elementary-data.com/dbt/dbt-artifacts); [Slack manual artifacts run](https://elementary-community.slack.com/archives/C02CTC89LAX/p1688041433774369)] A typical pattern when hooks are disabled is: 1. Run your regular dbt run / dbt test jobs (results still go to dbt_run_results, elementary_test_results via on‑run‑end). [[On‑run‑end hooks](https://docs.elementary-data.com/dbt/on-run-end_hooks)] 2. Periodically (e.g. on deploy / after schema changes) run: bash dbt run --select elementary.edr.dbt_artifacts to refresh metadata. [[On‑run‑end hooks](https://docs.elementary-data.com/dbt/on-run-end_hooks)] So yes: using that command after your dbt test or as part of your deployment process is the correct way to keep Elementary’s artifact tables current when you manage artifact uploads manually.Florian Dawans
12/09/2025, 1:14 PMkapa.ai
12/09/2025, 1:14 PMkapa.ai
12/09/2025, 1:15 PMID_app and alerts on abnormal changes. Breaking it down: yaml - elementary.dimension_anomalies: config: severity: error arguments: timestamp_column: DT_installation detection_period: period: week count: 1 detection_delay: period: day count: 1 dimensions: - ID_app meta: description: "Adjust - Anomaly detection on weekly installs" What it does: - Test type: elementary.dimension_anomalies Counts rows grouped by the configured dimensions and looks for unexpected changes in that distribution over time. [[Dimension anomalies](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/dimension-anomalies)] - Dimension: ID_app The test groups by ID_app and monitors the row count per app as the metric. [[dimensions config](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/dimensions)] - Time axis: timestamp_column: DT_installation Elementary uses DT_installation to build time buckets (here, weeks). If timestamp_column is configured, the distribution is collected per time_bucket instead of over all history. [[timestamp_column](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/timestamp-column); [dimension anomalies behavior](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/dimension-anomalies)] - Detection window: yaml detection_period: period: week count: 1 Elementary will search for anomalies only in the last 1-week detection period (the detection set). [[detection_period](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/detection-period); [how it works](https://docs.elementary-data.com/data-tests/how-anomaly-detection-works)] - Detection delay: yaml detection_delay: period: day count: 1 Shifts the detection window back by 1 day, excluding the most recent day (to avoid testing partially loaded data). It doesn’t change the length of detection_period, only moves it back in time. [[detection_delay](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/detection-delay)] - Training vs detection: Historical weekly per‑`ID_app` counts (within the training period; default if not overridden) form the training set used to compute the expected range, and the shifted 1‑week detection window is the detection set compared against it. [[How anomaly tests work](https://docs.elementary-data.com/data-tests/how-anomaly-detection-works)] - Severity: severity: error If an anomaly is detected (e.g., a spike or drop in weekly installs for a specific ID_app), the dbt test will fail with error severity, which can then trigger error-level alerts/behavior in your pipelines. (Severity behavior is standard dbt test config; Elementary respects it for its tests.) [[Add tests + severity hint](https://docs.elementary-data.com/data-tests/add-elementary-tests#configure-your-elementary-anomaly-detection-tests)] In effect: this test flags apps whose weekly install count (based on DT_installation) looks anomalously high or low, evaluated over a 1‑week window that excludes the most recent day, and treats such anomalies as errors.Florian Dawans
12/09/2025, 4:22 PMkapa.ai
12/09/2025, 4:22 PMkapa.ai
12/09/2025, 4:22 PMelementary.column_anomalies with null_percent should write metrics into data_monitoring_metrics, and those metrics are what metrics_anomaly_score reads. It is not limited to sum anomalies. From the docs: - elementary.column_anomalies “executes column level monitors and anomaly detection on the column”; all supported column monitors (including null_percent) are part of the same framework. [[Column anomalies test](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/column-anomalies); [column monitors list](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/column-anomalies)] - Anomaly detection tests store their metrics in `data_monitoring_metrics`; metrics_anomaly_score is a view on that table “that runs the same query the anomaly detection tests run to calculate anomaly scores.” [[Anomaly detection models](https://docs.elementary-data.com/dbt/package-models#anomaly-detection)] So, for your config: yaml data_tests: - elementary.column_anomalies: config: severity: warn tags: anomaly arguments: column_anomalies: - null_percent timestamp_column: DT_creation you should expect: 1. Metrics rows (with metric_name = 'null_percent') in elementary.data_monitoring_metrics. 2. Corresponding anomaly scores in elementary.metrics_anomaly_score once there is enough history and the test has run multiple times. The only caveats the sources mention: - If there’s not enough historical data, the test may return “Not enough data to calculate anomaly score” and you won’t see anomaly rows yet, even though metrics start accumulating. [[Insufficient data case](https://elementary-community.slack.com/archives/C02CTC89LAX/p1687331770365499)] - sum is just an opt‑in monitor; it uses the same mechanism as the default monitors like null_percent. [[Column monitors list](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/column-anomalies)] If you don’t see null_percent in data_monitoring_metrics, the next debugging step is to query that table filtered by your model/column and check whether any column metrics are being written.Florian Dawans
12/09/2025, 4:26 PMkapa.ai
12/09/2025, 4:26 PMkapa.ai
12/09/2025, 4:27 PMcolumn_anomalies test with null_percent + timestamp_column, it should write metrics that end up in metrics_anomaly_score (not only sum). [[Column anomalies](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/column-anomalies); [Anomaly models](https://docs.elementary-data.com/dbt/package-models#anomaly-detection)] Since it works for one user but not another, the most likely causes (based on similar Slack threads) are: 1. Different dbt / Elementary versions There were bugs in some versions where: - Metrics weren’t written to data_monitoring_metrics, or - Column anomaly metrics didn’t show up in the UI / score models until upgrading. [[Freshness bug 0.8.1](https://elementary-community.slack.com/archives/C02CTC89LAX/p1689669432523659); [column_anomalies “Not enough data” bug 0.8.1](https://elementary-community.slack.com/archives/C02CTC89LAX/p1688298056468299)] Check that both users are on the same Elementary package version and dbt version. 2. Different configuration / syntax Small YAML differences can cause the test to compile but not actually collect metrics: - column_anomalies must be a list, not a string; otherwise you get “Not enough data to calculate anomaly score” / no metrics. [[column_anomalies must be list](https://elementary-community.slack.com/archives/C02CTC89LAX/p1688298056468299)] - Indentation / structure issues can cause one user’s config to fall back to defaults (or not run the anomaly macro at all). [[Indentation issue causing extra metrics](https://elementary-community.slack.com/archives/C02CTC89LAX/p1759179499606799)] Compare the exact YAML that each user is running (including dbt_project.yml vars like training_period, days_back, global elementary config). 3. Different execution / environment In several cases anomalies worked in one env but not another because: - Elementary was disabled in a dev target via +enabled: "{{ false if target.name == 'dev' else true }}". [[all_columns_anomalies missing from report](https://elementary-community.slack.com/archives/C02CTC89LAX/p1673608521417509)] - One user ran tests in dev where Elementary models/test collection were off. [[Freshness anomalies on dev](https://elementary-community.slack.com/archives/C02CTC89LAX/p1689669432523659)] Verify both users: - Use the same target (profiles.yml / dbt Cloud environment), - Hit the same warehouse/schema for elementary models. 4. Not enough data collected yet for one user Anomaly scores appear only after there are **≥ 7 training data points**; before that you may see “Not enough data to calculate anomaly score” and nothing in metrics_anomaly_score, even though data_monitoring_metrics is populating. [[Troubleshooting guide](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/Anomaly-troubleshooting-guide)] For the user where it “doesn’t work”: - Check `data_monitoring_metrics`: sql SELECT * FROM elementary.data_monitoring_metrics WHERE table_name = '<your_model>' AND column_name = 'account_id' -- or your column AND metric_name = 'null_percent' ORDER BY metric_timestamp DESC; - If there are rows here but none in metrics_anomaly_score, they probably don’t yet have enough history. [[Troubleshooting guide](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/Anomaly-troubleshooting-guide)] 5. Package upgrade but models not re‑run After upgrading Elementary, users have had metrics missing until they ran the Elementary models again: bash dbt run -s elementary This fixed several anomaly‑related issues. [[Upgrade then run elementary](https://elementary-community.slack.com/archives/C02CTC89LAX/p1681298359181089)] --- How to narrow it down For the user where it “doesn’t work”: 1. Confirm their Elementary package + dbt versions match the working user. 2. Run: bash dbt test --select tag:anomaly dbt run --select elementary 3. Query: sql -- metrics collected? SELECT * FROM elementary.data_monitoring_metrics WHERE table_name = '<your_model>' AND column_name = '<your_column>' AND metric_name = 'null_percent'; -- anomaly scores? SELECT * FROM elementary.metrics_anomaly_score WHERE table_name = '<your_model>' AND column_name = '<your_column>' AND metric_name = 'null_percent'; If you share which of these queries return rows (for each user), I can point to the exact likely cause based on the patterns above.Florian Dawans
12/09/2025, 4:28 PMkapa.ai
12/09/2025, 4:28 PMkapa.ai
12/09/2025, 4:28 PMpackages.yml in the dbt project and look for the Elementary entry: yaml packages: - package: elementary-data/elementary version: ... This is the dbt package version used by dbt runs. [[Upgrade advice](https://elementary-community.slack.com/archives/C02CTC89LAX/p1684952078647519); [Version check in packages.yml](https://elementary-community.slack.com/archives/C02CTC89LAX/p1697209544439999)] 2. Elementary Python/CLI (edr) version On the machine/CI where edr runs, execute: bash pip show elementary-data This prints the installed CLI version. [[CLI version workaround](https://elementary-community.slack.com/archives/C02CTC89LAX/p1681874868916669)] 3. Version recorded in your warehouse by Elementary Elementary also records its version in the dbt_invocations table. You can query: sql SELECT elementary_version FROM <ELEMENTARY_SCHEMA>.dbt_invocations ORDER BY generated_at DESC LIMIT 1; This returns the version associated with the latest run that wrote metadata. [[Version from dbt_invocations](https://elementary-community.slack.com/archives/C02CTC89LAX/p1674726838236829); [How edr gets version](https://elementary-community.slack.com/archives/C02CTC89LAX/p1678787357601019)]Florian Dawans
12/09/2025, 4:31 PMkapa.ai
12/09/2025, 4:31 PMkapa.ai
12/09/2025, 4:31 PMdata_monitoring_metrics is empty, it means no anomaly‑detection metrics are being collected yet. All the anomaly tests (volume_anomalies, column_anomalies, dimension_anomalies, freshness_anomalies) write their metrics into this table, so it must have data before metrics_anomaly_score will show anything. [[Metrics table purpose](https://elementary-community.slack.com/archives/C02CTC89LAX/p1688373015213789?thread_ts=1688373015.213789&cid=C02CTC89LAX)] Here’s how to debug: --- ### 1. Confirm you’re actually running anomaly tests Only anomaly tests populate data_monitoring_metrics. Regular dbt tests do not. [[Metrics table purpose](https://elementary-community.slack.com/archives/C02CTC89LAX/p1688373015213789?thread_ts=1688373015.213789&cid=C02CTC89LAX)] Make sure you have tests like: yaml data_tests: - elementary.column_anomalies: arguments: column_anomalies: - null_percent timestamp_column: DT_creation and that you’re running: bash dbt test --select <your_model_or_tag> Double‑check the YAML structure matches the docs for anomaly tests. [[column_anomalies docs](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/column-anomalies)] --- ### 2. Run the Elementary models after configuring tests After adding or changing anomaly tests, Elementary often needs its internal models refreshed: bash dbt run -s elementary This step has fixed missing anomaly data for others after changes/upgrades. [[Run elementary after upgrade](https://elementary-community.slack.com/archives/C02CTC89LAX/p1681298359181089?thread_ts=1681298359.181089&cid=C02CTC89LAX)] --- ### 3. Check that anomaly tests actually succeed If the anomaly test fails to compile or run, no metrics will be written. Look in your dbt.log and edr.log for the failing test name. In multiple cases, compilation errors (wrong timestamp type, bad config) prevented data_monitoring_metrics from being populated. [[Freshness anomalies compilation error](https://elementary-community.slack.com/archives/C02CTC89LAX/p1689669432523659?thread_ts=1689669432.523659&cid=C02CTC89LAX)] --- ### 4. Verify timestamp configuration (if used) If you use `timestamp_column`: - Ensure the column exists and is of type `timestamp`/`date`. - Check for `NULL`s in that column; bad timestamps can prevent buckets from being created and metrics from being written. [[Anomaly troubleshooting](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/Anomaly-troubleshooting-guide)] If you run the test without a timestamp: - Metrics are collected per test run using run time as the “timestamp”; you must run the test multiple times (different days/buckets) to see enough points, but you should still see rows appear in data_monitoring_metrics as you run it. [[Anomaly troubleshooting – non‑timestamp tests](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/Anomaly-troubleshooting-guide)] --- ### 5. Environment / schema mismatch Make sure you’re querying the same Elementary schema and database that your tests write to. A similar issue happened when users looked in a different schema than where data_monitoring_metrics was actually created. [[Wrong table name/schema example](https://elementary-community.slack.com/archives/C02CTC89LAX/p1681849464180719?thread_ts=1681849464.180719&cid=C02CTC89LAX)] --- ### 6. Version issues Some older package versions had bugs where anomaly metrics were not written correctly; upgrading fixed the problem. [[Freshness anomalies bug in 0.8.1](https://elementary-community.slack.com/archives/C02CTC89LAX/p1689669432523659?thread_ts=1689669432.523659&cid=C02CTC89LAX)] Check: - The Elementary dbt package version in packages.yml. - Consider running dbt deps to update to a newer compatible version, then dbt run -s elementary and re‑run your anomaly tests. --- If you share: - The exact YAML for one of your anomaly tests, - Your Elementary package version, - And confirm whether those tests appear in elementary_test_results, I can point you to the most likely missing piece based on the patterns above.Florian Dawans
12/09/2025, 4:35 PMkapa.ai
12/09/2025, 4:35 PMkapa.ai
12/09/2025, 4:35 PManomaly_sensitivity test argument (per‑test) [[anomaly_sensitivity](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/anomaly-sensitivity)] - and, in older docs, a global anomaly_score_threshold var. [[Anomaly method](https://docs.elementary-data.com/data-tests/data-anomaly-detection)] Lower sensitivity (e.g. 1.5) → narrower expected range → **more anomalies**; higher sensitivity (e.g. 4) → wider range → fewer anomalies. [[anomaly_sensitivity](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/anomaly-sensitivity)] 3. Additional conditions A point is only evaluated as a potential anomaly if: - It is in the detection period, not just the training period. [[How tests work](https://docs.elementary-data.com/data-tests/how-anomaly-detection-works)] - There is enough history: at least **7 training data points**; otherwise you get “Not enough data to calculate anomaly”. [[Anomaly troubleshooting](https://docs.elementary-data.com/data-tests/anomaly-detection-tests/Anomaly-troubleshooting-guide)] So in OSS: an anomaly occurs when a value in the detection period has an absolute Z‑score above the configured sensitivity (default 3), with sufficient training data.