Hello all, I am struggling to get freshness anomal...
# community-support
r
Hello all, I am struggling to get freshness anomalies working on my dbt models. I created a test dataset designed to fail. The max date is 3 days ago and there are 10 rows for each day. It looks like this:
When I run my tests they succeed when I believe they should fail. Here is my yml file:
Copy code
- name: elementary_test_data
    tests:
      - elementary.freshness_anomalies:
          #anomaly_direction: both
          timestamp_column: time_field
          # where_expression: < sql expression >
          time_bucket: 
            period: day # Default day: Buckets data by day and looks at max time without update for each bucket
            count: 1
          # anomaly_direction: spike # "to alert only on delays"
          training_period: 
            period: day # Default Day
            count: 14 # Default 14: lookback n buckets to train on
          detection_period: 
            period: day
            count: 1 # 2
n
Hey @Ryan Silva! It seems that all the data is from the same day, so there's only one time bucket. Can you try it with 14 days back as you configured? 🙂
r
The picture is just the first 10 rows sorted desc. There are actually 20 days in the data, 10 rows each.
n
Got it, apologize for the confusion! Let me take another look
Are you using the UI to visualize the results? Seeing the graph would be very helpful to understand why the test isn't failing
r
No, we wanted to just use the cli as a proof of concept before digging in further. Is there a way to see this unpaid?
n
Absolutely, I'm referring to the static HTML report generated on
edr report
. Can you please share how the graph of this test looks?
r
Im actually on my phone, not at the work computer. Can I send that here tomorrow?
n
Of course 🙂
r
Thank you for your help! I appreciate it
🙏 1