Skip to content

Commit 73c88ed

Browse files
committed
bugfix to event freshness test
1 parent 65c39fa commit 73c88ed

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

macros/edr/data_monitoring/monitors_query/table_monitoring_query.sql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,12 @@
7777

7878
{% macro get_timestamp_table_query(monitored_table, metric_properties, timestamp_column, table_metrics, min_bucket_start, max_bucket_end, full_table_name_str) %}
7979
{%- set timestamp_col_expr = elementary.edr_cast_as_timestamp(elementary.escape_reserved_keywords(timestamp_column)) -%}
80-
{%- set event_timestamp_col_expr = elementary.edr_cast_as_timestamp(elementary.escape_reserved_keywords(event_timestamp_column)) -%}
8180

8281
with partially_time_filtered_monitored_table as (
8382
select
8483
{{ timestamp_col_expr }} as monitored_table_timestamp_column
8584
{%- if metric_properties.timestamp_column and metric_properties.event_timestamp_column %}
86-
, {{ event_timestamp_col_expr }} as monitored_table_event_timestamp_column
85+
, {{ elementary.edr_cast_as_timestamp(elementary.escape_reserved_keywords(metric_properties.event_timestamp_column)) }} as monitored_table_event_timestamp_column
8786
{%- endif %}
8887
from {{ monitored_table }}
8988
-- Freshness metric calculated differences between consecutive buckets, thus the first diff

0 commit comments

Comments
 (0)