From 2e7d04c266f2d4f2f2e73b61244ea78221c5668c Mon Sep 17 00:00:00 2001 From: Isaac Blanco <40709873+AlejandroBlanco2001@users.noreply.github.com> Date: Tue, 14 May 2024 22:28:52 -0500 Subject: [PATCH] =?UTF-8?q?Improving=20message=20description=20for=20compi?= =?UTF-8?q?le=20error=20in=20get=5Ffixtu=E2=80=A6=20(#203)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changes/unreleased/Features-20240511-032253.yaml | 7 +++++++ .../macros/unit_test_sql/get_fixture_sql.sql | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Features-20240511-032253.yaml diff --git a/.changes/unreleased/Features-20240511-032253.yaml b/.changes/unreleased/Features-20240511-032253.yaml new file mode 100644 index 00000000..b81ff9c0 --- /dev/null +++ b/.changes/unreleased/Features-20240511-032253.yaml @@ -0,0 +1,7 @@ +kind: Features +body: Improvement of the compile error message in the get_fixture-sql.sql when the + relation or the model not exist +time: 2024-05-11T03:22:53.40817477-05:00 +custom: + Author: AlejandroBlanco2001 + Issue: "10014" 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 53d7a93b..c25a87f7 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 @@ -15,7 +15,7 @@ {%- endif -%} {%- if not column_name_to_data_types -%} - {{ exceptions.raise_compiler_error("Not able to get columns for unit test '" ~ model.name ~ "' from relation " ~ this) }} + {{ exceptions.raise_compiler_error("Not able to get columns for unit test '" ~ model.name ~ "' from relation " ~ this ~ " because the relation doesn't exist") }} {%- endif -%} {%- for column_name, column_type in column_name_to_data_types.items() -%}