diff --git a/dbt/adapters/base/connections.py b/dbt/adapters/base/connections.py index 6e038297d..bbd95b060 100644 --- a/dbt/adapters/base/connections.py +++ b/dbt/adapters/base/connections.py @@ -77,6 +77,7 @@ def __init__(self, profile: AdapterRequiredConfig, mp_context: SpawnContext) -> self.thread_connections: Dict[Hashable, Connection] = {} self.lock: RLock = mp_context.RLock() self.query_header: Optional[MacroQueryStringSetter] = None + self.catalog_integrations = catalog_integrations or [] def set_query_header(self, query_header_context: Dict[str, Any]) -> None: self.query_header = MacroQueryStringSetter(self.profile, query_header_context) diff --git a/dbt/adapters/contracts/catalog_integration.py b/dbt/adapters/contracts/catalog_integration.py new file mode 100644 index 000000000..92e829fcf --- /dev/null +++ b/dbt/adapters/contracts/catalog_integration.py @@ -0,0 +1,19 @@ +from dataclasses import dataclass + +from dbt_common.dataclass_schema import StrEnum + + +class TableFormat(StrEnum): + iceberg = "iceberg" + + +class CatalogIntegrationType(StrEnum): + glue = "glue" + + +@dataclass +class CatalogIntegration: + name: str + external_volume: str + table_format: TableFormat + type: CatalogIntegrationType \ No newline at end of file diff --git a/dbt/adapters/contracts/connection.py b/dbt/adapters/contracts/connection.py index 2d10c9a32..ad4b31499 100644 --- a/dbt/adapters/contracts/connection.py +++ b/dbt/adapters/contracts/connection.py @@ -28,6 +28,7 @@ from mashumaro.jsonschema.annotations import Pattern from typing_extensions import Protocol, Annotated +from dbt.adapters.contracts.catalog_integration import CatalogIntegration from dbt.adapters.events.types import NewConnectionOpening from dbt.adapters.utils import translate_aliases @@ -227,3 +228,4 @@ class AdapterRequiredConfig(HasCredentials, Protocol): cli_vars: Dict[str, Any] target_path: str log_cache_events: bool + catalog_integrations: Optional[List[CatalogIntegration]]