Hi experts! I try to use elementary.freshness_anom...
# community-support
s
Hi experts! I try to use elementary.freshness_anomalies. How to determine that there is no data at current day? For example, I expect data to appear today. If I start test, it will analyze freshness only for previous day time_bucket: [2023-11-29T00:00 - 2023-11-30T00:00]. But I'd like time_bucket range for current timestamp too [2023-11-30T00:00 - now()]. Not to start of current date . How can I do that? My test yml below tests: - elementary.freshness_anomalies: timestamp_column: _load_date time_bucket: period: day count: 1 backfill_days: 2 days_back: 14
n
Hey @shemik7! The freshness_anomalies test is based on time buckets, to be able to compare the “current” time bucket to the previous ones and to detect an anomaly we have to test specific and exact time buckets, that is why we do not allow the option of “2023-11-30T00:00 - now()” - since this won’t necessarily consist of a whole time bucket But! if all you want to do is make sure you got data today - you can always use freshness test (not anomalies)
s
Hi Noa! Thanks for your reply! Yes, but freshness tests are not displaying in elementary dashboard. This is a problem, why I chose to use elementary.freshness_anomalies..
o
hi @shemik7, you can use
edr run-operation upload-source-freshness
to add the freshness results to the elementary dashboard https://docs.elementary-data.com/cloud/guides/collect-source-freshness