Damian Eralio
01/23/2024, 8:33 PM- elementary.volume_anomalies:
timestamp_column: "process_ended_at_utc"
fail_on_zero: trueElla Katz
01/24/2024, 7:56 AMprocess_endedn_at_utc > '2024-01-23'?Damian Eralio
01/24/2024, 2:11 PMprocess_ended_at_utc would therefore be = '2024-01-23' not > '2024-01-23'
Of course, if we use timestamp instead of date format, those records are > '2024-01-23 00:00:00'Damian Eralio
01/24/2024, 2:43 PM2024-01-22, because the bucket Elementary used for that date was 2024-01-21 00:00:00 - 2024-01-22 00:00:00.
As a result, we were only alerted to the 0 records when the test ran on 2024-01-23, which used the bucket 2024-01-22 00:00:00 - 2024-01-23 00:00:00
So, essentially, each day’s bucket ends when the day begins.
As you can see in the image, the latest test run was 2024-01-23 14:07:54 . Looking in the database, there were thousands of records loaded after 2024-01-23 00:00:00 but they won’t show up until the test is run on 2024-01-24
The reason this is counterintuitive is because the dashboard appears to indicate 0 records on 2024-01-23. However, we know that by inspecting further the 0 record day was actually 2024-01-22Ella Katz
01/24/2024, 2:47 PMDamian Eralio
01/24/2024, 2:57 PM2024-01-23 only to look closer and find out that the data tested on that date is for the day prior. Something to consider.Damian Eralio
01/24/2024, 2:58 PMElla Katz
01/24/2024, 2:59 PMDamian Eralio
01/24/2024, 4:56 PM00:00:00 - 08:00:00
08:00:00 - 16:00:00
16:00:00 - 00:00:00
This test was run at 113738 MT, which is 163738 UTC. So 2 or the 3 buckets for today have been completed and show up on the results.
Obviously this small time bucket will lead to more alert fatigue. If the goal was to catch runs with 0 results, we are now generating a lot of false positives as we expect a number of those 8 hour buckets to have 0 results.
Perhaps we should be leaning on the dbt freshness test or looking at creating our own generic dbt test ("no new records have come in so far today")Ella Katz
01/25/2024, 7:40 AMexpect_row_values_to_have_recent_data for example)Damian Eralio
01/29/2024, 1:49 PMOfek Weiss
02/05/2024, 10:03 AMedr are you using?