diff --git a/macros/internal/metadata_processing/get_escape_characters.sql b/macros/internal/metadata_processing/get_escape_characters.sql index aab23f42..12ffb08b 100644 --- a/macros/internal/metadata_processing/get_escape_characters.sql +++ b/macros/internal/metadata_processing/get_escape_characters.sql @@ -51,3 +51,7 @@ {%- macro postgres__get_escape_characters() %} {%- do return (('"', '"')) -%} {%- endmacro %} + +{%- macro duckdb__get_escape_characters() %} + {%- do return (('', '')) -%} +{%- endmacro %} diff --git a/macros/supporting/casting/cast_date.sql b/macros/supporting/casting/cast_date.sql index f3269a67..a49bcfef 100644 --- a/macros/supporting/casting/cast_date.sql +++ b/macros/supporting/casting/cast_date.sql @@ -68,4 +68,10 @@ {%- if alias %} AS {{ alias }} {%- endif %} -{%- endmacro -%} \ No newline at end of file +{%- endmacro -%} + +{%- macro duckdb__cast_date(column_str, as_string=false, datetime=false, alias=none) -%} + + {{ dbtvault.snowflake__cast_date(column_str=column_str, as_string=as_string, datetime=datetime, alias=alias)}} + +{%- endmacro -%} diff --git a/macros/supporting/casting/cast_datetime.sql b/macros/supporting/casting/cast_datetime.sql index c086545f..94eb77da 100644 --- a/macros/supporting/casting/cast_datetime.sql +++ b/macros/supporting/casting/cast_datetime.sql @@ -66,4 +66,12 @@ {%- if alias %} AS {{ alias }} {%- endif %} -{%- endmacro -%} \ No newline at end of file +{%- endmacro -%} + +{%- macro duckdb__cast_datetime(column_str, as_string=false, alias=none, date_type=none) -%} + + to_char(timestamp {{ column_str }}, 'YYYY-MM-DD HH24:MI:SS.MS')::timestamp + + {%- if alias %} AS {{ alias }} {%- endif %} + +{%- endmacro -%}