dbt-firebolt 1.7.0__py3-none-any.whl → 1.8.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.
- dbt/adapters/firebolt/__init__.py +1 -1
- dbt/adapters/firebolt/connections.py +19 -13
- dbt/adapters/firebolt/impl.py +6 -6
- dbt/adapters/firebolt/relation.py +4 -4
- {dbt_firebolt-1.7.0.dist-info → dbt_firebolt-1.8.1.dist-info}/METADATA +4 -3
- {dbt_firebolt-1.7.0.dist-info → dbt_firebolt-1.8.1.dist-info}/RECORD +9 -9
- {dbt_firebolt-1.7.0.dist-info → dbt_firebolt-1.8.1.dist-info}/LICENSE +0 -0
- {dbt_firebolt-1.7.0.dist-info → dbt_firebolt-1.8.1.dist-info}/WHEEL +0 -0
- {dbt_firebolt-1.7.0.dist-info → dbt_firebolt-1.8.1.dist-info}/top_level.txt +0 -0
@@ -1,19 +1,23 @@
|
|
1
1
|
from contextlib import contextmanager
|
2
2
|
from dataclasses import dataclass
|
3
3
|
from datetime import datetime
|
4
|
+
from multiprocessing.context import SpawnContext
|
4
5
|
from typing import Generator, Optional, Tuple, Union
|
5
6
|
|
6
|
-
|
7
|
-
from dbt.adapters.base import Credentials
|
8
|
-
from dbt.adapters.sql import SQLConnectionManager
|
9
|
-
from dbt.contracts.connection import (
|
7
|
+
from dbt.adapters.contracts.connection import (
|
10
8
|
AdapterRequiredConfig,
|
11
9
|
AdapterResponse,
|
12
10
|
Connection,
|
11
|
+
Credentials,
|
13
12
|
QueryComment,
|
14
13
|
)
|
15
|
-
from dbt.events import AdapterLogger
|
16
|
-
from dbt.
|
14
|
+
from dbt.adapters.events.logging import AdapterLogger
|
15
|
+
from dbt.adapters.sql.connections import SQLConnectionManager
|
16
|
+
from dbt_common.exceptions import (
|
17
|
+
DbtConfigError,
|
18
|
+
DbtRuntimeError,
|
19
|
+
NotImplementedError,
|
20
|
+
)
|
17
21
|
from firebolt.client import DEFAULT_API_URL
|
18
22
|
from firebolt.client.auth import Auth, ClientCredentials, UsernamePassword
|
19
23
|
from firebolt.db import ARRAY, DECIMAL
|
@@ -40,18 +44,22 @@ class FireboltCredentials(Credentials):
|
|
40
44
|
account_name: Optional[str] = None
|
41
45
|
retries: int = 1
|
42
46
|
|
47
|
+
_ALIASES = {
|
48
|
+
'host': 'api_endpoint',
|
49
|
+
}
|
50
|
+
|
43
51
|
def __post_init__(self) -> None:
|
44
52
|
# If user and password are not provided, assume client_id and client_secret
|
45
53
|
# are provided instead
|
46
54
|
if not self.user and not self.password:
|
47
55
|
if not self.client_id or not self.client_secret:
|
48
|
-
raise
|
56
|
+
raise DbtConfigError(
|
49
57
|
'Either user and password or client_id and client_secret'
|
50
58
|
' must be provided'
|
51
59
|
)
|
52
60
|
else:
|
53
61
|
if self.client_id or self.client_secret:
|
54
|
-
raise
|
62
|
+
raise DbtConfigError(
|
55
63
|
'Either user and password or client_id and client_secret'
|
56
64
|
' must be provided'
|
57
65
|
)
|
@@ -99,13 +107,13 @@ class FireboltConnectionManager(SQLConnectionManager):
|
|
99
107
|
|
100
108
|
TYPE = 'firebolt'
|
101
109
|
|
102
|
-
def __init__(self, profile: AdapterRequiredConfig):
|
110
|
+
def __init__(self, profile: AdapterRequiredConfig, mp_context: SpawnContext):
|
103
111
|
# Query comment in appent mode only
|
104
112
|
# This allows clearer view of queries in query_history
|
105
113
|
if not hasattr(profile, 'query_comment'):
|
106
114
|
setattr(profile, 'query_comment', QueryComment())
|
107
115
|
profile.query_comment.append = True
|
108
|
-
super().__init__(profile)
|
116
|
+
super().__init__(profile, mp_context)
|
109
117
|
|
110
118
|
def __str__(self) -> str:
|
111
119
|
return 'FireboltConnectionManager()'
|
@@ -181,9 +189,7 @@ class FireboltConnectionManager(SQLConnectionManager):
|
|
181
189
|
|
182
190
|
def cancel(self, connection: Connection) -> None:
|
183
191
|
"""Cancel the last query on the given connection."""
|
184
|
-
raise
|
185
|
-
'`cancel` is not implemented for this adapter!'
|
186
|
-
)
|
192
|
+
raise NotImplementedError('`cancel` is not implemented for this adapter!')
|
187
193
|
|
188
194
|
@classmethod
|
189
195
|
def data_type_code_to_name( # type: ignore[override] # FIR-29423
|
dbt/adapters/firebolt/impl.py
CHANGED
@@ -5,9 +5,8 @@ from datetime import datetime
|
|
5
5
|
from typing import Any, List, Mapping, Optional, Union
|
6
6
|
|
7
7
|
import agate
|
8
|
-
from dbt.adapters.base import available # type: ignore
|
9
|
-
from dbt.adapters.base.impl import AdapterConfig # type: ignore
|
10
8
|
from dbt.adapters.base.impl import ConstraintSupport
|
9
|
+
from dbt.adapters.base.meta import available
|
11
10
|
from dbt.adapters.base.relation import BaseRelation
|
12
11
|
from dbt.adapters.capability import (
|
13
12
|
Capability,
|
@@ -15,10 +14,11 @@ from dbt.adapters.capability import (
|
|
15
14
|
CapabilitySupport,
|
16
15
|
Support,
|
17
16
|
)
|
18
|
-
from dbt.adapters.
|
19
|
-
from dbt.
|
20
|
-
from
|
21
|
-
from
|
17
|
+
from dbt.adapters.protocol import AdapterConfig
|
18
|
+
from dbt.adapters.sql.impl import SQLAdapter
|
19
|
+
from dbt_common.contracts.constraints import ConstraintType
|
20
|
+
from dbt_common.dataclass_schema import ValidationError, dbtClassMixin
|
21
|
+
from dbt_common.exceptions import (
|
22
22
|
CompilationError,
|
23
23
|
DbtRuntimeError,
|
24
24
|
NotImplementedError,
|
@@ -1,10 +1,10 @@
|
|
1
1
|
from dataclasses import dataclass, field
|
2
2
|
from typing import Dict, FrozenSet, Optional
|
3
3
|
|
4
|
-
from dbt.adapters.base import
|
5
|
-
from dbt.adapters.
|
6
|
-
from dbt.adapters.relation_configs import RelationConfigBase
|
7
|
-
from
|
4
|
+
from dbt.adapters.base.relation import BaseRelation
|
5
|
+
from dbt.adapters.contracts.relation import Policy, RelationType
|
6
|
+
from dbt.adapters.relation_configs.config_base import RelationConfigBase
|
7
|
+
from dbt_common.exceptions import DbtRuntimeError
|
8
8
|
|
9
9
|
|
10
10
|
@dataclass
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: dbt-firebolt
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.8.1
|
4
4
|
Summary: The Firebolt adapter plugin for dbt (data build tool)
|
5
5
|
Home-page: https://github.com/firebolt-db/dbt-firebolt
|
6
6
|
Author: Firebolt
|
@@ -16,8 +16,9 @@ Classifier: Programming Language :: Python :: 3.9
|
|
16
16
|
Requires-Python: >=3.8
|
17
17
|
Description-Content-Type: text/markdown
|
18
18
|
License-File: LICENSE
|
19
|
-
Requires-Dist: dbt-
|
20
|
-
Requires-Dist:
|
19
|
+
Requires-Dist: dbt-adapters <2.0,>=1.0
|
20
|
+
Requires-Dist: dbt-core >=1.8.0
|
21
|
+
Requires-Dist: firebolt-sdk >=1.5.0
|
21
22
|
Requires-Dist: pydantic >=0.23
|
22
23
|
Provides-Extra: dev
|
23
24
|
Requires-Dist: allure-pytest ==2.* ; extra == 'dev'
|
@@ -1,9 +1,9 @@
|
|
1
|
-
dbt/adapters/firebolt/__init__.py,sha256=
|
1
|
+
dbt/adapters/firebolt/__init__.py,sha256=9aBbFLagxZS-jN6NXO9V4GuNfFOMir0711l55MIer6w,411
|
2
2
|
dbt/adapters/firebolt/__version__.py,sha256=zRlZGglif76ZVuWWSjsH_MMPgtVQqmj-SryYJW25FL4,69
|
3
3
|
dbt/adapters/firebolt/column.py,sha256=COo_wjhCFgS3GFcPIPcoq7WAWgzN6DB2XqG-gk51WBc,539
|
4
|
-
dbt/adapters/firebolt/connections.py,sha256=
|
5
|
-
dbt/adapters/firebolt/impl.py,sha256=
|
6
|
-
dbt/adapters/firebolt/relation.py,sha256=
|
4
|
+
dbt/adapters/firebolt/connections.py,sha256=r7imGPka0klw1ev-5GTSIwUbO-Df_5DE4Ss-9OfLBMk,7990
|
5
|
+
dbt/adapters/firebolt/impl.py,sha256=vHK7AfpmMdZMCHaky3IEufl18IYFPs9mdvdmTpMrUh4,13939
|
6
|
+
dbt/adapters/firebolt/relation.py,sha256=Xg3Nrjw3UrF_qwnuGbPT97rSXRiDP1GlIAoBF4b7QnY,1922
|
7
7
|
dbt/adapters/firebolt/relation_configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
8
|
dbt/include/firebolt/__init__.py,sha256=vBGWeG-dHHkimfnX8axBJ4IgAowFw8xADmo6Auzn2xc,52
|
9
9
|
dbt/include/firebolt/dbt_project.yml,sha256=uHJ-i0wD1D74DWSSSzsFKoKbAN1w4LBgVpnkm8e-M1g,76
|
@@ -53,8 +53,8 @@ dbt/include/firebolt/macros/utils/position.sql,sha256=WPo9_bhvNYJooEAsHC9OcnNAwU
|
|
53
53
|
dbt/include/firebolt/macros/utils/right.sql,sha256=_mm1_2MvlOH4O6CmYhgvVxMLfDxAvgv-EMwZ8OBOq-I,254
|
54
54
|
dbt/include/firebolt/macros/utils/split_part.sql,sha256=5dUlbx3Pt1iWWaIlxiXyYUwUqzXuLLXMB-1aGJHNk4o,464
|
55
55
|
dbt/include/firebolt/macros/utils/timestamps.sql,sha256=22g-QpJjBuBUQOHNpQ_TuMRa-cHxaxXPv8ItEUo-vEk,397
|
56
|
-
dbt_firebolt-1.
|
57
|
-
dbt_firebolt-1.
|
58
|
-
dbt_firebolt-1.
|
59
|
-
dbt_firebolt-1.
|
60
|
-
dbt_firebolt-1.
|
56
|
+
dbt_firebolt-1.8.1.dist-info/LICENSE,sha256=Nn0EGvW3qmoZpBV_JVM3iPukFf3RiNCIizrWe_2oTHk,11354
|
57
|
+
dbt_firebolt-1.8.1.dist-info/METADATA,sha256=dTjTrACpMqv6fx2vGcP7gq01LevtxZnQS6_iRTmhSq4,5070
|
58
|
+
dbt_firebolt-1.8.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
59
|
+
dbt_firebolt-1.8.1.dist-info/top_level.txt,sha256=B2YH4he17ajilEWOGCKHbRcEJlCuZKwCcgFcLPntLsE,4
|
60
|
+
dbt_firebolt-1.8.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|