Ryan H
09/15/2025, 8:59 PM- elementary.column_anomalies:
arguments:
column_anomalies:
- average
dimensions:
- country
seasonality: day_of_week
detection_delay:
period: day
count: 1
anomaly_sensitivity: 2
What would the training_period and detection_period be?kapa.ai
09/15/2025, 8:59 PMkapa.ai
09/15/2025, 9:00 PMtraining_period or detection_period parameters. In this case, Elementary will use the default values for these parameters. Defaults: - training_period: 14 days (by default) - detection_period: 2 days (by default) However, since you have set seasonality: day_of_week, Elementary will automatically increase the training_period to ensure there are enough data points for each day of the week. This means your actual training period will likely be longer than 14 days, depending on your data, to ensure there are enough Mondays, Tuesdays, etc., for the anomaly calculation. This behavior is documented and has been confirmed in community discussions as well [training_period documentation](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/training-period), [Slack discussion](https://slack.com/archives/C02CTC89LAX/p1730105471918989). Summary: - training_period: At least 14 days, but will be increased automatically to ensure enough data for each day of the week due to seasonality: day_of_week. - detection_period: 2 days (default), unless you override it. If you want to control these periods precisely, you should set them explicitly in your test configuration. References: - [training_period documentation](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/training-period) - [How anomaly detection works](https://docs.elementary-data.com/data-tests/how-anomaly-detection-works) - [Slack discussion on seasonality and training period](https://slack.com/archives/C02CTC89LAX/p1730105471918989)Ryan H
09/15/2025, 9:01 PMkapa.ai
09/15/2025, 9:02 PMkapa.ai
09/15/2025, 9:02 PMRyan H
09/15/2025, 9:49 PMkapa.ai
09/15/2025, 9:49 PMkapa.ai
09/15/2025, 9:49 PMconfig block with severity: warn to your test definition. Here’s how your test would look: yaml - elementary.column_anomalies: arguments: column_anomalies: - average dimensions: - country seasonality: day_of_week detection_delay: period: day count: 1 anomaly_sensitivity: 2 config: severity: warn This approach is supported and recommended in both the Elementary documentation and community discussions. Setting severity: warn ensures that anomalies will only trigger warnings and will not cause your dbt run to fail or block downstream models [Configure anomaly detection tests](https://docs.elementary-data.com/data-tests/add-elementary-tests#configure-your-elementary-anomaly-detection-tests) [Slack example](https://slack.com/archives/C02CTC89LAX/p1688028623624369).Ryan H
09/15/2025, 10:22 PMkapa.ai
09/15/2025, 10:22 PMkapa.ai
09/15/2025, 10:22 PMcountry, you can see which countries triggered an anomaly by querying the results in the following places: 1. elementary_test_results table: This table stores the results of your tests, including which dimension values (e.g., countries) triggered anomalies. You can filter for your specific test and look for rows where the test failed or was flagged as anomalous. The relevant dimension (country) will be included in the results [Slack discussion](https://slack.com/archives/C02CTC89LAX/p1737377522035139). 2. test_result_rows table: For more detailed anomaly score data (including the dimension values that triggered anomalies), you can query the test_result_rows table in your Elementary schema. This table contains the metrics and anomaly scores for each dimension value, allowing you to identify which countries had anomalies [Slack discussion](https://slack.com/archives/C02CTC89LAX/p1704824907817899). 3. Elementary UI/Report: If you are using the Elementary UI, you can also view the test results and see which dimension values (countries) triggered anomalies directly in the report interface. Summary: Query either the elementary_test_results or test_result_rows table in your Elementary schema, filtering for your test and looking at the country dimension to see which countries triggered anomalies.