apache-airflow-providers-dbt-cloud 3.11.2rc1__py3-none-any.whl → 4.0.0__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 +0 -1
- airflow/providers/dbt/cloud/sensors/dbt.py +2 -34
- airflow/providers/dbt/cloud/triggers/dbt.py +2 -1
- airflow/providers/dbt/cloud/utils/openlineage.py +17 -4
- {apache_airflow_providers_dbt_cloud-3.11.2rc1.dist-info → apache_airflow_providers_dbt_cloud-4.0.0.dist-info}/METADATA +10 -12
- apache_airflow_providers_dbt_cloud-4.0.0.dist-info/RECORD +17 -0
- apache_airflow_providers_dbt_cloud-3.11.2rc1.dist-info/RECORD +0 -17
- {apache_airflow_providers_dbt_cloud-3.11.2rc1.dist-info → apache_airflow_providers_dbt_cloud-4.0.0.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_dbt_cloud-3.11.2rc1.dist-info → apache_airflow_providers_dbt_cloud-4.0.0.dist-info}/entry_points.txt +0 -0
|
@@ -29,11 +29,11 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "
|
|
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.
|
|
35
|
+
"2.9.0"
|
|
36
36
|
):
|
|
37
37
|
raise RuntimeError(
|
|
38
|
-
f"The package `apache-airflow-providers-dbt-cloud:{__version__}` needs Apache Airflow 2.
|
|
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":
|
|
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.
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: apache-airflow-providers-dbt-cloud
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
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.
|
|
25
|
+
Requires-Dist: apache-airflow>=2.9.0
|
|
26
26
|
Requires-Dist: asgiref>=2.3.0
|
|
27
|
-
Requires-Dist: apache-airflow-providers-
|
|
28
|
-
Requires-Dist: apache-airflow-providers-openlineage>=1.7.0rc0 ; extra == "openlineage"
|
|
27
|
+
Requires-Dist: apache-airflow-providers-openlineage>=1.7.0 ; 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/
|
|
31
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/
|
|
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://
|
|
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: ``
|
|
81
|
+
Release: ``4.0.0``
|
|
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/
|
|
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.
|
|
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/
|
|
138
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-dbt-cloud/4.0.0/changelog.html>`_.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
airflow/providers/dbt/cloud/LICENSE,sha256=FFb4jd2AXnOOf7XLP04pQW6jbdhG49TxlGY6fFpCV1Y,13609
|
|
2
|
+
airflow/providers/dbt/cloud/__init__.py,sha256=aFLIA3l_kzPW3lUS3Wtr65D9ZDCRtahs78rMwWtOgDM,1496
|
|
3
|
+
airflow/providers/dbt/cloud/get_provider_info.py,sha256=WrJzEFLJMZk9LoIsrVTvM6rcGz1T2xJSy4wuCzTPF8Y,3777
|
|
4
|
+
airflow/providers/dbt/cloud/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
5
|
+
airflow/providers/dbt/cloud/hooks/dbt.py,sha256=Zkrpnis7OVPjFGly7dK8dvSFpEfbSFrjl8CdnOO6u8M,29192
|
|
6
|
+
airflow/providers/dbt/cloud/operators/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
7
|
+
airflow/providers/dbt/cloud/operators/dbt.py,sha256=xilyondmB5yDWxh0gfaJKKWZYN52diFXsfrdBsn_1UE,16222
|
|
8
|
+
airflow/providers/dbt/cloud/sensors/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
|
9
|
+
airflow/providers/dbt/cloud/sensors/dbt.py,sha256=OGf-VNKcCNCrImrdE8PudmtDak_MKJfPhmaf7_ccOLg,5157
|
|
10
|
+
airflow/providers/dbt/cloud/triggers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
11
|
+
airflow/providers/dbt/cloud/triggers/dbt.py,sha256=Oabdc7FcNhCQxkjDC5SqAiYEw4hSZ9mQGZgSt36a1E0,4707
|
|
12
|
+
airflow/providers/dbt/cloud/utils/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
13
|
+
airflow/providers/dbt/cloud/utils/openlineage.py,sha256=6hGaRpfPE0HJSyEQNo4xt9Pfvdi9GI-mysIb4dBACpk,6611
|
|
14
|
+
apache_airflow_providers_dbt_cloud-4.0.0.dist-info/entry_points.txt,sha256=c18L1WEEK18WQeEGrm9kMVqutiYJHiWGH5jU1JqnToE,105
|
|
15
|
+
apache_airflow_providers_dbt_cloud-4.0.0.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
|
16
|
+
apache_airflow_providers_dbt_cloud-4.0.0.dist-info/METADATA,sha256=GiaeZfIhEZyVPl5FJMixWY2uzpGB6iaU4pNw16PfVO4,6248
|
|
17
|
+
apache_airflow_providers_dbt_cloud-4.0.0.dist-info/RECORD,,
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
airflow/providers/dbt/cloud/LICENSE,sha256=FFb4jd2AXnOOf7XLP04pQW6jbdhG49TxlGY6fFpCV1Y,13609
|
|
2
|
-
airflow/providers/dbt/cloud/__init__.py,sha256=ulO4-15mf9wqC44nUFtSoVfli1A7pehMc_WWeMxqb98,1497
|
|
3
|
-
airflow/providers/dbt/cloud/get_provider_info.py,sha256=1_319hwhM2UgCND23fYFJzGTFOhFS5i6yMo1rBz6Nq4,3756
|
|
4
|
-
airflow/providers/dbt/cloud/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
5
|
-
airflow/providers/dbt/cloud/hooks/dbt.py,sha256=ExKsYoJOcPgCKf_QcB7XPYcXVe69czXDZT_XdmoJyMk,29215
|
|
6
|
-
airflow/providers/dbt/cloud/operators/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
7
|
-
airflow/providers/dbt/cloud/operators/dbt.py,sha256=xilyondmB5yDWxh0gfaJKKWZYN52diFXsfrdBsn_1UE,16222
|
|
8
|
-
airflow/providers/dbt/cloud/sensors/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
|
9
|
-
airflow/providers/dbt/cloud/sensors/dbt.py,sha256=23kRgLxST-WJKpF1NGk_CRtQGn91kNw7Z_2ZTjzcQh0,6357
|
|
10
|
-
airflow/providers/dbt/cloud/triggers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
11
|
-
airflow/providers/dbt/cloud/triggers/dbt.py,sha256=30fntKeUi1bUJtv50Rv09KtJNsN8gBtjLPsf3Xoccks,4680
|
|
12
|
-
airflow/providers/dbt/cloud/utils/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
13
|
-
airflow/providers/dbt/cloud/utils/openlineage.py,sha256=tLHfM6L9cOy4ZvpnJFjJAI3qxAztn073GbLHsXpjvFQ,6265
|
|
14
|
-
apache_airflow_providers_dbt_cloud-3.11.2rc1.dist-info/entry_points.txt,sha256=c18L1WEEK18WQeEGrm9kMVqutiYJHiWGH5jU1JqnToE,105
|
|
15
|
-
apache_airflow_providers_dbt_cloud-3.11.2rc1.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
|
16
|
-
apache_airflow_providers_dbt_cloud-3.11.2rc1.dist-info/METADATA,sha256=sF3QXnPMmU-ZjUJ7z4lGSfKw9F-FsMjOaHcLjCc5rng,6357
|
|
17
|
-
apache_airflow_providers_dbt_cloud-3.11.2rc1.dist-info/RECORD,,
|
|
File without changes
|