``` - name: model description: "Automatically...
# community-support
j
Copy code
- name: model
    description: "Automatically generated test for model"
    config:
      elementary:
        timestamp_column: "filewindow"
    tests:
      - elementary.volume_anomalies:
          anomaly_direction: both
          ignore_small_changes:
            spike_failure_percent_threshold: 50  # warn if row count increases by 50% or more
            drop_failure_percent_threshold: 30   # warn if row count decreases by 30% or more
          fail_on_zero: true #If the table has zero rows for a time bucket (day), the test will fail.
          time_bucket:
            period: day
            count: 1 #Groups data into daily buckets
          detection_period:
            period: day
            count: 1 #Detects anomalies in the most recent full day - YESTERDAY
          training_period:
            period: week
            count: 1 # Learns from the last week
         # optional - use tags to run elementary tests on a dedicated run
          tags: [ "bronze", "volume_anomaly" ]
          config:
            severity: warn
n
Hey! Can you please share the screenshot from your Elementary report? Note that the average and the expected range are include the most recent value in the calculation, I believe this is the reason the results may be surprising.
👍 1
j
Screenshot 2025-02-20 at 16.41.40.png
Looks like the expected value is increasing every day. What does this value represents, is it a sum of all the previous values?
n
The expected range for Feb 19th to 20th bucket is also determined by the value of this bucket. Essentially, the detection and training periods overlap (a larger detection period would minimize the final effect). Hope this is clear! 🙂
👍 1