Yang Xu
06/24/2026, 1:17 PMkapa.ai
06/24/2026, 1:18 PMseverity sets the default outcome when a test fails (i.e., when neither warn_if nor error_if explicitly matches).
• warn_if and error_if define row-count thresholds that override the default severity based on how many failing rows are returned.
So with your config:
• warn_if: ">0" → warn if the result has more than 0 rows
• error_if: ">10" → error if the result has more than 10 rows
• severity: error → the base severity
In practice, error_if takes precedence over warn_if when both conditions are met. So if the result is >10 rows, it errors; if it's between 1–10 rows, it warns. The severity: error here is somewhat redundant given you've explicitly set both thresholds, but it's not contradictory.
> ⚠️ Important caveat for Elementary anomaly tests: The knowledge sources note that error_if / warn_if won't work as expected with Elementary anomaly detection tests because of how they are implemented — dbt's `error_if`/`warn_if` looks at the number of rows returned from the test query, not the anomaly value itself. [Slack: severity on anomaly tests]
2. Will a spike of 12 rows trigger an error alert in the channel? This depends on two separate layers:
Layer 1 — ignore_small_changes (does the test fail at all?)
With spike_failure_percent_threshold: 10, the test will only fail if both conditions are true:
1. The z-score is anomalous (statistically significant spike), AND
2. The spike is more than 10% above the training period mean
If your table has ~1,000 rows and 10% ≈ 100 rows, then a spike of only 12 rows (~1.2%) would not exceed the 10% threshold — so the test would pass and no alert would be sent, regardless of severity settings. [ignore_small_changes docs]
Layer 2 — error_if: ">10" (what severity if the test does fail?)
As noted above, `error_if`/`warn_if` on Elementary anomaly tests don't behave as expected because they count result rows, not anomaly magnitude. So even if the test did fail, the error_if: ">10" threshold may not work reliably for Elementary tests. [Slack: severity on anomaly tests]
Recommendation If you want explicit percentage-based warn/error thresholds for volume changes, consider using elementary.volume_threshold instead, which has built-in dual severity via warn_threshold_percent and error_threshold_percent — designed exactly for this use case. [volume_threshold docs] 👍 0 button 👎 0 button ℹ️ Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.Yang Xu
06/24/2026, 1:32 PMkapa.ai
06/24/2026, 1:32 PMelementary.volume_anomalies test.
As noted in the knowledge sources, error_if / warn_if won't work as expected with Elementary anomaly tests because of how they are implemented — dbt's `error_if`/`warn_if` looks at the number of rows returned from the test query, not the anomaly value itself. [Slack: severity on anomaly tests]
Recommended Workaround Define two separate tests with different anomaly_sensitivity values and set their severity accordingly:
- elementary.volume_anomalies:
anomaly_sensitivity: 1
config:
severity: warn
- elementary.volume_anomalies:
anomaly_sensitivity: 3
config:
severity: error
The test with lower sensitivity will trigger a warning for softer anomalies, and the test with higher sensitivity will trigger an error for more significant ones. [Slack: workaround]
Alternative: Use volume_threshold Instead If you need explicit percentage-based dual severity in a single test, consider elementary.volume_threshold, which has built-in support for both warn_threshold_percent and error_threshold_percent in one test configuration:
data_tests:
- elementary.volume_threshold:
arguments:
timestamp_column: your_timestamp_column
warn_threshold_percent: 5
error_threshold_percent: 10
[volume_threshold docs] 👍 0 button 👎 0 button ℹ️ Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.Yang Xu
06/24/2026, 1:45 PMkapa.ai
06/24/2026, 1:45 PMmeta.channel the same way on both tests (or inherit it from the model/source level).
Routing Warns and Errors to Different Channels If you want warns and errors sent to different channels, the knowledge sources indicate there is no way to do this purely through test configuration. The recommended approach is to run two separate edr monitor commands with status filters:
edr monitor --select 'statuses:warn' --slack-channel-name 'warn-channel'
edr monitor --select 'statuses:fail' --slack-channel-name 'error-channel'
[Slack: routing to different channels; Slack: two edr runs]
Alternatively, you can set a different meta.channel on each of the two separate tests directly:
- elementary.volume_anomalies:
anomaly_sensitivity: 1
config:
severity: warn
meta:
channel: warn-channel
- elementary.volume_anomalies:
anomaly_sensitivity: 3
config:
severity: error
meta:
channel: error-channel
However, the knowledge sources suggest this per-test channel approach may not reliably separate warns from errors in all cases, and the edr monitor with status filters is the more reliable method. [Slack: routing to different channels] 👍 0 button 👎 0 button ℹ️ Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.