diff --git a/.changes/unreleased/Features-20230921-180958.yaml b/.changes/unreleased/Features-20230921-180958.yaml new file mode 100644 index 000000000..66141eb5f --- /dev/null +++ b/.changes/unreleased/Features-20230921-180958.yaml @@ -0,0 +1,6 @@ +kind: Features +body: Support storing test failures as views +time: 2023-09-21T18:09:58.174136-04:00 +custom: + Author: mikealfare + Issue: "6914" diff --git a/Makefile b/Makefile index 876440a01..cc1d9f75d 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ dev: ## Installs adapter in develop mode along with development dependencies dev-uninstall: ## Uninstalls all packages while maintaining the virtual environment ## Useful when updating versions, or if you accidentally installed into the system interpreter pip freeze | grep -v "^-e" | cut -d "@" -f1 | xargs pip uninstall -y + pip uninstall -y dbt-spark .PHONY: mypy mypy: ## Runs mypy against staged changes for static type checking. diff --git a/dbt/adapters/spark/impl.py b/dbt/adapters/spark/impl.py index 2864c4f30..feae34129 100644 --- a/dbt/adapters/spark/impl.py +++ b/dbt/adapters/spark/impl.py @@ -347,7 +347,9 @@ def _get_columns_for_catalog(self, relation: BaseRelation) -> Iterable[Dict[str, as_dict["table_database"] = None yield as_dict - def get_catalog(self, manifest: Manifest) -> Tuple[agate.Table, List[Exception]]: + def get_catalog( + self, manifest: Manifest, selected_nodes: Optional[Set] = None + ) -> Tuple[agate.Table, List[Exception]]: schema_map = self._get_catalog_schemas(manifest) if len(schema_map) > 1: raise dbt.exceptions.CompilationError( diff --git a/tests/functional/adapter/store_test_failures_tests/test_store_test_failures.py b/tests/functional/adapter/test_store_test_failures.py similarity index 62% rename from tests/functional/adapter/store_test_failures_tests/test_store_test_failures.py rename to tests/functional/adapter/test_store_test_failures.py index c445fe671..e27cb9b95 100644 --- a/tests/functional/adapter/store_test_failures_tests/test_store_test_failures.py +++ b/tests/functional/adapter/test_store_test_failures.py @@ -1,5 +1,6 @@ import pytest +from dbt.tests.adapter.store_test_failures_tests import basic from dbt.tests.adapter.store_test_failures_tests.test_store_test_failures import ( StoreTestFailuresBase, TEST_AUDIT_SCHEMA_SUFFIX, @@ -42,3 +43,33 @@ def project_config_update(self): def test_store_and_assert_failure_with_delta(self, project): self.run_tests_store_one_failure(project) self.run_tests_store_failures_and_assert(project) + + +@pytest.mark.skip_profile("spark_session") +class TestStoreTestFailuresAsInteractions(basic.StoreTestFailuresAsInteractions): + pass + + +@pytest.mark.skip_profile("spark_session") +class TestStoreTestFailuresAsProjectLevelOff(basic.StoreTestFailuresAsProjectLevelOff): + pass + + +@pytest.mark.skip_profile("spark_session") +class TestStoreTestFailuresAsProjectLevelView(basic.StoreTestFailuresAsProjectLevelView): + pass + + +@pytest.mark.skip_profile("spark_session") +class TestStoreTestFailuresAsGeneric(basic.StoreTestFailuresAsGeneric): + pass + + +@pytest.mark.skip_profile("spark_session") +class TestStoreTestFailuresAsProjectLevelEphemeral(basic.StoreTestFailuresAsProjectLevelEphemeral): + pass + + +@pytest.mark.skip_profile("spark_session") +class TestStoreTestFailuresAsExceptions(basic.StoreTestFailuresAsExceptions): + pass