From 5869073b727eca7aa9f8eddd0da92a47c0dbee73 Mon Sep 17 00:00:00 2001 From: Michelle Ark Date: Thu, 11 Apr 2024 18:18:59 -0700 Subject: [PATCH] use cast macro in default__get_empty_schema_sql --- dbt/include/global_project/macros/adapters/columns.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/include/global_project/macros/adapters/columns.sql b/dbt/include/global_project/macros/adapters/columns.sql index e1099649..663a827b 100644 --- a/dbt/include/global_project/macros/adapters/columns.sql +++ b/dbt/include/global_project/macros/adapters/columns.sql @@ -53,7 +53,7 @@ {%- do col_naked_numeric.append(col['name']) -%} {%- endif -%} {% set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] %} - cast(null as {{ col['data_type'] }}) as {{ col_name }}{{ ", " if not loop.last }} + {{ cast('null', col['data_type']) }} as {{ col_name }}{{ ", " if not loop.last }} {%- endfor -%} {%- if (col_err | length) > 0 -%} {{ exceptions.column_type_missing(column_names=col_err) }}