apache-airflow-providers-databricks 6.1.0rc1__tar.gz → 6.2.0__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-databricks might be problematic. Click here for more details.
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/PKG-INFO +12 -12
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/README.rst +5 -5
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/__init__.py +1 -1
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/get_provider_info.py +4 -3
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/hooks/databricks_base.py +1 -2
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/hooks/databricks_sql.py +4 -4
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/operators/databricks.py +36 -27
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/operators/databricks_sql.py +3 -3
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/pyproject.toml +7 -7
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/LICENSE +0 -0
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/hooks/__init__.py +0 -0
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/hooks/databricks.py +0 -0
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/operators/__init__.py +0 -0
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/operators/databricks_repos.py +0 -0
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/sensors/__init__.py +0 -0
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/sensors/databricks_partition.py +0 -0
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/sensors/databricks_sql.py +0 -0
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/triggers/__init__.py +0 -0
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/triggers/databricks.py +0 -0
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/utils/__init__.py +0 -0
- {apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/airflow/providers/databricks/utils/databricks.py +0 -0
{apache_airflow_providers_databricks-6.1.0rc1 → apache_airflow_providers_databricks-6.2.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: apache-airflow-providers-databricks
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.2.0
|
|
4
4
|
Summary: Provider package apache-airflow-providers-databricks for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,databricks,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
@@ -20,16 +20,16 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
22
|
Classifier: Topic :: System :: Monitoring
|
|
23
|
-
Requires-Dist: aiohttp>=3.
|
|
24
|
-
Requires-Dist: apache-airflow-providers-common-sql>=1.10.0
|
|
25
|
-
Requires-Dist: apache-airflow>=2.6.0
|
|
23
|
+
Requires-Dist: aiohttp>=3.9.2, <4
|
|
24
|
+
Requires-Dist: apache-airflow-providers-common-sql>=1.10.0
|
|
25
|
+
Requires-Dist: apache-airflow>=2.6.0
|
|
26
26
|
Requires-Dist: databricks-sql-connector>=2.0.0, <3.0.0, !=2.9.0
|
|
27
|
-
Requires-Dist: requests>=2.27,<3
|
|
27
|
+
Requires-Dist: requests>=2.27.0,<3
|
|
28
28
|
Requires-Dist: apache-airflow-providers-common-sql ; extra == "common.sql"
|
|
29
29
|
Requires-Dist: databricks-sdk==0.10.0 ; extra == "sdk"
|
|
30
30
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
31
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-databricks/6.
|
|
32
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-databricks/6.
|
|
31
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-databricks/6.2.0/changelog.html
|
|
32
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-databricks/6.2.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: sdk
|
|
|
81
81
|
|
|
82
82
|
Package ``apache-airflow-providers-databricks``
|
|
83
83
|
|
|
84
|
-
Release: ``6.
|
|
84
|
+
Release: ``6.2.0``
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
`Databricks <https://databricks.com/>`__
|
|
@@ -94,7 +94,7 @@ This is a provider package for ``databricks`` provider. All classes for this pro
|
|
|
94
94
|
are in ``airflow.providers.databricks`` 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-databricks/6.
|
|
97
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-databricks/6.2.0/>`_.
|
|
98
98
|
|
|
99
99
|
Installation
|
|
100
100
|
------------
|
|
@@ -113,9 +113,9 @@ PIP package Version required
|
|
|
113
113
|
======================================= ==========================
|
|
114
114
|
``apache-airflow`` ``>=2.6.0``
|
|
115
115
|
``apache-airflow-providers-common-sql`` ``>=1.10.0``
|
|
116
|
-
``requests`` ``>=2.27,<3``
|
|
116
|
+
``requests`` ``>=2.27.0,<3``
|
|
117
117
|
``databricks-sql-connector`` ``>=2.0.0,!=2.9.0,<3.0.0``
|
|
118
|
-
``aiohttp`` ``>=3.
|
|
118
|
+
``aiohttp`` ``>=3.9.2,<4``
|
|
119
119
|
======================================= ==========================
|
|
120
120
|
|
|
121
121
|
Cross provider package dependencies
|
|
@@ -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-databricks/6.
|
|
141
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-databricks/6.2.0/changelog.html>`_.
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
Package ``apache-airflow-providers-databricks``
|
|
44
44
|
|
|
45
|
-
Release: ``6.
|
|
45
|
+
Release: ``6.2.0``
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
`Databricks <https://databricks.com/>`__
|
|
@@ -55,7 +55,7 @@ This is a provider package for ``databricks`` provider. All classes for this pro
|
|
|
55
55
|
are in ``airflow.providers.databricks`` 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-databricks/6.
|
|
58
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-databricks/6.2.0/>`_.
|
|
59
59
|
|
|
60
60
|
Installation
|
|
61
61
|
------------
|
|
@@ -74,9 +74,9 @@ PIP package Version required
|
|
|
74
74
|
======================================= ==========================
|
|
75
75
|
``apache-airflow`` ``>=2.6.0``
|
|
76
76
|
``apache-airflow-providers-common-sql`` ``>=1.10.0``
|
|
77
|
-
``requests`` ``>=2.27,<3``
|
|
77
|
+
``requests`` ``>=2.27.0,<3``
|
|
78
78
|
``databricks-sql-connector`` ``>=2.0.0,!=2.9.0,<3.0.0``
|
|
79
|
-
``aiohttp`` ``>=3.
|
|
79
|
+
``aiohttp`` ``>=3.9.2,<4``
|
|
80
80
|
======================================= ==========================
|
|
81
81
|
|
|
82
82
|
Cross provider package dependencies
|
|
@@ -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-databricks/6.
|
|
102
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-databricks/6.2.0/changelog.html>`_.
|
|
@@ -28,8 +28,9 @@ def get_provider_info():
|
|
|
28
28
|
"name": "Databricks",
|
|
29
29
|
"description": "`Databricks <https://databricks.com/>`__\n",
|
|
30
30
|
"state": "ready",
|
|
31
|
-
"source-date-epoch":
|
|
31
|
+
"source-date-epoch": 1707636345,
|
|
32
32
|
"versions": [
|
|
33
|
+
"6.2.0",
|
|
33
34
|
"6.1.0",
|
|
34
35
|
"6.0.0",
|
|
35
36
|
"5.0.1",
|
|
@@ -67,9 +68,9 @@ def get_provider_info():
|
|
|
67
68
|
"dependencies": [
|
|
68
69
|
"apache-airflow>=2.6.0",
|
|
69
70
|
"apache-airflow-providers-common-sql>=1.10.0",
|
|
70
|
-
"requests>=2.27,<3",
|
|
71
|
+
"requests>=2.27.0,<3",
|
|
71
72
|
"databricks-sql-connector>=2.0.0, <3.0.0, !=2.9.0",
|
|
72
|
-
"aiohttp>=3.
|
|
73
|
+
"aiohttp>=3.9.2, <4",
|
|
73
74
|
],
|
|
74
75
|
"additional-extras": [
|
|
75
76
|
{
|
|
@@ -103,9 +103,8 @@ class BaseDatabricksHook(BaseHook):
|
|
|
103
103
|
retry_delay: float = 1.0,
|
|
104
104
|
retry_args: dict[Any, Any] | None = None,
|
|
105
105
|
caller: str = "Unknown",
|
|
106
|
-
**kwargs,
|
|
107
106
|
) -> None:
|
|
108
|
-
super().__init__(
|
|
107
|
+
super().__init__()
|
|
109
108
|
self.databricks_conn_id = databricks_conn_id
|
|
110
109
|
self.timeout_seconds = timeout_seconds
|
|
111
110
|
if retry_limit < 1:
|
|
@@ -282,13 +282,13 @@ class DatabricksSqlHook(BaseDatabricksHook, DbApiHook):
|
|
|
282
282
|
rows: list[Row] = result
|
|
283
283
|
if not rows:
|
|
284
284
|
return []
|
|
285
|
-
rows_fields = rows[0].__fields__
|
|
286
|
-
rows_object = namedtuple("Row", rows_fields) # type: ignore
|
|
285
|
+
rows_fields = tuple(rows[0].__fields__)
|
|
286
|
+
rows_object = namedtuple("Row", rows_fields, rename=True) # type: ignore
|
|
287
287
|
return cast(List[tuple], [rows_object(*row) for row in rows])
|
|
288
288
|
else:
|
|
289
289
|
row: Row = result
|
|
290
|
-
row_fields = row.__fields__
|
|
291
|
-
row_object = namedtuple("Row", row_fields) # type: ignore
|
|
290
|
+
row_fields = tuple(row.__fields__)
|
|
291
|
+
row_object = namedtuple("Row", row_fields, rename=True) # type: ignore
|
|
292
292
|
return cast(tuple, row_object(*row))
|
|
293
293
|
|
|
294
294
|
def bulk_dump(self, table, tmp_file):
|
|
@@ -19,11 +19,12 @@
|
|
|
19
19
|
from __future__ import annotations
|
|
20
20
|
|
|
21
21
|
import time
|
|
22
|
-
import warnings
|
|
23
22
|
from functools import cached_property
|
|
24
23
|
from logging import Logger
|
|
25
24
|
from typing import TYPE_CHECKING, Any, Sequence
|
|
26
25
|
|
|
26
|
+
from deprecated import deprecated
|
|
27
|
+
|
|
27
28
|
from airflow.configuration import conf
|
|
28
29
|
from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
|
|
29
30
|
from airflow.models import BaseOperator, BaseOperatorLink, XCom
|
|
@@ -132,18 +133,24 @@ def _handle_deferrable_databricks_operator_execution(operator, hook, log, contex
|
|
|
132
133
|
log.info("View run status, Spark UI, and logs at %s", run_page_url)
|
|
133
134
|
|
|
134
135
|
if operator.wait_for_termination:
|
|
135
|
-
operator.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
136
|
+
run_info = hook.get_run(operator.run_id)
|
|
137
|
+
run_state = RunState(**run_info["state"])
|
|
138
|
+
if not run_state.is_terminal:
|
|
139
|
+
operator.defer(
|
|
140
|
+
trigger=DatabricksExecutionTrigger(
|
|
141
|
+
run_id=operator.run_id,
|
|
142
|
+
databricks_conn_id=operator.databricks_conn_id,
|
|
143
|
+
polling_period_seconds=operator.polling_period_seconds,
|
|
144
|
+
retry_limit=operator.databricks_retry_limit,
|
|
145
|
+
retry_delay=operator.databricks_retry_delay,
|
|
146
|
+
retry_args=operator.databricks_retry_args,
|
|
147
|
+
run_page_url=run_page_url,
|
|
148
|
+
),
|
|
149
|
+
method_name=DEFER_METHOD_NAME,
|
|
150
|
+
)
|
|
151
|
+
else:
|
|
152
|
+
if run_state.is_successful:
|
|
153
|
+
log.info("%s completed successfully.", operator.task_id)
|
|
147
154
|
|
|
148
155
|
|
|
149
156
|
def _handle_deferrable_databricks_operator_completion(event: dict, log: Logger) -> None:
|
|
@@ -556,17 +563,18 @@ class DatabricksSubmitRunOperator(BaseOperator):
|
|
|
556
563
|
_handle_deferrable_databricks_operator_completion(event, self.log)
|
|
557
564
|
|
|
558
565
|
|
|
566
|
+
@deprecated(
|
|
567
|
+
reason=(
|
|
568
|
+
"`DatabricksSubmitRunDeferrableOperator` has been deprecated. "
|
|
569
|
+
"Please use `airflow.providers.databricks.operators.DatabricksSubmitRunOperator` "
|
|
570
|
+
"with `deferrable=True` instead."
|
|
571
|
+
),
|
|
572
|
+
category=AirflowProviderDeprecationWarning,
|
|
573
|
+
)
|
|
559
574
|
class DatabricksSubmitRunDeferrableOperator(DatabricksSubmitRunOperator):
|
|
560
575
|
"""Deferrable version of ``DatabricksSubmitRunOperator``."""
|
|
561
576
|
|
|
562
577
|
def __init__(self, *args, **kwargs):
|
|
563
|
-
warnings.warn(
|
|
564
|
-
"`DatabricksSubmitRunDeferrableOperator` has been deprecated. "
|
|
565
|
-
"Please use `airflow.providers.databricks.operators.DatabricksSubmitRunOperator` with "
|
|
566
|
-
"`deferrable=True` instead.",
|
|
567
|
-
AirflowProviderDeprecationWarning,
|
|
568
|
-
stacklevel=2,
|
|
569
|
-
)
|
|
570
578
|
super().__init__(deferrable=True, *args, **kwargs)
|
|
571
579
|
|
|
572
580
|
def execute(self, context):
|
|
@@ -836,15 +844,16 @@ class DatabricksRunNowOperator(BaseOperator):
|
|
|
836
844
|
self.log.error("Error: Task: %s with invalid run_id was requested to be cancelled.", self.task_id)
|
|
837
845
|
|
|
838
846
|
|
|
847
|
+
@deprecated(
|
|
848
|
+
reason=(
|
|
849
|
+
"`DatabricksRunNowDeferrableOperator` has been deprecated. "
|
|
850
|
+
"Please use `airflow.providers.databricks.operators.DatabricksRunNowOperator` "
|
|
851
|
+
"with `deferrable=True` instead."
|
|
852
|
+
),
|
|
853
|
+
category=AirflowProviderDeprecationWarning,
|
|
854
|
+
)
|
|
839
855
|
class DatabricksRunNowDeferrableOperator(DatabricksRunNowOperator):
|
|
840
856
|
"""Deferrable version of ``DatabricksRunNowOperator``."""
|
|
841
857
|
|
|
842
858
|
def __init__(self, *args, **kwargs):
|
|
843
|
-
warnings.warn(
|
|
844
|
-
"`DatabricksRunNowDeferrableOperator` has been deprecated. "
|
|
845
|
-
"Please use `airflow.providers.databricks.operators.DatabricksRunNowOperator` with "
|
|
846
|
-
"`deferrable=True` instead.",
|
|
847
|
-
AirflowProviderDeprecationWarning,
|
|
848
|
-
stacklevel=2,
|
|
849
|
-
)
|
|
850
859
|
super().__init__(deferrable=True, *args, **kwargs)
|
|
@@ -146,14 +146,14 @@ class DatabricksSqlOperator(SQLExecuteQueryOperator):
|
|
|
146
146
|
if write_header:
|
|
147
147
|
writer.writeheader()
|
|
148
148
|
for row in last_results:
|
|
149
|
-
writer.writerow(row.
|
|
149
|
+
writer.writerow(row._asdict())
|
|
150
150
|
elif self._output_format.lower() == "json":
|
|
151
151
|
with open(self._output_path, "w") as file:
|
|
152
|
-
file.write(json.dumps([row.
|
|
152
|
+
file.write(json.dumps([row._asdict() for row in last_results]))
|
|
153
153
|
elif self._output_format.lower() == "jsonl":
|
|
154
154
|
with open(self._output_path, "w") as file:
|
|
155
155
|
for row in last_results:
|
|
156
|
-
file.write(json.dumps(row.
|
|
156
|
+
file.write(json.dumps(row._asdict()))
|
|
157
157
|
file.write("\n")
|
|
158
158
|
else:
|
|
159
159
|
raise AirflowException(f"Unsupported output format: '{self._output_format}'")
|
|
@@ -28,7 +28,7 @@ build-backend = "flit_core.buildapi"
|
|
|
28
28
|
|
|
29
29
|
[project]
|
|
30
30
|
name = "apache-airflow-providers-databricks"
|
|
31
|
-
version = "6.
|
|
31
|
+
version = "6.2.0"
|
|
32
32
|
description = "Provider package apache-airflow-providers-databricks for Apache Airflow"
|
|
33
33
|
readme = "README.rst"
|
|
34
34
|
authors = [
|
|
@@ -55,16 +55,16 @@ classifiers = [
|
|
|
55
55
|
]
|
|
56
56
|
requires-python = "~=3.8"
|
|
57
57
|
dependencies = [
|
|
58
|
-
"aiohttp>=3.
|
|
59
|
-
"apache-airflow-providers-common-sql>=1.10.0
|
|
60
|
-
"apache-airflow>=2.6.0
|
|
58
|
+
"aiohttp>=3.9.2, <4",
|
|
59
|
+
"apache-airflow-providers-common-sql>=1.10.0",
|
|
60
|
+
"apache-airflow>=2.6.0",
|
|
61
61
|
"databricks-sql-connector>=2.0.0, <3.0.0, !=2.9.0",
|
|
62
|
-
"requests>=2.27,<3",
|
|
62
|
+
"requests>=2.27.0,<3",
|
|
63
63
|
]
|
|
64
64
|
|
|
65
65
|
[project.urls]
|
|
66
|
-
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-databricks/6.
|
|
67
|
-
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-databricks/6.
|
|
66
|
+
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-databricks/6.2.0"
|
|
67
|
+
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-databricks/6.2.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"
|
|
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
|