From d7165c16bc5d78051dc0ee40ee1008b0e844015c Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:13:51 -0700 Subject: [PATCH] Use `sql` instead of `compiled_code` within the default `get_limit_sql` macro (#372) Co-authored-by: Mila Page <67295367+VersusFacit@users.noreply.github.com> --- .changes/unreleased/Fixes-20241205-141122.yaml | 6 ++++++ dbt/include/global_project/macros/adapters/show.sql | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Fixes-20241205-141122.yaml diff --git a/.changes/unreleased/Fixes-20241205-141122.yaml b/.changes/unreleased/Fixes-20241205-141122.yaml new file mode 100644 index 00000000..071cfb55 --- /dev/null +++ b/.changes/unreleased/Fixes-20241205-141122.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: Use `sql` instead of `compiled_code` within the default `get_limit_sql` macro +time: 2024-12-05T14:11:22.10765-07:00 +custom: + Author: dbeatty10 + Issue: "372" diff --git a/dbt/include/global_project/macros/adapters/show.sql b/dbt/include/global_project/macros/adapters/show.sql index 3a5faa98..fb17bb96 100644 --- a/dbt/include/global_project/macros/adapters/show.sql +++ b/dbt/include/global_project/macros/adapters/show.sql @@ -19,7 +19,7 @@ {%- endmacro -%} {% macro default__get_limit_sql(sql, limit) %} - {{ compiled_code }} + {{ sql }} {% if limit is not none %} limit {{ limit }} {%- endif -%}