From df927ce0510f676bf472280cb0b7eb84707e1d65 Mon Sep 17 00:00:00 2001 From: mkottakota1 <149763406+mkottakota1@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:11:45 +0530 Subject: [PATCH] Dbt185 release (#140) Code merged --- CHANGELOG.md | 8 ++++---- README.md | 2 +- dbt/adapters/vertica/__version__.py | 3 +-- dbt/include/vertica/macros/utils/safe_cast.sql | 10 ++-------- setup.py | 5 +++-- .../adapter/unit_testing/test_case_insenstivity.py | 2 +- tests/functional/adapter/unit_testing/test_types.py | 2 +- 7 files changed, 13 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ede492..5946db6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,15 +3,15 @@ - "Breaking changes" listed under a version may require action from end users. -### 1.8.3 - +### 1.8.5 +======= #### Features: - Update base adapter references as part of decoupling migration to support dbt core 1.8.3 https://github.com/vertica/dbt-vertica/issues/131 - Support --empty tests - Support all types for unit testing in dbt-vertica, expand coverage of safe_cast macro https://github.com/dbt-labs/dbt-core/discussions/9798 - Add new workflow for internal patch releases - Support limiting get_catalog by object name -- add --empty value to jinja context as flags.EMPTY +- Add --empty value to jinja context as flags.EMPTY #### Fixes: - Unit-test check tests @@ -22,7 +22,7 @@ - BaseTestEmpty - Support limiting get_catalog check tests - BaseChangeRelationTypeValidator -- warning on unit_test config in dbt_project.yaml file +- Warning on unit_test config in dbt_project.yaml file - Additional tests - TestBaseContext - BaseIncrementalOnSchemaChangeSetup diff --git a/README.md b/README.md index f97924f..a052870 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ dbt-vertica has been developed using the following software and versions: * Vertica Server 23.4.0-0 * Python 3.11 * vertica-python client 1.3.1 -* dbt-core 1.8.3 +* dbt-core 1.8.5 * dbt-tests-adapter 1.8.0 ## Supported Features diff --git a/dbt/adapters/vertica/__version__.py b/dbt/adapters/vertica/__version__.py index 635a74e..5919347 100644 --- a/dbt/adapters/vertica/__version__.py +++ b/dbt/adapters/vertica/__version__.py @@ -12,6 +12,5 @@ # See the License for the specific language governing permissions and # limitations under the License. +version = "1.8.5" - -version = "1.8.3" diff --git a/dbt/include/vertica/macros/utils/safe_cast.sql b/dbt/include/vertica/macros/utils/safe_cast.sql index 5987228..aeac4e8 100644 --- a/dbt/include/vertica/macros/utils/safe_cast.sql +++ b/dbt/include/vertica/macros/utils/safe_cast.sql @@ -1,9 +1,3 @@ {% macro vertica__safe_cast(field, type) %} - {% if type|upper == "GEOMETRY" -%} - try_to_geometry({{field}}) - {% elif type|upper == "GEOGRAPHY" -%} - try_to_geography({{field}}) - {% else -%} - {{ adapter.dispatch('cast', 'dbt')(field, type) }} - {% endif -%} -{% endmacro %} + cast({{field}} as {{type}}) +{% endmacro %} \ No newline at end of file diff --git a/setup.py b/setup.py index 53c8376..160dd3b 100644 --- a/setup.py +++ b/setup.py @@ -78,7 +78,8 @@ def _get_dbt_core_version(): package_name = "dbt-vertica" -package_version = "1.8.3" +package_version = "1.8.5" + description = """Official vertica adapter plugin for dbt (data build tool)""" dbt_core_version = _get_dbt_core_version() @@ -113,7 +114,7 @@ def _get_dbt_core_version(): ] }, install_requires=[ - 'dbt-core==1.8.3', + 'dbt-core==1.8.5', # "dbt-core~={}".format(dbt_core_version), 'vertica-python>=1.1.0', 'dbt-tests-adapter==1.8.0', diff --git a/tests/functional/adapter/unit_testing/test_case_insenstivity.py b/tests/functional/adapter/unit_testing/test_case_insenstivity.py index 4e55e1c..f4ec264 100644 --- a/tests/functional/adapter/unit_testing/test_case_insenstivity.py +++ b/tests/functional/adapter/unit_testing/test_case_insenstivity.py @@ -44,6 +44,6 @@ def test_case_insensitivity(self, project): results = run_dbt(["test"]) - class TestVerticaUnitTestCaseInsensitivity(BaseUnitTestCaseInsensivity): pass + diff --git a/tests/functional/adapter/unit_testing/test_types.py b/tests/functional/adapter/unit_testing/test_types.py index 5c721c1..0942533 100644 --- a/tests/functional/adapter/unit_testing/test_types.py +++ b/tests/functional/adapter/unit_testing/test_types.py @@ -81,4 +81,4 @@ def test_unit_test_data_type(self, project, data_types): class TestVerticaUnitTestingTypes(BaseUnitTestingTypes): - pass +pass