From acf923ec87d68f6472905eed8559da12f8193b2f Mon Sep 17 00:00:00 2001 From: Theo Kiehn <162969167+tkiehn@users.noreply.github.com> Date: Fri, 20 Sep 2024 11:11:59 +0200 Subject: [PATCH] Add CAST to timestamp_default_dtype to postgres__string_to_timestamp --- macros/supporting/string_to_timestamp.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/supporting/string_to_timestamp.sql b/macros/supporting/string_to_timestamp.sql index d5d5a065..96313450 100644 --- a/macros/supporting/string_to_timestamp.sql +++ b/macros/supporting/string_to_timestamp.sql @@ -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) -%}