apache-airflow-providers-dbt-cloud 3.11.2rc1__tar.gz → 4.0.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.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/PKG-INFO +9 -11
  2. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/README.rst +4 -4
  3. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/airflow/providers/dbt/cloud/__init__.py +3 -3
  4. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/airflow/providers/dbt/cloud/get_provider_info.py +3 -2
  5. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/airflow/providers/dbt/cloud/hooks/dbt.py +0 -1
  6. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/airflow/providers/dbt/cloud/sensors/dbt.py +2 -34
  7. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/airflow/providers/dbt/cloud/triggers/dbt.py +2 -1
  8. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/airflow/providers/dbt/cloud/utils/openlineage.py +17 -4
  9. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/pyproject.toml +5 -8
  10. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/airflow/providers/dbt/cloud/LICENSE +0 -0
  11. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/airflow/providers/dbt/cloud/hooks/__init__.py +0 -0
  12. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/airflow/providers/dbt/cloud/operators/__init__.py +0 -0
  13. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/airflow/providers/dbt/cloud/operators/dbt.py +0 -0
  14. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/airflow/providers/dbt/cloud/sensors/__init__.py +0 -0
  15. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/airflow/providers/dbt/cloud/triggers/__init__.py +0 -0
  16. {apache_airflow_providers_dbt_cloud-3.11.2rc1 → apache_airflow_providers_dbt_cloud-4.0.0rc1}/airflow/providers/dbt/cloud/utils/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: apache-airflow-providers-dbt-cloud
3
- Version: 3.11.2rc1
3
+ Version: 4.0.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>
@@ -22,18 +22,16 @@ Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Topic :: System :: Monitoring
23
23
  Requires-Dist: aiohttp>=3.9.2
24
24
  Requires-Dist: apache-airflow-providers-http
25
- Requires-Dist: apache-airflow>=2.8.0rc0
25
+ Requires-Dist: apache-airflow>=2.9.0rc0
26
26
  Requires-Dist: asgiref>=2.3.0
27
- Requires-Dist: apache-airflow-providers-http ; extra == "http"
28
27
  Requires-Dist: apache-airflow-providers-openlineage>=1.7.0rc0 ; extra == "openlineage"
29
28
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
30
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.11.2/changelog.html
31
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.11.2
29
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/4.0.0/changelog.html
30
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/4.0.0
32
31
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
33
32
  Project-URL: Source Code, https://github.com/apache/airflow
34
- Project-URL: Twitter, https://twitter.com/ApacheAirflow
33
+ Project-URL: Twitter, https://x.com/ApacheAirflow
35
34
  Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
36
- Provides-Extra: http
37
35
  Provides-Extra: openlineage
38
36
 
39
37
 
@@ -80,7 +78,7 @@ Provides-Extra: openlineage
80
78
 
81
79
  Package ``apache-airflow-providers-dbt-cloud``
82
80
 
83
- Release: ``3.11.2.rc1``
81
+ Release: ``4.0.0.rc1``
84
82
 
85
83
 
86
84
  `dbt Cloud <https://www.getdbt.com/product/dbt-cloud/>`__
@@ -93,7 +91,7 @@ This is a provider package for ``dbt.cloud`` provider. All classes for this prov
93
91
  are in ``airflow.providers.dbt.cloud`` python package.
94
92
 
95
93
  You can find package information and changelog for the provider
96
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.11.2/>`_.
94
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/4.0.0/>`_.
97
95
 
98
96
  Installation
99
97
  ------------
@@ -110,7 +108,7 @@ Requirements
110
108
  ================================= ==================
111
109
  PIP package Version required
112
110
  ================================= ==================
113
- ``apache-airflow`` ``>=2.8.0``
111
+ ``apache-airflow`` ``>=2.9.0``
114
112
  ``apache-airflow-providers-http``
115
113
  ``asgiref`` ``>=2.3.0``
116
114
  ``aiohttp`` ``>=3.9.2``
@@ -137,4 +135,4 @@ Dependent package
137
135
  ============================================================================================================== ===============
138
136
 
139
137
  The changelog for the provider package can be found in the
140
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.11.2/changelog.html>`_.
138
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/4.0.0/changelog.html>`_.
@@ -42,7 +42,7 @@
42
42
 
43
43
  Package ``apache-airflow-providers-dbt-cloud``
44
44
 
