From dffea968188cf87f1eb1be48c01f5fcb609e5bb2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 23:58:15 -0400 Subject: [PATCH 01/13] Bump mypy from 1.6.0 to 1.6.1 (#926) * Bump mypy from 1.6.0 to 1.6.1 Bumps [mypy](https://github.com/python/mypy) from 1.6.0 to 1.6.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.6.0...v1.6.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Add automated changelog yaml from template for bot PR --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Github Build Bot Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com> --- .changes/unreleased/Dependencies-20231027-230254.yaml | 6 ++++++ dev-requirements.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Dependencies-20231027-230254.yaml diff --git a/.changes/unreleased/Dependencies-20231027-230254.yaml b/.changes/unreleased/Dependencies-20231027-230254.yaml new file mode 100644 index 000000000..f1b745210 --- /dev/null +++ b/.changes/unreleased/Dependencies-20231027-230254.yaml @@ -0,0 +1,6 @@ +kind: "Dependencies" +body: "Bump mypy from 1.6.0 to 1.6.1" +time: 2023-10-27T23:02:54.00000Z +custom: + Author: dependabot[bot] + PR: 926 diff --git a/dev-requirements.txt b/dev-requirements.txt index 8f94d509d..a6b3dca0e 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -12,7 +12,7 @@ flake8~=6.1;python_version>="3.8" flaky~=3.7 freezegun~=1.2 ipdb~=0.13.13 -mypy==1.6.0 # patch updates have historically introduced breaking changes +mypy==1.6.1 # patch updates have historically introduced breaking changes pip-tools~=7.3 pre-commit~=3.5 pre-commit-hooks~=4.5 From 0f39bd1410d7cc95cfae8b661c6080e7fd99cc01 Mon Sep 17 00:00:00 2001 From: Gerda Shank Date: Tue, 7 Nov 2023 16:49:38 -0500 Subject: [PATCH 02/13] Support new agate Integer type and test with empty seed (#936) * Support new agate Integer type and test with empty seed * add changie, remove branch reference --- .changes/unreleased/Fixes-20231107-134141.yaml | 6 ++++++ dbt/adapters/spark/impl.py | 4 ++++ tests/functional/adapter/test_simple_seed.py | 5 +++++ 3 files changed, 15 insertions(+) create mode 100644 .changes/unreleased/Fixes-20231107-134141.yaml create mode 100644 tests/functional/adapter/test_simple_seed.py diff --git a/.changes/unreleased/Fixes-20231107-134141.yaml b/.changes/unreleased/Fixes-20231107-134141.yaml new file mode 100644 index 000000000..d4f56eaca --- /dev/null +++ b/.changes/unreleased/Fixes-20231107-134141.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: Support new agate Integer type and empty seed test +time: 2023-11-07T13:41:41.033441-05:00 +custom: + Author: gshank + Issue: "935" diff --git a/dbt/adapters/spark/impl.py b/dbt/adapters/spark/impl.py index feae34129..16c3a3cb7 100644 --- a/dbt/adapters/spark/impl.py +++ b/dbt/adapters/spark/impl.py @@ -120,6 +120,10 @@ def convert_number_type(cls, agate_table: agate.Table, col_idx: int) -> str: decimals = agate_table.aggregate(agate.MaxPrecision(col_idx)) return "double" if decimals else "bigint" + @classmethod + def convert_integer_type(cls, agate_table: agate.Table, col_idx: int) -> str: + return "bigint" + @classmethod def convert_date_type(cls, agate_table: agate.Table, col_idx: int) -> str: return "date" diff --git a/tests/functional/adapter/test_simple_seed.py b/tests/functional/adapter/test_simple_seed.py new file mode 100644 index 000000000..c610967c6 --- /dev/null +++ b/tests/functional/adapter/test_simple_seed.py @@ -0,0 +1,5 @@ +from dbt.tests.adapter.simple_seed.test_seed import BaseTestEmptySeed + + +class TestBigQueryEmptySeed(BaseTestEmptySeed): + pass From 5bbf67379c6ee0f8e13819ff736ef9fc90c3f27c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Nov 2023 18:50:52 -0500 Subject: [PATCH 03/13] Update black requirement from ~=23.10 to ~=23.11 (#942) * Update black requirement from ~=23.10 to ~=23.11 Updates the requirements on [black](https://github.com/psf/black) to permit the latest version. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.10.0...23.11.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:development ... Signed-off-by: dependabot[bot] * Add automated changelog yaml from template for bot PR --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Github Build Bot --- .changes/unreleased/Dependencies-20231108-222326.yaml | 6 ++++++ dev-requirements.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Dependencies-20231108-222326.yaml diff --git a/.changes/unreleased/Dependencies-20231108-222326.yaml b/.changes/unreleased/Dependencies-20231108-222326.yaml new file mode 100644 index 000000000..fdd35004a --- /dev/null +++ b/.changes/unreleased/Dependencies-20231108-222326.yaml @@ -0,0 +1,6 @@ +kind: "Dependencies" +body: "Update black requirement from ~=23.10 to ~=23.11" +time: 2023-11-08T22:23:26.00000Z +custom: + Author: dependabot[bot] + PR: 942 diff --git a/dev-requirements.txt b/dev-requirements.txt index a6b3dca0e..a520f1504 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -5,7 +5,7 @@ git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-tests-adapter&subdirectory= # if version 1.x or greater -> pin to major version # if version 0.x -> pin to minor -black~=23.10 +black~=23.11 bumpversion~=0.6.0 click~=8.1 flake8~=6.1;python_version>="3.8" From 8d08b769e8619c94e558c3924a187c17f5b65cdf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 13:27:32 -0500 Subject: [PATCH 04/13] Bump mypy from 1.6.1 to 1.7.0 (#946) * Bump mypy from 1.6.1 to 1.7.0 Bumps [mypy](https://github.com/python/mypy) from 1.6.1 to 1.7.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.6.1...v1.7.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Add automated changelog yaml from template for bot PR --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Github Build Bot --- .changes/unreleased/Dependencies-20231110-224056.yaml | 6 ++++++ dev-requirements.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Dependencies-20231110-224056.yaml diff --git a/.changes/unreleased/Dependencies-20231110-224056.yaml b/.changes/unreleased/Dependencies-20231110-224056.yaml new file mode 100644 index 000000000..efdf9a549 --- /dev/null +++ b/.changes/unreleased/Dependencies-20231110-224056.yaml @@ -0,0 +1,6 @@ +kind: "Dependencies" +body: "Bump mypy from 1.6.1 to 1.7.0" +time: 2023-11-10T22:40:56.00000Z +custom: + Author: dependabot[bot] + PR: 946 diff --git a/dev-requirements.txt b/dev-requirements.txt index a520f1504..4b4f99395 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -12,7 +12,7 @@ flake8~=6.1;python_version>="3.8" flaky~=3.7 freezegun~=1.2 ipdb~=0.13.13 -mypy==1.6.1 # patch updates have historically introduced breaking changes +mypy==1.7.0 # patch updates have historically introduced breaking changes pip-tools~=7.3 pre-commit~=3.5 pre-commit-hooks~=4.5 From 1207e2c25e40d450e96cba0c22d7987b4e660b0c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 15:29:28 -0500 Subject: [PATCH 05/13] Update pytest-xdist requirement from ~=3.3 to ~=3.4 (#947) * Update pytest-xdist requirement from ~=3.3 to ~=3.4 Updates the requirements on [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) to permit the latest version. - [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-xdist/compare/v3.3.0...v3.4.0) --- updated-dependencies: - dependency-name: pytest-xdist dependency-type: direct:development ... Signed-off-by: dependabot[bot] * Add automated changelog yaml from template for bot PR --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Github Build Bot Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com> --- .changes/unreleased/Dependencies-20231113-224111.yaml | 6 ++++++ dev-requirements.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Dependencies-20231113-224111.yaml diff --git a/.changes/unreleased/Dependencies-20231113-224111.yaml b/.changes/unreleased/Dependencies-20231113-224111.yaml new file mode 100644 index 000000000..b2fb306c7 --- /dev/null +++ b/.changes/unreleased/Dependencies-20231113-224111.yaml @@ -0,0 +1,6 @@ +kind: "Dependencies" +body: "Update pytest-xdist requirement from ~=3.3 to ~=3.4" +time: 2023-11-13T22:41:11.00000Z +custom: + Author: dependabot[bot] + PR: 947 diff --git a/dev-requirements.txt b/dev-requirements.txt index 4b4f99395..4abe824e9 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -20,7 +20,7 @@ pytest~=7.4 pytest-csv~=3.0 pytest-dotenv~=0.5.2 pytest-logbook~=1.2 -pytest-xdist~=3.3 +pytest-xdist~=3.4 pytz~=2023.3 tox~=4.11 types-pytz~=2023.3 From 1d47a3d58983fad91c6c1133a1970dfc99d0b3ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Nov 2023 18:19:16 -0500 Subject: [PATCH 06/13] Bump mypy from 1.7.0 to 1.7.1 (#953) * Bump mypy from 1.7.0 to 1.7.1 Bumps [mypy](https://github.com/python/mypy) from 1.7.0 to 1.7.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.7.0...v1.7.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Add automated changelog yaml from template for bot PR --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Github Build Bot --- .changes/unreleased/Dependencies-20231127-220741.yaml | 6 ++++++ dev-requirements.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Dependencies-20231127-220741.yaml diff --git a/.changes/unreleased/Dependencies-20231127-220741.yaml b/.changes/unreleased/Dependencies-20231127-220741.yaml new file mode 100644 index 000000000..63d572f2b --- /dev/null +++ b/.changes/unreleased/Dependencies-20231127-220741.yaml @@ -0,0 +1,6 @@ +kind: "Dependencies" +body: "Bump mypy from 1.7.0 to 1.7.1" +time: 2023-11-27T22:07:41.00000Z +custom: + Author: dependabot[bot] + PR: 953 diff --git a/dev-requirements.txt b/dev-requirements.txt index 4abe824e9..e5d0f3701 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -12,7 +12,7 @@ flake8~=6.1;python_version>="3.8" flaky~=3.7 freezegun~=1.2 ipdb~=0.13.13 -mypy==1.7.0 # patch updates have historically introduced breaking changes +mypy==1.7.1 # patch updates have historically introduced breaking changes pip-tools~=7.3 pre-commit~=3.5 pre-commit-hooks~=4.5 From ba2085f3e660c9062b4564213f0d8fb8e46ea123 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Nov 2023 22:46:32 -0500 Subject: [PATCH 07/13] Update wheel requirement from ~=0.41 to ~=0.42 (#952) * Update wheel requirement from ~=0.41 to ~=0.42 Updates the requirements on [wheel](https://github.com/pypa/wheel) to permit the latest version. - [Release notes](https://github.com/pypa/wheel/releases) - [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst) - [Commits](https://github.com/pypa/wheel/compare/0.41.0...0.42.0) --- updated-dependencies: - dependency-name: wheel dependency-type: direct:development ... Signed-off-by: dependabot[bot] * Add automated changelog yaml from template for bot PR --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Github Build Bot Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com> --- .changes/unreleased/Dependencies-20231127-220737.yaml | 6 ++++++ dev-requirements.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Dependencies-20231127-220737.yaml diff --git a/.changes/unreleased/Dependencies-20231127-220737.yaml b/.changes/unreleased/Dependencies-20231127-220737.yaml new file mode 100644 index 000000000..60e2be67f --- /dev/null +++ b/.changes/unreleased/Dependencies-20231127-220737.yaml @@ -0,0 +1,6 @@ +kind: "Dependencies" +body: "Update wheel requirement from ~=0.41 to ~=0.42" +time: 2023-11-27T22:07:37.00000Z +custom: + Author: dependabot[bot] + PR: 952 diff --git a/dev-requirements.txt b/dev-requirements.txt index e5d0f3701..4259c661c 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -26,7 +26,7 @@ tox~=4.11 types-pytz~=2023.3 types-requests~=2.31 twine~=4.0 -wheel~=0.41 +wheel~=0.42 # Adapter specific dependencies mock~=5.1 From da258f8042650801c9d365f27157d0f39c54573c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 00:46:43 -0500 Subject: [PATCH 08/13] Update pytest-xdist requirement from ~=3.4 to ~=3.5 (#951) * Update pytest-xdist requirement from ~=3.4 to ~=3.5 Updates the requirements on [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) to permit the latest version. - [Release notes](https://github.com/pytest-dev/pytest-xdist/releases) - [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-xdist/compare/v3.4.0...v3.5.0) --- updated-dependencies: - dependency-name: pytest-xdist dependency-type: direct:development ... Signed-off-by: dependabot[bot] * Add automated changelog yaml from template for bot PR --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Github Build Bot Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com> --- .changes/unreleased/Dependencies-20231127-220733.yaml | 6 ++++++ dev-requirements.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Dependencies-20231127-220733.yaml diff --git a/.changes/unreleased/Dependencies-20231127-220733.yaml b/.changes/unreleased/Dependencies-20231127-220733.yaml new file mode 100644 index 000000000..be23a48f7 --- /dev/null +++ b/.changes/unreleased/Dependencies-20231127-220733.yaml @@ -0,0 +1,6 @@ +kind: "Dependencies" +body: "Update pytest-xdist requirement from ~=3.4 to ~=3.5" +time: 2023-11-27T22:07:33.00000Z +custom: + Author: dependabot[bot] + PR: 951 diff --git a/dev-requirements.txt b/dev-requirements.txt index 4259c661c..1d8aea7b9 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -20,7 +20,7 @@ pytest~=7.4 pytest-csv~=3.0 pytest-dotenv~=0.5.2 pytest-logbook~=1.2 -pytest-xdist~=3.4 +pytest-xdist~=3.5 pytz~=2023.3 tox~=4.11 types-pytz~=2023.3 From d0a60a71984c2fc3121806c20b661e31709eab93 Mon Sep 17 00:00:00 2001 From: Michelle Ark Date: Fri, 1 Dec 2023 17:28:40 -0500 Subject: [PATCH 09/13] add tests for --empty flag (#948) * add tests for --empty flag * changelog entry * restore dev-requirements --- .changes/unreleased/Under the Hood-20231119-132050.yaml | 6 ++++++ tests/functional/adapter/empty/test_empty.py | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 .changes/unreleased/Under the Hood-20231119-132050.yaml create mode 100644 tests/functional/adapter/empty/test_empty.py diff --git a/.changes/unreleased/Under the Hood-20231119-132050.yaml b/.changes/unreleased/Under the Hood-20231119-132050.yaml new file mode 100644 index 000000000..61c7f8ab8 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20231119-132050.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: Add tests for --empty flag +time: 2023-11-19T13:20:50.076459-05:00 +custom: + Author: michelleark + Issue: "949" diff --git a/tests/functional/adapter/empty/test_empty.py b/tests/functional/adapter/empty/test_empty.py new file mode 100644 index 000000000..1ea2c8866 --- /dev/null +++ b/tests/functional/adapter/empty/test_empty.py @@ -0,0 +1,5 @@ +from dbt.tests.adapter.empty.test_empty import BaseTestEmpty + + +class TestSparkEmpty(BaseTestEmpty): + pass From a813e400b50d9e80223d1eacdd3339b06681550e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 21:25:06 -0800 Subject: [PATCH 10/13] Update freezegun requirement from ~=1.2 to ~=1.3 (#956) * Update freezegun requirement from ~=1.2 to ~=1.3 Updates the requirements on [freezegun](https://github.com/spulec/freezegun) to permit the latest version. - [Release notes](https://github.com/spulec/freezegun/releases) - [Changelog](https://github.com/spulec/freezegun/blob/master/CHANGELOG) - [Commits](https://github.com/spulec/freezegun/compare/1.2.0...1.3.1) --- updated-dependencies: - dependency-name: freezegun dependency-type: direct:development ... Signed-off-by: dependabot[bot] * Add automated changelog yaml from template for bot PR --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Github Build Bot --- .changes/unreleased/Dependencies-20231204-224210.yaml | 6 ++++++ dev-requirements.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Dependencies-20231204-224210.yaml diff --git a/.changes/unreleased/Dependencies-20231204-224210.yaml b/.changes/unreleased/Dependencies-20231204-224210.yaml new file mode 100644 index 000000000..c415934db --- /dev/null +++ b/.changes/unreleased/Dependencies-20231204-224210.yaml @@ -0,0 +1,6 @@ +kind: "Dependencies" +body: "Update freezegun requirement from ~=1.2 to ~=1.3" +time: 2023-12-04T22:42:10.00000Z +custom: + Author: dependabot[bot] + PR: 956 diff --git a/dev-requirements.txt b/dev-requirements.txt index 1d8aea7b9..76c38b101 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -10,7 +10,7 @@ bumpversion~=0.6.0 click~=8.1 flake8~=6.1;python_version>="3.8" flaky~=3.7 -freezegun~=1.2 +freezegun~=1.3 ipdb~=0.13.13 mypy==1.7.1 # patch updates have historically introduced breaking changes pip-tools~=7.3 From ffc24ba30aa87e38e42ced897ccb19961425ad81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 22:47:38 -0800 Subject: [PATCH 11/13] Update black requirement from ~=23.11 to ~=23.12 (#959) * Update black requirement from ~=23.11 to ~=23.12 Updates the requirements on [black](https://github.com/psf/black) to permit the latest version. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.11.0...23.12.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:development ... Signed-off-by: dependabot[bot] * Add automated changelog yaml from template for bot PR --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Github Build Bot Co-authored-by: Mila Page <67295367+VersusFacit@users.noreply.github.com> --- .changes/unreleased/Dependencies-20231212-223929.yaml | 6 ++++++ dev-requirements.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Dependencies-20231212-223929.yaml diff --git a/.changes/unreleased/Dependencies-20231212-223929.yaml b/.changes/unreleased/Dependencies-20231212-223929.yaml new file mode 100644 index 000000000..65f308f75 --- /dev/null +++ b/.changes/unreleased/Dependencies-20231212-223929.yaml @@ -0,0 +1,6 @@ +kind: "Dependencies" +body: "Update black requirement from ~=23.11 to ~=23.12" +time: 2023-12-12T22:39:29.00000Z +custom: + Author: dependabot[bot] + PR: 959 diff --git a/dev-requirements.txt b/dev-requirements.txt index 76c38b101..fe960ed03 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -5,7 +5,7 @@ git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-tests-adapter&subdirectory= # if version 1.x or greater -> pin to major version # if version 0.x -> pin to minor -black~=23.11 +black~=23.12 bumpversion~=0.6.0 click~=8.1 flake8~=6.1;python_version>="3.8" From f774bcbd181fcdd7bb0ce8295e9f93aedfcfe32a Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:45:14 -0700 Subject: [PATCH 12/13] Remove unused `invalid_insert_overwrite_delta_msg` variable (#963) * Remove `invalid_insert_overwrite_delta_msg` message * Changelog entry --- .changes/unreleased/Under the Hood-20231214-134728.yaml | 6 ++++++ .../spark/macros/materializations/incremental/validate.sql | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 .changes/unreleased/Under the Hood-20231214-134728.yaml diff --git a/.changes/unreleased/Under the Hood-20231214-134728.yaml b/.changes/unreleased/Under the Hood-20231214-134728.yaml new file mode 100644 index 000000000..b1de2ddb7 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20231214-134728.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: Remove unused `invalid_insert_overwrite_delta_msg` message +time: 2023-12-14T13:47:28.444107-07:00 +custom: + Author: dbeatty10 + Issue: "962" diff --git a/dbt/include/spark/macros/materializations/incremental/validate.sql b/dbt/include/spark/macros/materializations/incremental/validate.sql index 88b851ca4..0d4c4d8b6 100644 --- a/dbt/include/spark/macros/materializations/incremental/validate.sql +++ b/dbt/include/spark/macros/materializations/incremental/validate.sql @@ -29,17 +29,12 @@ You can only choose this strategy when file_format is set to 'delta' or 'iceberg' or 'hudi' {%- endset %} - {% set invalid_insert_overwrite_delta_msg -%} - Invalid incremental strategy provided: {{ raw_strategy }} - You cannot use this strategy when file_format is set to 'delta' or 'iceberg' - Use the 'append' or 'merge' strategy instead - {%- endset %} - {% set invalid_insert_overwrite_endpoint_msg -%} Invalid incremental strategy provided: {{ raw_strategy }} You cannot use this strategy when connecting via endpoint Use the 'append' or 'merge' strategy instead {%- endset %} + {% if raw_strategy not in ['append', 'merge', 'insert_overwrite'] %} {% do exceptions.raise_compiler_error(invalid_strategy_msg) %} {%-else %} From 5210d0a9746443c8a2cf217c16c919a73f3ba543 Mon Sep 17 00:00:00 2001 From: Ben Schreiber <74134279+ben-schreiber@users.noreply.github.com> Date: Thu, 21 Dec 2023 19:45:14 +0200 Subject: [PATCH 13/13] Fix hardcoded file format in python materializations (#955) * Fix hardcoded file format in python materializations * Add changelog --- .changes/unreleased/Fixes-20231221-081949.yaml | 6 ++++++ dbt/include/spark/macros/materializations/table.sql | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Fixes-20231221-081949.yaml diff --git a/.changes/unreleased/Fixes-20231221-081949.yaml b/.changes/unreleased/Fixes-20231221-081949.yaml new file mode 100644 index 000000000..b10c8141e --- /dev/null +++ b/.changes/unreleased/Fixes-20231221-081949.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: Fix hardcoded file format for python models +time: 2023-12-21T08:19:49.630806+02:00 +custom: + Author: ben-schreiber + Issue: "803" diff --git a/dbt/include/spark/macros/materializations/table.sql b/dbt/include/spark/macros/materializations/table.sql index 39a9caba9..b7c56c424 100644 --- a/dbt/include/spark/macros/materializations/table.sql +++ b/dbt/include/spark/macros/materializations/table.sql @@ -98,7 +98,7 @@ else: msg = f"{type(df)} is not a supported type for dbt Python materialization" raise Exception(msg) -df.write.mode("overwrite").format("delta").option("overwriteSchema", "true").saveAsTable("{{ target_relation }}") +df.write.mode("overwrite").format("{{ config.get('file_format', 'delta') }}").option("overwriteSchema", "true").saveAsTable("{{ target_relation }}") {%- endmacro -%} {%macro py_script_comment()%}