dbt-firebolt 1.7.0__tar.gz → 1.8.1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/PKG-INFO +1 -1
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/adapters/firebolt/__init__.py +1 -1
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/adapters/firebolt/connections.py +19 -13
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/adapters/firebolt/impl.py +6 -6
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/adapters/firebolt/relation.py +4 -4
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt_firebolt.egg-info/PKG-INFO +1 -1
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt_firebolt.egg-info/requires.txt +3 -2
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/setup.cfg +3 -2
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/LICENSE +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/MANIFEST.in +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/README.md +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/adapters/firebolt/__version__.py +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/adapters/firebolt/column.py +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/adapters/firebolt/relation_configs/__init__.py +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/__init__.py +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/dbt_project.yml +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/adapters/apply_grants.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/adapters/relation.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/adapters.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/catalog.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/dbt_external_tables/create_external_table.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/dbt_external_tables/dropif.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/dbt_external_tables/get_external_build_plan.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/clone.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/materialized_view.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/models/incremental/column_helpers.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/models/incremental/incremental.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/models/incremental/is_incremental.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/models/incremental/merge.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/models/incremental/on_schema_change.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/models/incremental/strategies.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/seed.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/table.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/test.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/view.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/materialized_view/alter.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/materialized_view/create.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/materialized_view/describe.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/materialized_view/drop.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/materialized_view/refresh.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/table/create.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/table/drop.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/table/rename.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/table/replace.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/view/create.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/view/drop.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/view/rename.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/view/replace.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/array_append.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/array_concat.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/array_construct.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/bool_or.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/cast_bool_to_text.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/dateadd.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/datediff.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/except.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/intersect.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/listagg.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/position.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/right.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/split_part.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/timestamps.sql +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt_firebolt.egg-info/SOURCES.txt +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt_firebolt.egg-info/dependency_links.txt +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt_firebolt.egg-info/top_level.txt +0 -0
- {dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/pyproject.toml +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
|
@@ -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
|
@@ -22,8 +22,9 @@ project_urls =
|
|
22
22
|
[options]
|
23
23
|
packages = find_namespace:
|
24
24
|
install_requires =
|
25
|
-
dbt-
|
26
|
-
|
25
|
+
dbt-adapters>=1.0,<2.0
|
26
|
+
dbt-core>=1.8.0
|
27
|
+
firebolt-sdk>=1.5.0
|
27
28
|
pydantic>=0.23
|
28
29
|
python_requires = >=3.8
|
29
30
|
include_package_data = True
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/adapters/firebolt/relation_configs/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/adapters/apply_grants.sql
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/dbt_external_tables/dropif.sql
RENAMED
File without changes
|
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/clone.sql
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/seed.sql
RENAMED
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/table.sql
RENAMED
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/test.sql
RENAMED
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/materializations/view.sql
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/table/create.sql
RENAMED
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/table/drop.sql
RENAMED
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/table/rename.sql
RENAMED
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/table/replace.sql
RENAMED
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/view/create.sql
RENAMED
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/view/drop.sql
RENAMED
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/view/rename.sql
RENAMED
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/relations/view/replace.sql
RENAMED
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/array_append.sql
RENAMED
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/array_concat.sql
RENAMED
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/array_construct.sql
RENAMED
File without changes
|
File without changes
|
{dbt_firebolt-1.7.0 → dbt_firebolt-1.8.1}/dbt/include/firebolt/macros/utils/cast_bool_to_text.sql
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|