45
- Release: ``3.11.2.rc1``
45
+ Release: ``4.0.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.11.2/>`_.
58
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/4.0.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.8.0``
75
+ ``apache-airflow`` ``>=2.9.0``
76
76
  ``apache-airflow-providers-http``
77
77
  ``asgiref`` ``>=2.3.0``
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.11.2/changelog.html>`_.
102
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/4.0.0/changelog.html>`_.
@@ -29,11 +29,11 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "3.11.2"
32
+ __version__ = "4.0.0"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
- "2.8.0"
35
+ "2.9.0"
36
36
  ):
37
37
  raise RuntimeError(
38
- f"The package `apache-airflow-providers-dbt-cloud:{__version__}` needs Apache Airflow 2.8.0+"
38
+ f"The package `apache-airflow-providers-dbt-cloud:{__version__}` needs Apache Airflow 2.9.0+"
39
39
  )
@@ -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": 1731569996,
31
+ "source-date-epoch": 1734533324,
32
32
  "versions": [
33
+ "4.0.0",
33
34
  "3.11.2",
34
35
  "3.11.1",
35
36
  "3.11.0",
@@ -64,7 +65,7 @@ def get_provider_info():
64
65
  "1.0.1",
65
66
  ],
66
67
  "dependencies": [
67
- "apache-airflow>=2.8.0",
68
+ "apache-airflow>=2.9.0",
68
69
  "apache-airflow-providers-http",
69
70
  "asgiref>=2.3.0",
70
71
  "aiohttp>=3.9.2",
@@ -336,7 +336,6 @@ class DbtCloudHook(HttpHook):
336
336
 
337
337
  raise ValueError("An endpoint is needed to paginate a response.")
338
338
 
339
- # breakpoint()
340
339
  return self.run(endpoint=full_endpoint, data=payload, extra_options=extra_options)
341
340
 
342
341
  def list_accounts(self) -> list[Response]:
@@ -17,14 +17,11 @@
17
17
  from __future__ import annotations
18
18
 
19
19
  import time
20
- import warnings
21
20
  from functools import cached_property
22
21
  from typing import TYPE_CHECKING, Any
23
22
 
24
- from deprecated import deprecated
25
-
26
23
  from airflow.configuration import conf
27
- from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
24
+ from airflow.exceptions import AirflowException
28
25
  from airflow.providers.dbt.cloud.hooks.dbt import DbtCloudHook, DbtCloudJobRunException, DbtCloudJobRunStatus
29
26
  from airflow.providers.dbt.cloud.triggers.dbt import DbtCloudRunJobTrigger
30
27
  from airflow.providers.dbt.cloud.utils.openlineage import generate_openlineage_events_from_dbt_cloud_run
@@ -62,17 +59,7 @@ class DbtCloudJobRunSensor(BaseSensorOperator):
62
59
  ) -> None:
63
60
  if deferrable:
64
61
  if "poke_interval" not in kwargs:
65
- # TODO: Remove once deprecated
66
- if "polling_interval" in kwargs:
67
- kwargs["poke_interval"] = kwargs["polling_interval"]
68
- warnings.warn(
69
- "Argument `poll_interval` is deprecated and will be removed "
70
- "in a future release. Please use `poke_interval` instead.",
71
- AirflowProviderDeprecationWarning,
72
- stacklevel=2,
73
- )
74
- else:
75
- kwargs["poke_interval"] = 5
62
+ kwargs["poke_interval"] = 5
76
63
 
77
64
  if "timeout" not in kwargs:
78
65
  kwargs["timeout"] = 60 * 60 * 24 * 7
@@ -142,22 +129,3 @@ class DbtCloudJobRunSensor(BaseSensorOperator):
142
129
  def get_openlineage_facets_on_complete(self, task_instance) -> OperatorLineage:
143
130
  """Implement _on_complete because job_run needs to be triggered first in execute method."""
144
131
  return generate_openlineage_events_from_dbt_cloud_run(operator=self, task_instance=task_instance)
145
-
146
-
147
- @deprecated(
148
- reason=(
149
- "Class `DbtCloudJobRunAsyncSensor` is deprecated and will be removed in a future release. "
150
- "Please use `DbtCloudJobRunSensor` and set `deferrable` attribute to `True` instead"
151
- ),
152
- category=AirflowProviderDeprecationWarning,
153
- )
154
- class DbtCloudJobRunAsyncSensor(DbtCloudJobRunSensor):
155
- """
156
- This class is deprecated.
157
-
158
- Please use :class:`airflow.providers.dbt.cloud.sensor.dbt.DbtCloudJobRunSensor`
159
- with ``deferrable=True``.
160
- """
161
-
162
- def __init__(self, **kwargs: Any) -> None:
163
- super().__init__(deferrable=True, **kwargs)
@@ -18,7 +18,8 @@ from __future__ import annotations
18
18
 
19
19
  import asyncio
20
20
  import time
21
- from typing import Any, AsyncIterator
21
+ from collections.abc import AsyncIterator
22
+ from typing import Any
22
23
 
23
24
  from airflow.providers.dbt.cloud.hooks.dbt import DbtCloudHook, DbtCloudJobRunStatus
24
25
  from airflow.triggers.base import BaseTrigger, TriggerEvent
@@ -21,20 +21,32 @@ import re
21
21
  from contextlib import suppress
22
22
  from typing import TYPE_CHECKING
23
23
 
24
+ from packaging.version import parse
25
+
24
26
  from airflow import __version__ as airflow_version
25
27
 
26
28
  if TYPE_CHECKING:
29
+ from packaging.version import Version
30
+
27
31
  from airflow.models.taskinstance import TaskInstance
28
32
  from airflow.providers.dbt.cloud.operators.dbt import DbtCloudRunJobOperator
29
33
  from airflow.providers.dbt.cloud.sensors.dbt import DbtCloudJobRunSensor
30
34
  from airflow.providers.openlineage.extractors.base import OperatorLineage
31
35
 
32
36
 
37
+ _AIRFLOW_VERSION: Version = parse(parse(airflow_version).base_version)
38
+
39
+
40
+ def _get_logical_date(task_instance):
41
+ # todo: remove when min airflow version >= 3.0
42
+ if parse("3") > _AIRFLOW_VERSION:
43
+ return task_instance.execution_date
44
+ return task_instance.logical_date
45
+
46
+
33
47
  def _get_try_number(val):
34
48
  # todo: remove when min airflow version >= 2.10.0
35
- from packaging.version import parse
36
-
37
- if parse(parse(airflow_version).base_version) < parse("2.10.0"):
49
+ if parse("2.10.0") > _AIRFLOW_VERSION:
38
50
  return val.try_number - 1
39
51
  else:
40
52
  return val.try_number
@@ -142,8 +154,9 @@ def generate_openlineage_events_from_dbt_cloud_run(
142
154
  parent_run_id = OpenLineageAdapter.build_task_instance_run_id(
143
155
  dag_id=task_instance.dag_id,
144
156
  task_id=operator.task_id,
145
- execution_date=task_instance.execution_date,
157
+ logical_date=_get_logical_date(task_instance),
146
158
  try_number=_get_try_number(task_instance),
159
+ map_index=task_instance.map_index,
147
160
  )
148
161
 
149
162
  parent_job = ParentRunMetadata(
@@ -27,7 +27,7 @@ build-backend = "flit_core.buildapi"
27
27
 
28
28
  [project]
29
29
  name = "apache-airflow-providers-dbt-cloud"
30
- version = "3.11.2.rc1"
30
+ version = "4.0.0.rc1"
31
31
  description = "Provider package apache-airflow-providers-dbt-cloud for Apache Airflow"
32
32
  readme = "README.rst"
33
33
  authors = [
@@ -56,25 +56,22 @@ requires-python = "~=3.9"
56
56
  dependencies = [
57
57
  "aiohttp>=3.9.2",
58
58
  "apache-airflow-providers-http",
59
- "apache-airflow>=2.8.0rc0",
59
+ "apache-airflow>=2.9.0rc0",
60
60
  "asgiref>=2.3.0",
61
61
  ]
62
62
 
63
63
  [project.urls]
64
- "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.11.2"
65
- "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/3.11.2/changelog.html"
64
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/4.0.0"
65
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/4.0.0/changelog.html"
66
66
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
67
67
  "Source Code" = "https://github.com/apache/airflow"
68
68
  "Slack Chat" = "https://s.apache.org/airflow-slack"
69
- "Twitter" = "https://twitter.com/ApacheAirflow"
69
+ "Twitter" = "https://x.com/ApacheAirflow"
70
70
  "YouTube" = "https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/"
71
71
 
72
72
  [project.entry-points."apache_airflow_provider"]
73
73
  provider_info = "airflow.providers.dbt.cloud.get_provider_info:get_provider_info"
74
74
  [project.optional-dependencies]
75
- "http" = [
76
- "apache-airflow-providers-http",
77
- ]
78
75
  "openlineage" = [
79
76
  "apache-airflow-providers-openlineage>=1.7.0rc0",
80
77
  ]