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 1/4] 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 -%} From 6e149d269a16b33049020caadb9f215cae32755e Mon Sep 17 00:00:00 2001 From: Mila Page <67295367+VersusFacit@users.noreply.github.com> Date: Wed, 18 Dec 2024 19:54:03 -0800 Subject: [PATCH 2/4] Bump adapters version. (#392) --- dbt/adapters/__about__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/adapters/__about__.py b/dbt/adapters/__about__.py index 134ed009..667df30e 100644 --- a/dbt/adapters/__about__.py +++ b/dbt/adapters/__about__.py @@ -1 +1 @@ -version = "1.12.0" +version = "1.13.0" From c4de2a605ad0be60cf4aadb7ed8b4a38f9fd82e5 Mon Sep 17 00:00:00 2001 From: Github Build Bot Date: Thu, 19 Dec 2024 04:01:27 +0000 Subject: [PATCH 3/4] generate changelog --- .changes/1.13.0.md | 13 +++++++++++++ .../unreleased/Features-20241216-172047.yaml | 6 ------ .changes/unreleased/Fixes-20241205-141122.yaml | 6 ------ .../Under the Hood-20241211-184328.yaml | 6 ------ CHANGELOG.md | 16 +++++++++++++++- 5 files changed, 28 insertions(+), 19 deletions(-) create mode 100644 .changes/1.13.0.md delete mode 100644 .changes/unreleased/Features-20241216-172047.yaml delete mode 100644 .changes/unreleased/Fixes-20241205-141122.yaml delete mode 100644 .changes/unreleased/Under the Hood-20241211-184328.yaml diff --git a/.changes/1.13.0.md b/.changes/1.13.0.md new file mode 100644 index 00000000..2fade0c2 --- /dev/null +++ b/.changes/1.13.0.md @@ -0,0 +1,13 @@ +## dbt-adapters 1.13.0 - December 19, 2024 + +### Features + +- Add function to run custom sql for getting freshness info ([#8797](https://github.com/dbt-labs/dbt-adapters/issues/8797)) + +### Fixes + +- Use `sql` instead of `compiled_code` within the default `get_limit_sql` macro ([#372](https://github.com/dbt-labs/dbt-adapters/issues/372)) + +### Under the Hood + +- Adapter tests for new snapshot configs ([#380](https://github.com/dbt-labs/dbt-adapters/issues/380)) diff --git a/.changes/unreleased/Features-20241216-172047.yaml b/.changes/unreleased/Features-20241216-172047.yaml deleted file mode 100644 index 232d184b..00000000 --- a/.changes/unreleased/Features-20241216-172047.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Features -body: Add function to run custom sql for getting freshness info -time: 2024-12-16T17:20:47.065611-08:00 -custom: - Author: ChenyuLInx - Issue: "8797" diff --git a/.changes/unreleased/Fixes-20241205-141122.yaml b/.changes/unreleased/Fixes-20241205-141122.yaml deleted file mode 100644 index 071cfb55..00000000 --- a/.changes/unreleased/Fixes-20241205-141122.yaml +++ /dev/null @@ -1,6 +0,0 @@ -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/.changes/unreleased/Under the Hood-20241211-184328.yaml b/.changes/unreleased/Under the Hood-20241211-184328.yaml deleted file mode 100644 index 87a1fc84..00000000 --- a/.changes/unreleased/Under the Hood-20241211-184328.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Under the Hood -body: Adapter tests for new snapshot configs -time: 2024-12-11T18:43:28.073463-07:00 -custom: - Author: dbeatty10 - Issue: "380" diff --git a/CHANGELOG.md b/CHANGELOG.md index 47a19fcb..fde4210c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). -## dbt-adapters 1.12.0 - December 18, 2024 +## dbt-adapters 1.13.0 - December 19, 2024 + +### Features + +- Add function to run custom sql for getting freshness info ([#8797](https://github.com/dbt-labs/dbt-adapters/issues/8797)) + +### Fixes +- Use `sql` instead of `compiled_code` within the default `get_limit_sql` macro ([#372](https://github.com/dbt-labs/dbt-adapters/issues/372)) +### Under the Hood + +- Adapter tests for new snapshot configs ([#380](https://github.com/dbt-labs/dbt-adapters/issues/380)) + + + +## dbt-adapters 1.12.0 - December 18, 2024 ## dbt-adapters 1.11.0 - December 17, 2024 From 6cd231d354fc5d696da673006a9012db574d1a16 Mon Sep 17 00:00:00 2001 From: Mike Alfare <13974384+mikealfare@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:10:19 -0500 Subject: [PATCH 4/4] Fix release branch conditional (#388) --- .github/workflows/_generate-changelog.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/_generate-changelog.yml b/.github/workflows/_generate-changelog.yml index acefb3e0..4b0fc18c 100644 --- a/.github/workflows/_generate-changelog.yml +++ b/.github/workflows/_generate-changelog.yml @@ -222,8 +222,7 @@ jobs: steps: - id: branch run: | - branch="" - if [ ${{ needs.temp-branch.outputs.name == '' || inputs.merge }}] + if [[ ${{ needs.temp-branch.outputs.name == '' || inputs.merge }} ]] then branch="${{ inputs.branch }}" else