<@U088WCP3B4P> is there a way to exclude certain r...
# ask-elementary-ai
s
@kapa.ai is there a way to exclude certain rows from data tests if we have already triaged the issue and are in the process of fixing it. effectively hitting 'snooze' for a period of time
k
A message from kapa.ai
Based on the knowledge sources, there are several approaches to exclude or "snooze" certain test failures in Elementary Data: ### For Anomaly Tests 1. Using
anomaly_exclude_metrics
: You can exclude specific metrics from being considered in anomaly detection. This is useful when you have known incidents that you don't want to trigger alerts for. [Anomaly Exclude Metrics Documentation](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/anomaly-exclude-metrics) 2. Using
where_expression
: You can add a where clause to filter out specific rows from your test. [GitHub Issue Discussion](https://github.com/elementary-data/elementary/issues/980) 3. Using
detection_delay
: If your issue is related to timing of data loads, you can configure a delay period for anomaly tests to ignore recent data. [Detection Delay Documentation](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/detection-delay) 4. Using
ignore_small_changes
: For cases where small variations shouldn't trigger alerts, especially in relatively static tables. [Ignore Small Changes Documentation](https://docs.elementary-data.com/data-tests/anomaly-detection-configuration/ignore_small_changes) 5. Using
backfill_days
: You can adjust the detection period for which the test is supposed to fail. [Backfill Days Documentation](https://docs.elementary-data.com/guides/anomaly-detection-configuration/backfill-days) ### For Alerts and Reports 1. Using tags and selectors: You can tag models and then use selectors to include/exclude specific models when running alerts.
Copy code
# In dbt_project.yml    models:      <your_project_name>:        +tags: critical        # For models to exclude    version: 2    models:      - name: <your_model_name>        config:          tags: not-critical        # Then run    edr monitor --select tag:critical
2. Using
--days-back
parameter
: Limit alerts to a specific timeframe.
Copy code
edr monitor --days-back 1
Note that Elementary has recognized the need for a proper "snooze" feature, as mentioned in one of the Slack discussions, but it doesn't appear to be implemented yet as a dedicated feature.
n
Hey @Stuart Turner! 🙂 You can also use the suppression interval flag so you don't get the same alert for the same test for a configured amount of time. https://docs.elementary-data.com/oss/guides/alerts/alerts-configuration#suppression-interval-flag