Skip to content

Commit

Permalink
Merge pull request #257 from ScalefreeCOM/cast-postgres-string-to-tim…
Browse files Browse the repository at this point in the history
…estamp

Add CAST as timestamp_default_dtype to postgres__string_to_timestamp
  • Loading branch information
tkirschke authored Sep 23, 2024
2 parents f86a46a + acf923e commit cd8e3a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion macros/supporting/string_to_timestamp.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{%- endmacro -%}

{%- macro postgres__string_to_timestamp(format, timestamp) -%}
TO_TIMESTAMP('{{ timestamp }}', '{{ format }}')
CAST(TO_TIMESTAMP('{{ timestamp }}', '{{ format }}') AS {{ datavault4dbt.timestamp_default_dtype() }})
{%- endmacro -%}

{%- macro redshift__string_to_timestamp(format, timestamp) -%}
Expand Down

0 comments on commit cd8e3a8

Please sign in to comment.