Skip to content

Commit 60abe69

Browse files
authored
fix/postgres: replace unsupported timestamp_sub in pit macro
1 parent c12235c commit 60abe69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

macros/tables/postgres/pit.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pit_records AS (
8080
SELECT
8181
{{ hashkey }},
8282
{{ ldts }},
83-
COALESCE(LEAD(TIMESTAMP_SUB({{ ldts }}, INTERVAL 1 MICROSECOND)) OVER (PARTITION BY {{ hashkey }} ORDER BY {{ ldts }}),{{ datavault4dbt.string_to_timestamp(timestamp_format, end_of_all_times) }}) AS {{ ledts }}
83+
COALESCE(LEAD({{ ldts }}, INTERVAL '1 MICROSECOND') OVER (PARTITION BY {{ hashkey }} ORDER BY {{ ldts }}),{{ datavault4dbt.string_to_timestamp(timestamp_format, end_of_all_times) }}) AS {{ ledts }}
8484
FROM {{ ref(satellite) }}
8585
) {{ satellite }}
8686
{% endif %}

0 commit comments

Comments
 (0)