Skip to content

Commit b1487d5

Browse files
authored
Merge pull request #284 from ScalefreeCOM/fix/synapse&exasol_ghostrecords_for_timestamps_didnt_use_alias_variable
add fix:synapse/exasol: ghostrecords for timestamps didnt use alias-variable to eff-sat-branch
2 parents ab9dd5b + 547447c commit b1487d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

macros/supporting/ghost_record_per_datatype.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282

8383
{%- if ghost_record_type == 'unknown' -%}
8484

85-
{%- if datatype == 'TIMESTAMP' or datatype == 'TIMESTAMP WITH LOCAL TIMEZONE' %} {{- datavault4dbt.string_to_timestamp( timestamp_format , beginning_of_all_times) }} as "{{ column_name }}"
85+
{%- if datatype == 'TIMESTAMP' or datatype == 'TIMESTAMP WITH LOCAL TIMEZONE' %} {{- datavault4dbt.string_to_timestamp( timestamp_format , beginning_of_all_times) }} as {{ alias }}
8686
{%- elif datatype == 'DATE'-%} TO_DATE('{{ beginning_of_all_times_date }}', '{{ date_format }}' ) as {{ alias }}
8787
{%- elif datatype.upper().startswith('VARCHAR') -%}
8888
{%- if col_size is not none -%}
@@ -110,7 +110,7 @@
110110

111111
{%- elif ghost_record_type == 'error' -%}
112112

113-
{%- if datatype == 'TIMESTAMP' or datatype == 'TIMESTAMP WITH LOCAL TIME ZONE' %} {{- datavault4dbt.string_to_timestamp( timestamp_format , end_of_all_times) }} as "{{ column_name }}"
113+
{%- if datatype == 'TIMESTAMP' or datatype == 'TIMESTAMP WITH LOCAL TIME ZONE' %} {{- datavault4dbt.string_to_timestamp( timestamp_format , end_of_all_times) }} as {{ alias }}
114114
{%- elif datatype == 'DATE'-%} TO_DATE('{{ end_of_all_times_date }}', '{{ date_format }}' ) as {{ alias }}
115115
{%- elif datatype.upper().startswith('VARCHAR') -%}
116116
{%- if col_size is not none -%}
@@ -267,7 +267,7 @@
267267

268268
{%- if ghost_record_type == 'unknown' -%}
269269

270-
{%- if datatype in ['DATETIME', 'DATETIME2', 'DATETIMEOFFSET'] %} CONVERT({{ datatype }}, {{- datavault4dbt.string_to_timestamp( timestamp_format , beginning_of_all_times) }}) as "{{ column_name }}"
270+
{%- if datatype in ['DATETIME', 'DATETIME2', 'DATETIMEOFFSET'] %} CONVERT({{ datatype }}, {{- datavault4dbt.string_to_timestamp( timestamp_format , beginning_of_all_times) }}) as "{{ alias }}"
271271
{%- elif 'CHAR' in datatype -%}
272272
{%- if col_size is not none -%}
273273
{%- if (col_size | int) == -1 -%}
@@ -297,7 +297,7 @@
297297

298298
{%- elif ghost_record_type == 'error' -%}
299299

300-
{%- if datatype in ['DATETIME', 'DATETIME2', 'DATETIMEOFFSET'] %} CONVERT({{ datatype }}, {{- datavault4dbt.string_to_timestamp( timestamp_format , end_of_all_times) }}) as "{{ column_name }}"
300+
{%- if datatype in ['DATETIME', 'DATETIME2', 'DATETIMEOFFSET'] %} CONVERT({{ datatype }}, {{- datavault4dbt.string_to_timestamp( timestamp_format , end_of_all_times) }}) as "{{ alias }}"
301301
{%- elif 'CHAR' in datatype -%}
302302
{%- if col_size is not none -%}
303303
{%- if (col_size | int) == -1 -%}

0 commit comments

Comments
 (0)