From 4e71b0a9c157820ea8fa6e2364190dfe568627c7 Mon Sep 17 00:00:00 2001 From: swanderz Date: Thu, 14 Oct 2021 10:25:33 -0600 Subject: [PATCH] drop databse include name --- dbt/adapters/synapse/__init__.py | 1 + dbt/adapters/synapse/impl.py | 2 ++ dbt/adapters/synapse/relation.py | 17 +++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 dbt/adapters/synapse/relation.py diff --git a/dbt/adapters/synapse/__init__.py b/dbt/adapters/synapse/__init__.py index 66b00483..4ea81f3b 100644 --- a/dbt/adapters/synapse/__init__.py +++ b/dbt/adapters/synapse/__init__.py @@ -1,5 +1,6 @@ from dbt.adapters.synapse.connections import SynapseConnectionManager from dbt.adapters.synapse.connections import SynapseCredentials +from dbt.adapters.synapse.relation import SynapseRelation from dbt.adapters.synapse.impl import SynapseAdapter from dbt.adapters.base import AdapterPlugin diff --git a/dbt/adapters/synapse/impl.py b/dbt/adapters/synapse/impl.py index 73d6d563..50f6d671 100644 --- a/dbt/adapters/synapse/impl.py +++ b/dbt/adapters/synapse/impl.py @@ -1,7 +1,9 @@ from dbt.adapters.sqlserver import SQLServerAdapter from dbt.adapters.synapse import SynapseConnectionManager +from dbt.adapters.synapse.relation import SynapseRelation class SynapseAdapter(SQLServerAdapter): + Relation = SynapseRelation ConnectionManager = SynapseConnectionManager \ No newline at end of file diff --git a/dbt/adapters/synapse/relation.py b/dbt/adapters/synapse/relation.py new file mode 100644 index 00000000..0f681b60 --- /dev/null +++ b/dbt/adapters/synapse/relation.py @@ -0,0 +1,17 @@ +from typing import Optional + +from dataclasses import dataclass + +from dbt.adapters.base.relation import BaseRelation, Policy +from dbt.exceptions import RuntimeException + +@dataclass +class SynapseIncludePolicy(Policy): + database: bool = False + schema: bool = True + identifier: bool = True + + +@dataclass(frozen=True, eq=False, repr=False) +class SynapseRelation(BaseRelation): + include_policy: SynapseIncludePolicy = SynapseIncludePolicy() \ No newline at end of file