Skip to content

Commit 3f69144

Browse files
authored
fix redshift/postgres beginning_of_all_times ghost record values
beginning_of_all_times_date was used instead of beginning_of_all_times, therefore if the defaults were not changed the ghost record value of the unknown records had 00:00:00 instead of 00:00:01 as time.
1 parent cd8e3a8 commit 3f69144

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

macros/supporting/ghost_record_per_datatype.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@
341341
{%- set datatype = datatype | string | upper | trim -%}
342342

343343
{%- if ghost_record_type == 'unknown' -%}
344-
{%- if 'TIMESTAMP' in datatype %}{{ datavault4dbt.string_to_timestamp(timestamp_format, beginning_of_all_times_date) }} AS {{ alias }}
344+
{%- if 'TIMESTAMP' in datatype %}{{ datavault4dbt.string_to_timestamp(timestamp_format, beginning_of_all_times) }} AS {{ alias }}
345345
{%- elif datatype == 'TIME WITH TIME ZONE' %} CAST('00:00:01 UTC' as TIMETZ) as {{ alias }}
346346
{%- elif datatype == 'TIME WITHOUT TIME ZONE' %} CAST('00:00:01' as TIME) as {{ alias }}
347347
{%- elif datatype == 'DATE'-%} TO_DATE('{{ beginning_of_all_times_date }}', '{{ date_format }}' ) as {{ alias }}
@@ -395,7 +395,7 @@
395395
{%- set datatype = datatype | string | upper | trim -%}
396396

397397
{%- if ghost_record_type == 'unknown' -%}
398-
{%- if 'TIMESTAMP' in datatype %}{{ datavault4dbt.string_to_timestamp(timestamp_format, beginning_of_all_times_date) }} AS {{ alias }}
398+
{%- if 'TIMESTAMP' in datatype %}{{ datavault4dbt.string_to_timestamp(timestamp_format, beginning_of_all_times) }} AS {{ alias }}
399399
{%- elif datatype == 'TIMETZ' %} CAST('00:00:01 UTC' as TIMETZ) as {{ alias }}
400400
{%- elif datatype == 'TIME' %} CAST('00:00:01' as TIME) as {{ alias }}
401401
{%- elif datatype == 'DATE'-%} TO_DATE('{{ beginning_of_all_times_date }}', '{{ date_format }}' ) as {{ alias }}

0 commit comments

Comments
 (0)