models:
  - name: this_is_a_model
    tests:
      - elementary.volume_anomalies:
          detection_period:
            period: day
            count: 30
detection_period:
  period: < time period > # supported periods: day, week, month
  count: < number of periods >

Configuration to define the detection period. If the detection_period are set to 2 days, only data points in the last 2 days will be included in the detection period and could be flagged anomalous. If detection_period is set to 7 days, the detection period will be 7 days long.

For incremental models, this is also the period for re-calculating metrics. If metrics for buckets in the detection period were already calculated, Elementary will overwrite them. The reason behind it is to monitor recent backfills of data, if there were any. This configuration should be changed according to your data delays.

  • Default: 2 days
  • Relevant tests: Anomaly detection tests with timestamp_column
Detection Period

How it works?

The detection_period param only works for tests that have timestamp_column configuration.

It works differently according to the table materialization:

  • Regular tables and views - detection_period defines the detection period.
  • Incremental models and sources - detection_period defines the detection period, and the period for which metrics will be re-calculated.