From 592ab2bd58e3cfa8385354546495803a3df79534 Mon Sep 17 00:00:00 2001 From: Steffen Galan <73339014+steffen030@users.noreply.github.com> Date: Mon, 2 Dec 2024 21:59:45 +0100 Subject: [PATCH] Apply naming suggestions from code review Co-authored-by: Colin Rogers <111200756+colin-rogers-dbt@users.noreply.github.com> --- .../macros/relations/column/columns_spec_ddl.sql | 6 +++--- .../global_project/macros/unit_test_sql/get_fixture_sql.sql | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dbt/include/global_project/macros/relations/column/columns_spec_ddl.sql b/dbt/include/global_project/macros/relations/column/columns_spec_ddl.sql index 0faf9d0b..ddfd3bbe 100644 --- a/dbt/include/global_project/macros/relations/column/columns_spec_ddl.sql +++ b/dbt/include/global_project/macros/relations/column/columns_spec_ddl.sql @@ -88,10 +88,10 @@ {{ return({'name': column.name, 'data_type': data_type, 'formatted': formatted}) }} {%- endmacro -%} -{% macro render_unspecified_column_value(column_type) %} - {{ return(adapter.dispatch('render_unspecified_column_value', 'dbt') (column_type)) }} +{% macro render_column_type(column_type) %} + {{ return(adapter.dispatch('render_column_type', 'dbt') (column_type)) }} {% endmacro %} -{% macro default__render_unspecified_column_value(column_type) %} +{% macro default__render_column_type(column_type) %} safe_cast('null', {{column_type}}) {% endmacro %} diff --git a/dbt/include/global_project/macros/unit_test_sql/get_fixture_sql.sql b/dbt/include/global_project/macros/unit_test_sql/get_fixture_sql.sql index ab103f84..071e65ad 100644 --- a/dbt/include/global_project/macros/unit_test_sql/get_fixture_sql.sql +++ b/dbt/include/global_project/macros/unit_test_sql/get_fixture_sql.sql @@ -19,7 +19,7 @@ {%- endif -%} {%- for column_name, column_type in column_name_to_data_types.items() -%} - {%- do default_row.update({column_name: (render_unspecified_column_value(column_type) | trim )}) -%} + {%- do default_row.update({column_name: (render_column_type(column_type) | trim )}) -%} {%- endfor -%} {{ validate_fixture_rows(rows, row_number) }}