apache-airflow-providers-dbt-cloud 3.7.1rc1__py3-none-any.whl → 3.8.0rc1__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 apache-airflow-providers-dbt-cloud might be problematic. Click here for more details.
- airflow/providers/dbt/cloud/__init__.py +3 -3
- airflow/providers/dbt/cloud/get_provider_info.py +3 -2
- airflow/providers/dbt/cloud/hooks/dbt.py +14 -11
- airflow/providers/dbt/cloud/operators/dbt.py +1 -1
- {apache_airflow_providers_dbt_cloud-3.7.1rc1.dist-info → apache_airflow_providers_dbt_cloud-3.8.0rc1.dist-info}/METADATA +8 -8
- {apache_airflow_providers_dbt_cloud-3.7.1rc1.dist-info → apache_airflow_providers_dbt_cloud-3.8.0rc1.dist-info}/RECORD +8 -8
- {apache_airflow_providers_dbt_cloud-3.7.1rc1.dist-info → apache_airflow_providers_dbt_cloud-3.8.0rc1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_dbt_cloud-3.7.1rc1.dist-info → apache_airflow_providers_dbt_cloud-3.8.0rc1.dist-info}/entry_points.txt +0 -0
|
@@ -27,7 +27,7 @@ import packaging.version
|
|
|
27
27
|
|
|
28
28
|
__all__ = ["__version__"]
|
|
29
29
|
|
|
30
|
-
__version__ = "3.
|
|
30
|
+
__version__ = "3.8.0"
|
|
31
31
|
|
|
32
32
|
try:
|
|
33
33
|
from airflow import __version__ as airflow_version
|
|
@@ -35,8 +35,8 @@ except ImportError:
|
|
|
35
35
|
from airflow.version import version as airflow_version
|
|
36
36
|
|
|
37
37
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
38
|
-
"2.
|
|
38
|
+
"2.7.0"
|
|
39
39
|
):
|
|
40
40
|
raise RuntimeError(
|
|
41
|
-
f"The package `apache-airflow-providers-dbt-cloud:{__version__}` needs Apache Airflow 2.
|
|
41
|
+
f"The package `apache-airflow-providers-dbt-cloud:{__version__}` needs Apache Airflow 2.7.0+"
|
|
42
42
|
)
|
|
@@ -28,8 +28,9 @@ def get_provider_info():
|
|
|
28
28
|
"name": "dbt Cloud",
|
|
29
29
|
"description": "`dbt Cloud <https://www.getdbt.com/product/dbt-cloud/>`__\n",
|
|
30
30
|
"state": "ready",
|
|
31
|
-
"source-date-epoch":
|
|
31
|
+
"source-date-epoch": 1714476223,
|
|
32
32
|
"versions": [
|
|
33
|
+
"3.8.0",
|
|
33
34
|
"3.7.1",
|
|
34
35
|
"3.7.0",
|
|
35
36
|
"3.6.1",
|
|
@@ -56,7 +57,7 @@ def get_provider_info():
|
|
|
56
57
|
"1.0.1",
|
|
57
58
|
],
|
|
58
59
|
"dependencies": [
|
|
59
|
-
"apache-airflow>=2.
|
|
60
|
+
"apache-airflow>=2.7.0",
|
|
60
61
|
"apache-airflow-providers-http",
|
|
61
62
|
"asgiref",
|
|
62
63
|
"aiohttp>=3.9.2",
|
|
@@ -165,7 +165,7 @@ def provide_account_id(func: T) -> T:
|
|
|
165
165
|
|
|
166
166
|
class DbtCloudHook(HttpHook):
|
|
167
167
|
"""
|
|
168
|
-
Interact with dbt Cloud using the V2 API.
|
|
168
|
+
Interact with dbt Cloud using the V2 (V3 if supported) API.
|
|
169
169
|
|
|
170
170
|
:param dbt_cloud_conn_id: The ID of the :ref:`dbt Cloud connection <howto/connection:dbt-cloud>`.
|
|
171
171
|
"""
|
|
@@ -194,7 +194,7 @@ class DbtCloudHook(HttpHook):
|
|
|
194
194
|
|
|
195
195
|
@staticmethod
|
|
196
196
|
def get_request_url_params(
|
|
197
|
-
tenant: str, endpoint: str, include_related: list[str] | None = None
|
|
197
|
+
tenant: str, endpoint: str, include_related: list[str] | None = None, *, api_version: str = "v2"
|
|
198
198
|
) -> tuple[str, dict[str, Any]]:
|
|
199
199
|
"""
|
|
200
200
|
Form URL from base url and endpoint url.
|
|
@@ -207,7 +207,7 @@ class DbtCloudHook(HttpHook):
|
|
|
207
207
|
data: dict[str, Any] = {}
|
|
208
208
|
if include_related:
|
|
209
209
|
data = {"include_related": include_related}
|
|
210
|
-
url = f"https://{tenant}/api/
|
|
210
|
+
url = f"https://{tenant}/api/{api_version}/accounts/{endpoint or ''}"
|
|
211
211
|
return url, data
|
|
212
212
|
|
|
213
213
|
async def get_headers_tenants_from_connection(self) -> tuple[dict[str, Any], str]:
|
|
@@ -270,7 +270,7 @@ class DbtCloudHook(HttpHook):
|
|
|
270
270
|
|
|
271
271
|
def get_conn(self, *args, **kwargs) -> Session:
|
|
272
272
|
tenant = self._get_tenant_domain(self.connection)
|
|
273
|
-
self.base_url = f"https://{tenant}/
|
|
273
|
+
self.base_url = f"https://{tenant}/"
|
|
274
274
|
|
|
275
275
|
session = Session()
|
|
276
276
|
session.auth = self.auth_type(self.connection.password)
|
|
@@ -298,23 +298,26 @@ class DbtCloudHook(HttpHook):
|
|
|
298
298
|
|
|
299
299
|
def _run_and_get_response(
|
|
300
300
|
self,
|
|
301
|
+
*,
|
|
301
302
|
method: str = "GET",
|
|
302
303
|
endpoint: str | None = None,
|
|
303
304
|
payload: str | dict[str, Any] | None = None,
|
|
304
305
|
paginate: bool = False,
|
|
306
|
+
api_version: str = "v2",
|
|
305
307
|
) -> Any:
|
|
306
308
|
self.method = method
|
|
309
|
+
full_endpoint = f"api/{api_version}/accounts/{endpoint}" if endpoint else None
|
|
307
310
|
|
|
308
311
|
if paginate:
|
|
309
312
|
if isinstance(payload, str):
|
|
310
313
|
raise ValueError("Payload cannot be a string to paginate a response.")
|
|
311
314
|
|
|
312
|
-
if
|
|
313
|
-
return self._paginate(endpoint=
|
|
314
|
-
else:
|
|
315
|
-
raise ValueError("An endpoint is needed to paginate a response.")
|
|
315
|
+
if full_endpoint:
|
|
316
|
+
return self._paginate(endpoint=full_endpoint, payload=payload)
|
|
316
317
|
|
|
317
|
-
|
|
318
|
+
raise ValueError("An endpoint is needed to paginate a response.")
|
|
319
|
+
|
|
320
|
+
return self.run(endpoint=full_endpoint, data=payload)
|
|
318
321
|
|
|
319
322
|
def list_accounts(self) -> list[Response]:
|
|
320
323
|
"""
|
|
@@ -342,7 +345,7 @@ class DbtCloudHook(HttpHook):
|
|
|
342
345
|
:param account_id: Optional. The ID of a dbt Cloud account.
|
|
343
346
|
:return: List of request responses.
|
|
344
347
|
"""
|
|
345
|
-
return self._run_and_get_response(endpoint=f"{account_id}/projects/", paginate=True)
|
|
348
|
+
return self._run_and_get_response(endpoint=f"{account_id}/projects/", paginate=True, api_version="v3")
|
|
346
349
|
|
|
347
350
|
@fallback_to_default_account
|
|
348
351
|
def get_project(self, project_id: int, account_id: int | None = None) -> Response:
|
|
@@ -353,7 +356,7 @@ class DbtCloudHook(HttpHook):
|
|
|
353
356
|
:param account_id: Optional. The ID of a dbt Cloud account.
|
|
354
357
|
:return: The request response.
|
|
355
358
|
"""
|
|
356
|
-
return self._run_and_get_response(endpoint=f"{account_id}/projects/{project_id}/")
|
|
359
|
+
return self._run_and_get_response(endpoint=f"{account_id}/projects/{project_id}/", api_version="v3")
|
|
357
360
|
|
|
358
361
|
@fallback_to_default_account
|
|
359
362
|
def list_jobs(
|
|
@@ -135,7 +135,7 @@ class DbtCloudRunJobOperator(BaseOperator):
|
|
|
135
135
|
account_id=self.account_id,
|
|
136
136
|
payload={
|
|
137
137
|
"job_definition_id": self.job_id,
|
|
138
|
-
"
|
|
138
|
+
"status__in": DbtCloudJobRunStatus.NON_TERMINAL_STATUSES,
|
|
139
139
|
"order_by": "-created_at",
|
|
140
140
|
},
|
|
141
141
|
).json()["data"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: apache-airflow-providers-dbt-cloud
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.8.0rc1
|
|
4
4
|
Summary: Provider package apache-airflow-providers-dbt-cloud for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,dbt.cloud,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
@@ -23,13 +23,13 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
23
23
|
Classifier: Topic :: System :: Monitoring
|
|
24
24
|
Requires-Dist: aiohttp>=3.9.2
|
|
25
25
|
Requires-Dist: apache-airflow-providers-http
|
|
26
|
-
Requires-Dist: apache-airflow>=2.
|
|
26
|
+
Requires-Dist: apache-airflow>=2.7.0rc0
|
|
27
27
|
Requires-Dist: asgiref
|
|
28
28
|
Requires-Dist: apache-airflow-providers-http ; extra == "http"
|
|
29
29
|
Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
|
|
30
30
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
31
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.
|
|
32
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.
|
|
31
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.8.0/changelog.html
|
|
32
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.8.0
|
|
33
33
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
34
34
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
35
35
|
Project-URL: Twitter, https://twitter.com/ApacheAirflow
|
|
@@ -81,7 +81,7 @@ Provides-Extra: openlineage
|
|
|
81
81
|
|
|
82
82
|
Package ``apache-airflow-providers-dbt-cloud``
|
|
83
83
|
|
|
84
|
-
Release: ``3.
|
|
84
|
+
Release: ``3.8.0.rc1``
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
`dbt Cloud <https://www.getdbt.com/product/dbt-cloud/>`__
|
|
@@ -94,7 +94,7 @@ This is a provider package for ``dbt.cloud`` provider. All classes for this prov
|
|
|
94
94
|
are in ``airflow.providers.dbt.cloud`` python package.
|
|
95
95
|
|
|
96
96
|
You can find package information and changelog for the provider
|
|
97
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.
|
|
97
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.8.0/>`_.
|
|
98
98
|
|
|
99
99
|
Installation
|
|
100
100
|
------------
|
|
@@ -111,7 +111,7 @@ Requirements
|
|
|
111
111
|
================================= ==================
|
|
112
112
|
PIP package Version required
|
|
113
113
|
================================= ==================
|
|
114
|
-
``apache-airflow`` ``>=2.
|
|
114
|
+
``apache-airflow`` ``>=2.7.0``
|
|
115
115
|
``apache-airflow-providers-http``
|
|
116
116
|
``asgiref``
|
|
117
117
|
``aiohttp`` ``>=3.9.2``
|
|
@@ -138,4 +138,4 @@ Dependent package
|
|
|
138
138
|
============================================================================================================== ===============
|
|
139
139
|
|
|
140
140
|
The changelog for the provider package can be found in the
|
|
141
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.
|
|
141
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.8.0/changelog.html>`_.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
airflow/providers/dbt/cloud/LICENSE,sha256=ywUBpKZc7Jb96rVt5I3IDbg7dIJAbUSHkuoDcF3jbH4,13569
|
|
2
|
-
airflow/providers/dbt/cloud/__init__.py,sha256=
|
|
3
|
-
airflow/providers/dbt/cloud/get_provider_info.py,sha256=
|
|
2
|
+
airflow/providers/dbt/cloud/__init__.py,sha256=DT9jyekBWhbypsfVRXU_S0MOw1olXQDGm97g2BmRucQ,1584
|
|
3
|
+
airflow/providers/dbt/cloud/get_provider_info.py,sha256=RM3t64XWAmgADWrZKsRvq-RGwqnmfC1mCy8CODzO0xg,3329
|
|
4
4
|
airflow/providers/dbt/cloud/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
5
|
-
airflow/providers/dbt/cloud/hooks/dbt.py,sha256=
|
|
5
|
+
airflow/providers/dbt/cloud/hooks/dbt.py,sha256=CleiIF1sfY7lY-r-5x3GzpWAciAHSNSy-A4ce4uMM2M,26284
|
|
6
6
|
airflow/providers/dbt/cloud/operators/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
7
|
-
airflow/providers/dbt/cloud/operators/dbt.py,sha256=
|
|
7
|
+
airflow/providers/dbt/cloud/operators/dbt.py,sha256=7tNFqg4S9YYxvua8KE84keM3CM9UTcw-_m2lP7M_eYY,15634
|
|
8
8
|
airflow/providers/dbt/cloud/sensors/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
|
9
9
|
airflow/providers/dbt/cloud/sensors/dbt.py,sha256=X8Q1YLj76qwj3nAy6a_aF4edID-oJWMfFLVSrrQMZ1k,6860
|
|
10
10
|
airflow/providers/dbt/cloud/triggers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
11
11
|
airflow/providers/dbt/cloud/triggers/dbt.py,sha256=pd7b6SF4IEQrZHb8xNIPHIsIbaKwom2h9eMUU-THMM4,4675
|
|
12
12
|
airflow/providers/dbt/cloud/utils/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
13
13
|
airflow/providers/dbt/cloud/utils/openlineage.py,sha256=mLqqhJfH9W_dn_XME0T1JORCtUX7I7LaCgPUHf8-hsc,5675
|
|
14
|
-
apache_airflow_providers_dbt_cloud-3.
|
|
15
|
-
apache_airflow_providers_dbt_cloud-3.
|
|
16
|
-
apache_airflow_providers_dbt_cloud-3.
|
|
17
|
-
apache_airflow_providers_dbt_cloud-3.
|
|
14
|
+
apache_airflow_providers_dbt_cloud-3.8.0rc1.dist-info/entry_points.txt,sha256=c18L1WEEK18WQeEGrm9kMVqutiYJHiWGH5jU1JqnToE,105
|
|
15
|
+
apache_airflow_providers_dbt_cloud-3.8.0rc1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
|
16
|
+
apache_airflow_providers_dbt_cloud-3.8.0rc1.dist-info/METADATA,sha256=_BPtwiMa5C4DCPRnYcALFg6fkktSjks6pkL_Iy5HB_g,6353
|
|
17
|
+
apache_airflow_providers_dbt_cloud-3.8.0rc1.dist-info/RECORD,,
|
|
File without changes
|