From cea82b6e19afb8763da49c63353824ab0a4bd1d2 Mon Sep 17 00:00:00 2001 From: Niall Woodward Date: Mon, 29 Jan 2024 10:18:46 +0000 Subject: [PATCH 1/2] Remove warning on session level tags --- .../tests/dbt_project_configured_meta/test_2.sql | 2 ++ integration_test_project/tests/test.sql | 4 ++++ macros/query_tags.sql | 2 -- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 integration_test_project/tests/dbt_project_configured_meta/test_2.sql diff --git a/integration_test_project/tests/dbt_project_configured_meta/test_2.sql b/integration_test_project/tests/dbt_project_configured_meta/test_2.sql new file mode 100644 index 0000000..4a1e323 --- /dev/null +++ b/integration_test_project/tests/dbt_project_configured_meta/test_2.sql @@ -0,0 +1,2 @@ +select 1 +where false diff --git a/integration_test_project/tests/test.sql b/integration_test_project/tests/test.sql index 4a1e323..f744ccd 100644 --- a/integration_test_project/tests/test.sql +++ b/integration_test_project/tests/test.sql @@ -1,2 +1,6 @@ +{{ config(meta = { + 'team': '1' +}) }} + select 1 where false diff --git a/macros/query_tags.sql b/macros/query_tags.sql index 63fb97c..73493a3 100644 --- a/macros/query_tags.sql +++ b/macros/query_tags.sql @@ -10,8 +10,6 @@ {% if original_query_tag %} {% if fromjson(original_query_tag) is mapping %} {% set original_query_tag_parsed = fromjson(original_query_tag) %} - {% else %} - {% do log("dbt-snowflake-query-tags warning: the session level query tag value of '{}' is not a mapping type, so is being ignored. If you'd like to add additional query tag information, use a mapping type instead, or remove it to avoid this message.".format(original_query_tag), True) %} {% endif %} {% endif %} From 05fac2c73e57dac5c17416f8018d74ad9ce09ba6 Mon Sep 17 00:00:00 2001 From: Niall Woodward Date: Mon, 29 Jan 2024 10:20:43 +0000 Subject: [PATCH 2/2] Changelog --- .changes/2.3.3.md | 7 +++++++ CHANGELOG.md | 8 ++++++++ dbt_project.yml | 2 +- macros/query_tags.sql | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .changes/2.3.3.md diff --git a/.changes/2.3.3.md b/.changes/2.3.3.md new file mode 100644 index 0000000..3dd9d01 --- /dev/null +++ b/.changes/2.3.3.md @@ -0,0 +1,7 @@ +## dbt-snowflake-query-tags 2.3.3 - January 29, 2024 + +### Features + +- Remove warning on session level query tag ([#22](https://github.com/get-select/dbt-snowflake-query-tags/pull/22)) + + diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f30011..b1dd73a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ 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-snowflake-query-tags 2.3.3 - January 29, 2024 + +### Features + +- Remove warning on session level query tag ([#22](https://github.com/get-select/dbt-snowflake-query-tags/pull/22)) + + + ## dbt-snowflake-query-tags 2.3.2 - January 18, 2024 ### Features diff --git a/dbt_project.yml b/dbt_project.yml index 8d45156..0dd2dc1 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,3 +1,3 @@ name: 'dbt_snowflake_query_tags' -version: '2.3.2' +version: '2.3.3' config-version: 2 diff --git a/macros/query_tags.sql b/macros/query_tags.sql index 73493a3..9a6b7b3 100644 --- a/macros/query_tags.sql +++ b/macros/query_tags.sql @@ -35,7 +35,7 @@ {%- do query_tag.update( app='dbt', - dbt_snowflake_query_tags_version='2.3.2', + dbt_snowflake_query_tags_version='2.3.3', ) -%} {% if thread_id %}