Skip to content

Commit 4f7d3fd

Browse files
committed
Use backwards comaptible versions of timestamp macro
1 parent 25e4393 commit 4f7d3fd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

integration_tests/models/generic_tests/test_recency.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
select
55
1 as col1,
66
2 as col2,
7-
{{ date_trunc('day', current_timestamp()) }} as today
7+
{{ date_trunc('day', current_timestamp_backcompat()) }} as today
88

99
{% else %}
1010

1111
select
1212
1 as col1,
1313
2 as col2,
14-
cast({{ date_trunc('day', current_timestamp()) }} as datetime) as today
14+
cast({{ date_trunc('day', current_timestamp_backcompat()) }} as datetime) as today
1515

1616
{% endif %}

macros/generic_tests/recency.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{% macro default__test_recency(model, field, datepart, interval, group_by_columns) %}
66

7-
{% set threshold = dateadd(datepart, interval * -1, current_timestamp()) %}
7+
{% set threshold = dateadd(datepart, interval * -1, current_timestamp_backcompat()) %}
88
{% if group_by_columns|length() > 0 %}
99
{% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}
1010
{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}

0 commit comments

Comments
 (0)