From 706ff326e94a232096ebec03da5669584a41ae2c Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 2 Oct 2024 08:58:51 -0700 Subject: [PATCH] add catalog config to manifest.py --- tests/functional/test_external_catalog.py | 37 +++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tests/functional/test_external_catalog.py diff --git a/tests/functional/test_external_catalog.py b/tests/functional/test_external_catalog.py new file mode 100644 index 00000000000..8e8f89617da --- /dev/null +++ b/tests/functional/test_external_catalog.py @@ -0,0 +1,37 @@ +import pytest +import yaml + +from dbt.tests.util import run_dbt, write_file +from tests.fixtures.jaffle_shop import JaffleShopProject + + +@pytest.fixture(scope="class", autouse=True) +def dbt_catalog_config(project_root): + config = { + "name": "my_project", + "version": "0.1", + "config-version": 2, + "external-catalog": { + "name": "my_external_catalog", + "type": "iceberg", + "configuration": { + "table_format": "parquet", + "namespace": "dbt", + "external_location": "s3://my-bucket/my-path", + }, + "management": { + "enabled": True, + "create_if_not_exists": False, + "alter_if_different": False, + "read_only": True, + "refresh": "on_change", + }, + }, + } + write_file(yaml.safe_dump(config), project_root, "catalog.yml") + + +class TestCatalogConfig(JaffleShopProject): + + def test_supplying_external_catalog(self, project): + run_dbt(["build"])