-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5bf57b
commit 706ff32
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"]) |