dbt-adapters 1.2.1__py3-none-any.whl → 1.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dbt-adapters might be problematic. Click here for more details.
- dbt/adapters/__about__.py +1 -1
- dbt/adapters/base/impl.py +11 -3
- dbt/adapters/capability.py +6 -1
- dbt/adapters/sql/impl.py +1 -1
- dbt/include/global_project/macros/adapters/metadata.sql +9 -0
- {dbt_adapters-1.2.1.dist-info → dbt_adapters-1.3.1.dist-info}/METADATA +2 -2
- {dbt_adapters-1.2.1.dist-info → dbt_adapters-1.3.1.dist-info}/RECORD +9 -9
- {dbt_adapters-1.2.1.dist-info → dbt_adapters-1.3.1.dist-info}/WHEEL +0 -0
- {dbt_adapters-1.2.1.dist-info → dbt_adapters-1.3.1.dist-info}/licenses/LICENSE +0 -0
dbt/adapters/__about__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
version = "1.
|
|
1
|
+
version = "1.3.1"
|
dbt/adapters/base/impl.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import abc
|
|
2
|
+
import time
|
|
2
3
|
from concurrent.futures import as_completed, Future
|
|
3
4
|
from contextlib import contextmanager
|
|
4
5
|
from datetime import datetime
|
|
5
6
|
from enum import Enum
|
|
6
7
|
from multiprocessing.context import SpawnContext
|
|
7
|
-
import time
|
|
8
8
|
from typing import (
|
|
9
9
|
Any,
|
|
10
10
|
Callable,
|
|
@@ -23,12 +23,15 @@ from typing import (
|
|
|
23
23
|
TYPE_CHECKING,
|
|
24
24
|
)
|
|
25
25
|
|
|
26
|
+
import pytz
|
|
26
27
|
from dbt_common.clients.jinja import CallableMacroGenerator
|
|
27
28
|
from dbt_common.contracts.constraints import (
|
|
28
29
|
ColumnLevelConstraint,
|
|
29
30
|
ConstraintType,
|
|
30
31
|
ModelLevelConstraint,
|
|
31
32
|
)
|
|
33
|
+
from dbt_common.contracts.metadata import CatalogTable
|
|
34
|
+
from dbt_common.events.functions import fire_event, warn_or_error
|
|
32
35
|
from dbt_common.exceptions import (
|
|
33
36
|
DbtInternalError,
|
|
34
37
|
DbtRuntimeError,
|
|
@@ -38,14 +41,12 @@ from dbt_common.exceptions import (
|
|
|
38
41
|
NotImplementedError,
|
|
39
42
|
UnexpectedNullError,
|
|
40
43
|
)
|
|
41
|
-
from dbt_common.events.functions import fire_event, warn_or_error
|
|
42
44
|
from dbt_common.utils import (
|
|
43
45
|
AttrDict,
|
|
44
46
|
cast_to_str,
|
|
45
47
|
executor,
|
|
46
48
|
filter_null_values,
|
|
47
49
|
)
|
|
48
|
-
import pytz
|
|
49
50
|
|
|
50
51
|
from dbt.adapters.base.column import Column as BaseColumn
|
|
51
52
|
from dbt.adapters.base.connections import (
|
|
@@ -222,6 +223,7 @@ class BaseAdapter(metaclass=AdapterMeta):
|
|
|
222
223
|
- truncate_relation
|
|
223
224
|
- rename_relation
|
|
224
225
|
- get_columns_in_relation
|
|
226
|
+
- get_catalog_for_single_relation
|
|
225
227
|
- get_column_schema_from_query
|
|
226
228
|
- expand_column_types
|
|
227
229
|
- list_relations_without_caching
|
|
@@ -627,6 +629,12 @@ class BaseAdapter(metaclass=AdapterMeta):
|
|
|
627
629
|
"""Get a list of the columns in the given Relation."""
|
|
628
630
|
raise NotImplementedError("`get_columns_in_relation` is not implemented for this adapter!")
|
|
629
631
|
|
|
632
|
+
def get_catalog_for_single_relation(self, relation: BaseRelation) -> Optional[CatalogTable]:
|
|
633
|
+
"""Get catalog information including table-level and column-level metadata for a single relation."""
|
|
634
|
+
raise NotImplementedError(
|
|
635
|
+
"`get_catalog_for_single_relation` is not implemented for this adapter!"
|
|
636
|
+
)
|
|
637
|
+
|
|
630
638
|
@available.deprecated("get_columns_in_relation", lambda *a, **k: [])
|
|
631
639
|
def get_columns_in_table(self, schema: str, identifier: str) -> List[BaseColumn]:
|
|
632
640
|
"""DEPRECATED: Get a list of the columns in the given table."""
|
dbt/adapters/capability.py
CHANGED
|
@@ -14,7 +14,12 @@ class Capability(str, Enum):
|
|
|
14
14
|
"""Indicates support for determining the time of the last table modification by querying database metadata."""
|
|
15
15
|
|
|
16
16
|
TableLastModifiedMetadataBatch = "TableLastModifiedMetadataBatch"
|
|
17
|
-
"""Indicates support for performantly determining the time of the last table modification by querying database
|
|
17
|
+
"""Indicates support for performantly determining the time of the last table modification by querying database
|
|
18
|
+
metadata in batch."""
|
|
19
|
+
|
|
20
|
+
GetCatalogForSingleRelation = "GetCatalogForSingleRelation"
|
|
21
|
+
"""Indicates support for getting catalog information including table-level and column-level metadata for a single
|
|
22
|
+
relation."""
|
|
18
23
|
|
|
19
24
|
|
|
20
25
|
class Support(str, Enum):
|
dbt/adapters/sql/impl.py
CHANGED
|
@@ -9,7 +9,6 @@ from dbt.adapters.events.types import ColTypeChange, SchemaCreation, SchemaDrop
|
|
|
9
9
|
from dbt.adapters.exceptions import RelationTypeNullError
|
|
10
10
|
from dbt.adapters.sql.connections import SQLConnectionManager
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
LIST_RELATIONS_MACRO_NAME = "list_relations_without_caching"
|
|
14
13
|
GET_COLUMNS_IN_RELATION_MACRO_NAME = "get_columns_in_relation"
|
|
15
14
|
LIST_SCHEMAS_MACRO_NAME = "list_schemas"
|
|
@@ -41,6 +40,7 @@ class SQLAdapter(BaseAdapter):
|
|
|
41
40
|
- get_catalog
|
|
42
41
|
- list_relations_without_caching
|
|
43
42
|
- get_columns_in_relation
|
|
43
|
+
- get_catalog_for_single_relation
|
|
44
44
|
"""
|
|
45
45
|
|
|
46
46
|
ConnectionManager: Type[SQLConnectionManager]
|
|
@@ -77,6 +77,15 @@
|
|
|
77
77
|
'list_relations_without_caching macro not implemented for adapter '+adapter.type()) }}
|
|
78
78
|
{% endmacro %}
|
|
79
79
|
|
|
80
|
+
{% macro get_catalog_for_single_relation(relation) %}
|
|
81
|
+
{{ return(adapter.dispatch('get_catalog_for_single_relation', 'dbt')(relation)) }}
|
|
82
|
+
{% endmacro %}
|
|
83
|
+
|
|
84
|
+
{% macro default__get_catalog_for_single_relation(relation) %}
|
|
85
|
+
{{ exceptions.raise_not_implemented(
|
|
86
|
+
'get_catalog_for_single_relation macro not implemented for adapter '+adapter.type()) }}
|
|
87
|
+
{% endmacro %}
|
|
88
|
+
|
|
80
89
|
{% macro get_relations() %}
|
|
81
90
|
{{ return(adapter.dispatch('get_relations', 'dbt')()) }}
|
|
82
91
|
{% endmacro %}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: dbt-adapters
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.1
|
|
4
4
|
Summary: The set of adapter protocols and base functionality that supports integration with dbt-core
|
|
5
5
|
Project-URL: Homepage, https://github.com/dbt-labs/dbt-adapters
|
|
6
6
|
Project-URL: Documentation, https://docs.getdbt.com
|
|
@@ -23,7 +23,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
24
24
|
Requires-Python: >=3.8.0
|
|
25
25
|
Requires-Dist: agate<2.0,>=1.0
|
|
26
|
-
Requires-Dist: dbt-common<2.0
|
|
26
|
+
Requires-Dist: dbt-common<2.0,>=1.3
|
|
27
27
|
Requires-Dist: mashumaro[msgpack]<4.0,>=3.0
|
|
28
28
|
Requires-Dist: protobuf<5.0,>=3.0
|
|
29
29
|
Requires-Dist: pytz>=2015.7
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
dbt/__init__.py,sha256=iY4jdvOxcDhkdr5FiyOTZPHadKtMZDQ-qC6Fw6_EHPM,277
|
|
2
|
-
dbt/adapters/__about__.py,sha256=
|
|
2
|
+
dbt/adapters/__about__.py,sha256=oyhzj6TSqsw4so-XUNSuGbvYxITFEVPNrc2-pPJ1gLc,18
|
|
3
3
|
dbt/adapters/__init__.py,sha256=3noHsg-64qI0_Pw6OR9F7l1vU2_qrJvinq8POTtuaZM,252
|
|
4
4
|
dbt/adapters/cache.py,sha256=WGy4ewnz-J13LverTACBW2iFhGswrWLgm-wiBrQnMzo,20084
|
|
5
|
-
dbt/adapters/capability.py,sha256
|
|
5
|
+
dbt/adapters/capability.py,sha256=-Mbej2AL_bjQatHpFWUgsQ8z0zwnotyE9Y5DYHnX7NE,2364
|
|
6
6
|
dbt/adapters/factory.py,sha256=JxNxhMqemZ6ARWbROQZhkhJehiIenuR9ZQYS8gvzbDg,9368
|
|
7
7
|
dbt/adapters/protocol.py,sha256=qRsEFAKjUMVnoBspAiCUTICez1ckson-dFS04dTXSco,3818
|
|
8
8
|
dbt/adapters/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -13,7 +13,7 @@ dbt/adapters/base/README.md,sha256=muHQntC07Lh6L1XfVgwKhV5RltOPBLYPdQqd8_7l34c,5
|
|
|
13
13
|
dbt/adapters/base/__init__.py,sha256=KGGGbj8jGMjAFJdQ5YHcOpApMMVZ_6Xuni1swhpkqRY,423
|
|
14
14
|
dbt/adapters/base/column.py,sha256=M3iotEY5yi4xikXyXzD9oshBF9-xcJrIeQVu1sB85DI,5450
|
|
15
15
|
dbt/adapters/base/connections.py,sha256=-C5dOwGgMKH8n_v6wjwOxV7chBdS0GjOGwNQCUbhhWc,16951
|
|
16
|
-
dbt/adapters/base/impl.py,sha256=
|
|
16
|
+
dbt/adapters/base/impl.py,sha256=wJMep68vVx79blXXA1RYKAbIP5PCsbpW2DVnfZ3tRTY,68786
|
|
17
17
|
dbt/adapters/base/meta.py,sha256=MMqL2xBqdvoacNs9JcL0E38NZIhCP4RH4OD_z_jo7GQ,4644
|
|
18
18
|
dbt/adapters/base/plugin.py,sha256=rm0GjNHnWM2mn0GJOjciZLwn-02xlzWCoMT9u-epwP0,1076
|
|
19
19
|
dbt/adapters/base/query_headers.py,sha256=UluGd9IYCYkoMiDi5Yx_lnrCOSjWppjwRro4SIGgx8I,3496
|
|
@@ -44,7 +44,7 @@ dbt/adapters/relation_configs/config_change.py,sha256=hf6fDWbZpKvZdM6z-OtY-Gveip
|
|
|
44
44
|
dbt/adapters/relation_configs/config_validation.py,sha256=wlJUMwOEPhYFch-LRtEWfLNJMq8jL1tRhOUHmNX8nFw,1978
|
|
45
45
|
dbt/adapters/sql/__init__.py,sha256=WLWZJfqc8pr1N1BMVe9gM-KQ4URJIeKfLqTuJBD1VN0,107
|
|
46
46
|
dbt/adapters/sql/connections.py,sha256=MfeQw0YH3k8nu4wdkeMRukav1o0nPiEL3uifkbspRf4,6620
|
|
47
|
-
dbt/adapters/sql/impl.py,sha256=
|
|
47
|
+
dbt/adapters/sql/impl.py,sha256=HmH3eC-qVeCAAukjEOnUNZbH-UK32X-NL4kwb_EHzs0,10763
|
|
48
48
|
dbt/include/__init__.py,sha256=qEFeq3yuf3lQKVseALmL8aPM8fpCS54B_5pry00M3hk,76
|
|
49
49
|
dbt/include/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
50
50
|
dbt/include/global_project/__init__.py,sha256=-0HL5OkeJSrxglm1Y-UltTiBPY2BbWx8ZpTiJ7ypSvw,73
|
|
@@ -54,7 +54,7 @@ dbt/include/global_project/macros/adapters/apply_grants.sql,sha256=Vyb0VNmlgoXzE
|
|
|
54
54
|
dbt/include/global_project/macros/adapters/columns.sql,sha256=EUze4gUUDD1pnWytOpjk3p-7EFpqeqeI0LiPf2FbUVo,5438
|
|
55
55
|
dbt/include/global_project/macros/adapters/freshness.sql,sha256=FKi-xsBCOYjGYp103O1mVTeWKy2blb_JefyoLDF0aXI,599
|
|
56
56
|
dbt/include/global_project/macros/adapters/indexes.sql,sha256=DasPn32Cm0OZyjBPBWzL4BpK9PZ3xF_Pu8Nh4NgASaw,1366
|
|
57
|
-
dbt/include/global_project/macros/adapters/metadata.sql,sha256=
|
|
57
|
+
dbt/include/global_project/macros/adapters/metadata.sql,sha256=meNIc3z4lXdh1lDb-K1utKb8VzAVuN23E6XWgMZGDhQ,3512
|
|
58
58
|
dbt/include/global_project/macros/adapters/persist_docs.sql,sha256=TUazJHSaMIDlELqALLRMC2kYj5DGZ9U-6K8RbgwRXw4,1369
|
|
59
59
|
dbt/include/global_project/macros/adapters/relation.sql,sha256=RyUZAAGCQHU6YA43_5-zApp2PcvGTgLMXg61sqhe5vc,2800
|
|
60
60
|
dbt/include/global_project/macros/adapters/schema.sql,sha256=XElo0cfvdEipI5hpulLXLBEXP_YnilG-1kRwDMqDD5I,594
|
|
@@ -149,7 +149,7 @@ dbt/include/global_project/macros/utils/right.sql,sha256=EwNG98CAFIwNDmarwopf7Rk
|
|
|
149
149
|
dbt/include/global_project/macros/utils/safe_cast.sql,sha256=1mswwkDACmIi1I99JKb_-vq3kjMe4HhMRV70mW8Bt4Y,298
|
|
150
150
|
dbt/include/global_project/macros/utils/split_part.sql,sha256=fXEIS0oIiYR7-4lYbb0QbZdG-q2TpV63AFd1ky4I5UM,714
|
|
151
151
|
dbt/include/global_project/tests/generic/builtin.sql,sha256=p94xdyPwb2TlxgLBqCfrcRfJ1QNgsjPvBm8f0Q5eqZM,1022
|
|
152
|
-
dbt_adapters-1.
|
|
153
|
-
dbt_adapters-1.
|
|
154
|
-
dbt_adapters-1.
|
|
155
|
-
dbt_adapters-1.
|
|
152
|
+
dbt_adapters-1.3.1.dist-info/METADATA,sha256=9TgPGVx-sPP7No5TZ1db6lXcOvhi6u5JTVXerxjOW6M,2539
|
|
153
|
+
dbt_adapters-1.3.1.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
|
154
|
+
dbt_adapters-1.3.1.dist-info/licenses/LICENSE,sha256=9yjigiJhWcCZvQjdagGKDwrRph58QWc5P2bVSQwXo6s,11344
|
|
155
|
+
dbt_adapters-1.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|