apache-airflow-providers-dbt-cloud 3.7.1rc1__tar.gz → 3.8.0rc1__tar.gz

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.

Files changed (16) hide show
  1. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/PKG-INFO +8 -8
  2. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/README.rst +4 -4
  3. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/airflow/providers/dbt/cloud/__init__.py +3 -3
  4. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/airflow/providers/dbt/cloud/get_provider_info.py +3 -2
  5. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/airflow/providers/dbt/cloud/hooks/dbt.py +14 -11
  6. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/airflow/providers/dbt/cloud/operators/dbt.py +1 -1
  7. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/pyproject.toml +4 -4
  8. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/airflow/providers/dbt/cloud/LICENSE +0 -0
  9. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/airflow/providers/dbt/cloud/hooks/__init__.py +0 -0
  10. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/airflow/providers/dbt/cloud/operators/__init__.py +0 -0
  11. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/airflow/providers/dbt/cloud/sensors/__init__.py +0 -0
  12. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/airflow/providers/dbt/cloud/sensors/dbt.py +0 -0
  13. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/airflow/providers/dbt/cloud/triggers/__init__.py +0 -0
  14. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/airflow/providers/dbt/cloud/triggers/dbt.py +0 -0
  15. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/airflow/providers/dbt/cloud/utils/__init__.py +0 -0
  16. {apache_airflow_providers_dbt_cloud-3.7.1rc1 → apache_airflow_providers_dbt_cloud-3.8.0rc1}/airflow/providers/dbt/cloud/utils/openlineage.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apache-airflow-providers-dbt-cloud
3
- Version: 3.7.1rc1
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.6.0rc0
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.7.1/changelog.html
32
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.7.1
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.7.1.rc1``
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.7.1/>`_.
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.6.0``
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.7.1/changelog.html>`_.
141
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.8.0/changelog.html>`_.
@@ -42,7 +42,7 @@
42
42
 
43
43
  Package ``apache-airflow-providers-dbt-cloud``
44
44
 
45
- Release: ``3.7.1.rc1``
45
+ Release: ``3.8.0.rc1``
46
46
 
47
47
 
48
48
  `dbt Cloud <https://www.getdbt.com/product/dbt-cloud/>`__
@@ -55,7 +55,7 @@ This is a provider package for ``dbt.cloud`` provider. All classes for this prov
55
55
  are in ``airflow.providers.dbt.cloud`` python package.
56
56
 
57
57
  You can find package information and changelog for the provider
58
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.7.1/>`_.
58
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.8.0/>`_.
59
59
 
60
60
  Installation
61
61
  ------------
@@ -72,7 +72,7 @@ Requirements
72
72
  ================================= ==================
73
73
  PIP package Version required
74
74
  ================================= ==================
75
- ``apache-airflow`` ``>=2.6.0``
75
+ ``apache-airflow`` ``>=2.7.0``
76
76
  ``apache-airflow-providers-http``
77
77
  ``asgiref``
78
78
  ``aiohttp`` ``>=3.9.2``
@@ -99,4 +99,4 @@ Dependent package
99
99
  ============================================================================================================== ===============
100
100
 
101
101
  The changelog for the provider package can be found in the
102
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.7.1/changelog.html>`_.
102
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.8.0/changelog.html>`_.
@@ -27,7 +27,7 @@ import packaging.version
27
27
 
28
28
  __all__ = ["__version__"]
29
29
 
30
- __version__ = "3.7.1"
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.6.0"
38
+ "2.7.0"
39
39
  ):
40
40
  raise RuntimeError(
41
- f"The package `apache-airflow-providers-dbt-cloud:{__version__}` needs Apache Airflow 2.6.0+"
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": 1712665602,
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.6.0",
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/v2/accounts/{endpoint or ''}"
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}/api/v2/accounts/"
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 endpoint:
313
- return self._paginate(endpoint=endpoint, payload=payload)
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
- return self.run(endpoint=endpoint, data=payload)
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
- "status": DbtCloudJobRunStatus.NON_TERMINAL_STATUSES,
138
+ "status__in": DbtCloudJobRunStatus.NON_TERMINAL_STATUSES,
139
139
  "order_by": "-created_at",
140
140
  },
141
141
  ).json()["data"]
@@ -28,7 +28,7 @@ build-backend = "flit_core.buildapi"
28
28
 
29
29
  [project]
30
30
  name = "apache-airflow-providers-dbt-cloud"
31
- version = "3.7.1.rc1"
31
+ version = "3.8.0.rc1"
32
32
  description = "Provider package apache-airflow-providers-dbt-cloud for Apache Airflow"
33
33
  readme = "README.rst"
34
34
  authors = [
@@ -58,13 +58,13 @@ requires-python = "~=3.8"
58
58
  dependencies = [
59
59
  "aiohttp>=3.9.2",
60
60
  "apache-airflow-providers-http",
61
- "apache-airflow>=2.6.0rc0",
61
+ "apache-airflow>=2.7.0rc0",
62
62
  "asgiref",
63
63
  ]
64
64
 
65
65
  [project.urls]
66
- "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.7.1"
67
- "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.7.1/changelog.html"
66
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.8.0"
67
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.8.0/changelog.html"
68
68
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
69
69
  "Source Code" = "https://github.com/apache/airflow"
70
70
  "Slack Chat" = "https://s.apache.org/airflow-slack"