hi, im trying to configure a volume_anomalies test...
# community-support
b
hi, im trying to configure a volume_anomalies test using the fail_on_zero parameter. I am testing it on a model that has zero rows in it but the test is passing - not sure why. more details in the thread
elementary.volume_anomalies: name: row_count_down_to_prior_total anomaly_direction: drop anomaly_sensitivity: 0 fail_on_zero: true config: severity: error
looking a little deeper, it appears the query behind the test is looking in the elementary.data_monitoring_metrics table for a row where bucket_end is > a date of 14 days ago AND metric_properties has the following value: cast('{"dimensions": null, "event_timestamp": null, "freshness_column": null, "time_bucket": {"count": 1, "period": "day"}, "timestamp_column": nul, "where_expression": null}' as carchar(4096)). when i query the data_monitoring_metrics table for the table in question and the metric_name of row_count, i see that both the metric_properties column and the bucket_end columns are null for the row. why would this be?
e
Hi @Benjamin Bloch, apologies for the late response - can you try to add a timestamp column or is it not possible in this table?
b
@Ella Katz thank you for your response - appreciate it. Unfortunately it is not possible to use the timestamp column for this table. Does this option only work when there is a timestamp column available? I mainly want to use this parameter to ensure i get a test failure when the table is empty of data, which I think should be independent of whether there is a timestamp column or not, but perhaps that is not the intention of this parameter?
e
When you're running the test without fail_on_zero do you see rows in data_monitoring_metrics?