From bea4cb86880b6451429c04408654a6c06fbcaf5a Mon Sep 17 00:00:00 2001 From: Ben Cassell <98852248+benc-db@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:21:06 -0800 Subject: [PATCH] Prep for 1.8.0b1 release (#593) --- CHANGELOG.md | 6 +++++- dbt/adapters/databricks/__version__.py | 2 +- requirements.txt | 2 +- setup.py | 2 +- .../functional/adapter/materialized_view_tests/fixtures.py | 3 ++- .../adapter/materialized_view_tests/test_basic.py | 3 +++ tests/functional/adapter/streaming_tables/fixtures.py | 3 ++- 7 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 610fafa2f..93a54449f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,11 @@ - Support `on_config_change` for materialized views, expand the supported config options ([536](https://github.com/databricks/dbt-databricks/pull/536))) - Support `on_config_change` for streaming tables, expand the supported config options ([569](https://github.com/databricks/dbt-databricks/pull/569))) -## dbt-databricks 1.7.8 (TBD) +### Under the Hood + +- Upgrade databricks-sql-connector to 3.1.0 ([593](https://github.com/databricks/dbt-databricks/pull/593)) + +## dbt-databricks 1.7.8 (Feb 22, 2024) ### Fixes diff --git a/dbt/adapters/databricks/__version__.py b/dbt/adapters/databricks/__version__.py index 83573b5e1..7ee7c15c3 100644 --- a/dbt/adapters/databricks/__version__.py +++ b/dbt/adapters/databricks/__version__.py @@ -1 +1 @@ -version: str = "1.7.6" +version: str = "1.8.0b1" diff --git a/requirements.txt b/requirements.txt index cfd9743f5..e9c7f88db 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -databricks-sql-connector>=2.9.3, <3.0.0 +databricks-sql-connector>=3.1.0, <3.2.0 dbt-spark~=1.7.1 databricks-sdk==0.17.0 keyring>=23.13.0 diff --git a/setup.py b/setup.py index ccb367f64..6cedde30e 100644 --- a/setup.py +++ b/setup.py @@ -55,7 +55,7 @@ def _get_plugin_version() -> str: include_package_data=True, install_requires=[ "dbt-spark~=1.7.1", - "databricks-sql-connector>=2.9.3, <3.0.0", + "databricks-sql-connector>=3.1.0, <3.2.0", "databricks-sdk==0.17.0", "keyring>=23.13.0", "pandas<2.2.0", diff --git a/tests/functional/adapter/materialized_view_tests/fixtures.py b/tests/functional/adapter/materialized_view_tests/fixtures.py index 558e9075d..4b0dd15bf 100644 --- a/tests/functional/adapter/materialized_view_tests/fixtures.py +++ b/tests/functional/adapter/materialized_view_tests/fixtures.py @@ -7,7 +7,8 @@ def query_relation_type(project, relation: BaseRelation) -> Optional[str]: table_type = project.run_sql( f"select table_type from {relation.information_schema_only()}." - f"`tables` where table_name = '{relation.identifier}'", + f"`tables` where table_schema = '{relation.schema}'" + f" and table_name = '{relation.identifier}'", fetch="one", )[0] if table_type == "STREAMING_TABLE": diff --git a/tests/functional/adapter/materialized_view_tests/test_basic.py b/tests/functional/adapter/materialized_view_tests/test_basic.py index b921def91..0102e0b37 100644 --- a/tests/functional/adapter/materialized_view_tests/test_basic.py +++ b/tests/functional/adapter/materialized_view_tests/test_basic.py @@ -34,6 +34,8 @@ def test_table_replaces_materialized_view(self, project, my_materialized_view): self.swap_materialized_view_to_table(project, my_materialized_view) util.run_dbt(["run", "--models", my_materialized_view.identifier]) + + # UC doesn't sync metadata fast enough for this to pass consistently # assert self.query_relation_type(project, my_materialized_view) == "table" def test_view_replaces_materialized_view(self, project, my_materialized_view): @@ -43,6 +45,7 @@ def test_view_replaces_materialized_view(self, project, my_materialized_view): self.swap_materialized_view_to_view(project, my_materialized_view) util.run_dbt(["run", "--models", my_materialized_view.identifier]) + # UC doesn't sync metadata fast enough for this to pass consistently # assert self.query_relation_type(project, my_materialized_view) == "view" diff --git a/tests/functional/adapter/streaming_tables/fixtures.py b/tests/functional/adapter/streaming_tables/fixtures.py index af5923b26..adbae2b51 100644 --- a/tests/functional/adapter/streaming_tables/fixtures.py +++ b/tests/functional/adapter/streaming_tables/fixtures.py @@ -7,7 +7,8 @@ def query_relation_type(project, relation: BaseRelation) -> Optional[str]: table_type = project.run_sql( f"select table_type from {relation.information_schema_only()}." - f"`tables` where table_name = '{relation.identifier}'", + f"`tables` where table_schema = '{relation.schema}'" + f" and table_name = '{relation.identifier}'", fetch="one", )[0] if table_type == "STREAMING_TABLE":