Skip to content

Commit

Permalink
use cast macro in default__get_empty_schema_sql
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Apr 12, 2024
1 parent 3f2386d commit 5869073
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbt/include/global_project/macros/adapters/columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}
Expand Down

0 comments on commit 5869073

Please sign in to comment.