apache-airflow-providers-exasol 4.7.4rc1__py3-none-any.whl → 4.8.4rc1__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.
@@ -29,11 +29,11 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "4.7.4"
32
+ __version__ = "4.8.4"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
- "2.9.0"
35
+ "2.10.0"
36
36
  ):
37
37
  raise RuntimeError(
38
- f"The package `apache-airflow-providers-exasol:{__version__}` needs Apache Airflow 2.9.0+"
38
+ f"The package `apache-airflow-providers-exasol:{__version__}` needs Apache Airflow 2.10.0+"
39
39
  )
@@ -26,52 +26,11 @@ def get_provider_info():
26
26
  "package-name": "apache-airflow-providers-exasol",
27
27
  "name": "Exasol",
28
28
  "description": "`Exasol <https://www.exasol.com/>`__\n",
29
- "state": "ready",
30
- "source-date-epoch": 1743836039,
31
- "versions": [
32
- "4.7.4",
33
- "4.7.3",
34
- "4.7.2",
35
- "4.7.0",
36
- "4.6.1",
37
- "4.6.0",
38
- "4.5.3",
39
- "4.5.2",
40
- "4.5.1",
41
- "4.5.0",
42
- "4.4.3",
43
- "4.4.2",
44
- "4.4.1",
45
- "4.4.0",
46
- "4.3.0",
47
- "4.2.5",
48
- "4.2.4",
49
- "4.2.3",
50
- "4.2.2",
51
- "4.2.1",
52
- "4.2.0",
53
- "4.1.3",
54
- "4.1.2",
55
- "4.1.1",
56
- "4.1.0",
57
- "4.0.1",
58
- "4.0.0",
59
- "3.1.0",
60
- "3.0.0",
61
- "2.1.3",
62
- "2.1.2",
63
- "2.1.1",
64
- "2.1.0",
65
- "2.0.1",
66
- "2.0.0",
67
- "1.1.1",
68
- "1.1.0",
69
- "1.0.0",
70
- ],
71
29
  "integrations": [
72
30
  {
73
31
  "integration-name": "Exasol",
74
32
  "external-doc-url": "https://docs.exasol.com/home.htm",
33
+ "how-to-guide": ["/docs/apache-airflow-providers-exasol/operators.rst"],
75
34
  "logo": "/docs/integration-logos/Exasol.png",
76
35
  "tags": ["software"],
77
36
  }
@@ -88,11 +47,4 @@ def get_provider_info():
88
47
  "connection-type": "exasol",
89
48
  }
90
49
  ],
91
- "dependencies": [
92
- "apache-airflow>=2.9.0",
93
- "apache-airflow-providers-common-sql>=1.20.0",
94
- "pyexasol>=0.5.1",
95
- "pandas>=2.1.2,<2.2",
96
- ],
97
- "devel-dependencies": [],
98
50
  }
@@ -17,14 +17,18 @@
17
17
  # under the License.
18
18
  from __future__ import annotations
19
19
 
20
- from collections.abc import Iterable, Mapping, Sequence
20
+ from collections.abc import Callable, Iterable, Mapping, Sequence
21
21
  from contextlib import closing
22
- from typing import TYPE_CHECKING, Any, Callable, TypeVar, overload
22
+ from typing import TYPE_CHECKING, Any, TypeVar, overload
23
23
 
24
24
  import pyexasol
25
+ from deprecated import deprecated
25
26
  from pyexasol import ExaConnection, ExaStatement
27
+ from sqlalchemy.engine import URL
26
28
 
27
- from airflow.providers.common.sql.hooks.sql import DbApiHook, return_single_query_results
29
+ from airflow.exceptions import AirflowProviderDeprecationWarning
30
+ from airflow.providers.common.sql.hooks.handlers import return_single_query_results
31
+ from airflow.providers.common.sql.hooks.sql import DbApiHook
28
32
 
29
33
  if TYPE_CHECKING:
30
34
  import pandas as pd
@@ -50,14 +54,15 @@ class ExasolHook(DbApiHook):
50
54
  conn_type = "exasol"
51
55
  hook_name = "Exasol"
52
56
  supports_autocommit = True
57
+ DEFAULT_SQLALCHEMY_SCHEME = "exa+websocket" # sqlalchemy-exasol dialect
53
58
 
54
- def __init__(self, *args, **kwargs) -> None:
59
+ def __init__(self, *args, sqlalchemy_scheme: str | None = None, **kwargs) -> None:
55
60
  super().__init__(*args, **kwargs)
56
61
  self.schema = kwargs.pop("schema", None)
62
+ self._sqlalchemy_scheme = sqlalchemy_scheme
57
63
 
58
64
  def get_conn(self) -> ExaConnection:
59
- conn_id = self.get_conn_id()
60
- conn = self.get_connection(conn_id)
65
+ conn = self.get_connection(self.get_conn_id())
61
66
  conn_args = {
62
67
  "dsn": f"{conn.host}:{conn.port}",
63
68
  "user": conn.login,
@@ -72,7 +77,47 @@ class ExasolHook(DbApiHook):
72
77
  conn = pyexasol.connect(**conn_args)
73
78
  return conn
74
79
 
75
- def get_pandas_df(
80
+ @property
81
+ def sqlalchemy_scheme(self) -> str:
82
+ """Sqlalchemy scheme either from constructor, connection extras or default."""
83
+ extra_scheme = self.connection is not None and self.connection_extra_lower.get("sqlalchemy_scheme")
84
+ sqlalchemy_scheme = self._sqlalchemy_scheme or extra_scheme or self.DEFAULT_SQLALCHEMY_SCHEME
85
+ if sqlalchemy_scheme not in ["exa+websocket", "exa+pyodbc", "exa+turbodbc"]:
86
+ raise ValueError(
87
+ f"sqlalchemy_scheme in connection extra should be one of 'exa+websocket', 'exa+pyodbc' or 'exa+turbodbc', "
88
+ f"but got '{sqlalchemy_scheme}'. See https://github.com/exasol/sqlalchemy-exasol?tab=readme-ov-file#using-sqlalchemy-with-exasol-db for more details."
89
+ )
90
+ return sqlalchemy_scheme
91
+
92
+ @property
93
+ def sqlalchemy_url(self) -> URL:
94
+ """
95
+ Return a Sqlalchemy.engine.URL object from the connection.
96
+
97
+ :return: the extracted sqlalchemy.engine.URL object.
98
+ """
99
+ connection = self.connection
100
+ query = connection.extra_dejson
101
+ query = {k: v for k, v in query.items() if k.lower() != "sqlalchemy_scheme"}
102
+ return URL.create(
103
+ drivername=self.sqlalchemy_scheme,
104
+ username=connection.login,
105
+ password=connection.password,
106
+ host=connection.host,
107
+ port=connection.port,
108
+ database=self.schema or connection.schema,
109
+ query=query,
110
+ )
111
+
112
+ def get_uri(self) -> str:
113
+ """
114
+ Extract the URI from the connection.
115
+
116
+ :return: the extracted uri.
117
+ """
118
+ return self.sqlalchemy_url.render_as_string(hide_password=False)
119
+
120
+ def _get_pandas_df(
76
121
  self, sql, parameters: Iterable | Mapping[str, Any] | None = None, **kwargs
77
122
  ) -> pd.DataFrame:
78
123
  """
@@ -89,6 +134,34 @@ class ExasolHook(DbApiHook):
89
134
  df = conn.export_to_pandas(sql, query_params=parameters, **kwargs)
90
135
  return df
91
136
 
137
+ @deprecated(
138
+ reason="Replaced by function `get_df`.",
139
+ category=AirflowProviderDeprecationWarning,
140
+ action="ignore",
141
+ )
142
+ def get_pandas_df(
143
+ self,
144
+ sql,
145
+ parameters: list | tuple | Mapping[str, Any] | None = None,
146
+ **kwargs,
147
+ ) -> pd.DataFrame:
148
+ """
149
+ Execute the sql and returns a pandas dataframe.
150
+
151
+ :param sql: the sql statement to be executed (str) or a list of sql statements to execute
152
+ :param parameters: The parameters to render the SQL query with.
153
+ :param kwargs: (optional) passed into pandas.io.sql.read_sql method
154
+ """
155
+ return self._get_pandas_df(sql, parameters, **kwargs)
156
+
157
+ def _get_polars_df(
158
+ self,
159
+ sql,
160
+ parameters: list | tuple | Mapping[str, Any] | None = None,
161
+ **kwargs,
162
+ ):
163
+ raise NotImplementedError("Polars is not supported for Exasol")
164
+
92
165
  def get_records(
93
166
  self,
94
167
  sql: str | list[str],
@@ -168,7 +241,7 @@ class ExasolHook(DbApiHook):
168
241
  )
169
242
  return cols
170
243
 
171
- @overload # type: ignore[override]
244
+ @overload
172
245
  def run(
173
246
  self,
174
247
  sql: str | Iterable[str],
@@ -237,9 +310,8 @@ class ExasolHook(DbApiHook):
237
310
  self.log.info("Running statement: %s, parameters: %s", sql_statement, parameters)
238
311
  with closing(conn.execute(sql_statement, parameters)) as exa_statement:
239
312
  if handler is not None:
240
- result = self._make_common_data_structure( # type: ignore[attr-defined]
241
- handler(exa_statement)
242
- )
313
+ result = self._make_common_data_structure(handler(exa_statement))
314
+
243
315
  if return_single_query_results(sql, return_last, split_statements):
244
316
  _last_result = result
245
317
  _last_columns = self.get_description(exa_statement)
@@ -257,8 +329,7 @@ class ExasolHook(DbApiHook):
257
329
  if return_single_query_results(sql, return_last, split_statements):
258
330
  self.descriptions = [_last_columns]
259
331
  return _last_result
260
- else:
261
- return results
332
+ return results
262
333
 
263
334
  def set_autocommit(self, conn, autocommit: bool) -> None:
264
335
  """
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-exasol
3
- Version: 4.7.4rc1
3
+ Version: 4.8.4rc1
4
4
  Summary: Provider package apache-airflow-providers-exasol for Apache Airflow
5
5
  Keywords: airflow-provider,exasol,airflow,integration
6
6
  Author-email: Apache Software Foundation <dev@airflow.apache.org>
7
7
  Maintainer-email: Apache Software Foundation <dev@airflow.apache.org>
8
- Requires-Python: ~=3.9
8
+ Requires-Python: >=3.10
9
9
  Description-Content-Type: text/x-rst
10
+ License-Expression: Apache-2.0
10
11
  Classifier: Development Status :: 5 - Production/Stable
11
12
  Classifier: Environment :: Console
12
13
  Classifier: Environment :: Web Environment
@@ -14,19 +15,21 @@ Classifier: Intended Audience :: Developers
14
15
  Classifier: Intended Audience :: System Administrators
15
16
  Classifier: Framework :: Apache Airflow
16
17
  Classifier: Framework :: Apache Airflow :: Provider
17
- Classifier: License :: OSI Approved :: Apache Software License
18
- Classifier: Programming Language :: Python :: 3.9
19
18
  Classifier: Programming Language :: Python :: 3.10
20
19
  Classifier: Programming Language :: Python :: 3.11
21
20
  Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Topic :: System :: Monitoring
23
- Requires-Dist: apache-airflow>=2.9.0rc0
24
- Requires-Dist: apache-airflow-providers-common-sql>=1.20.0rc0
25
- Requires-Dist: pyexasol>=0.5.1
26
- Requires-Dist: pandas>=2.1.2,<2.2
23
+ License-File: LICENSE
24
+ License-File: NOTICE
25
+ Requires-Dist: apache-airflow>=2.10.0rc1
26
+ Requires-Dist: apache-airflow-providers-common-sql>=1.26.0rc1
27
+ Requires-Dist: pyexasol>=0.26.0
28
+ Requires-Dist: pandas>=2.1.2; python_version <"3.13"
29
+ Requires-Dist: pandas>=2.2.3; python_version >="3.13"
27
30
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
28
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.7.4/changelog.html
29
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.7.4
31
+ Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-exasol/4.8.4/changelog.html
32
+ Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-exasol/4.8.4
30
33
  Project-URL: Mastodon, https://fosstodon.org/@airflow
31
34
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
32
35
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -57,7 +60,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
57
60
 
58
61
  Package ``apache-airflow-providers-exasol``
59
62
 
60
- Release: ``4.7.4``
63
+ Release: ``4.8.4``
61
64
 
62
65
 
63
66
  `Exasol <https://www.exasol.com/>`__
@@ -70,28 +73,29 @@ This is a provider package for ``exasol`` provider. All classes for this provide
70
73
  are in ``airflow.providers.exasol`` python package.
71
74
 
72
75
  You can find package information and changelog for the provider
73
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.7.4/>`_.
76
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.4/>`_.
74
77
 
75
78
  Installation
76
79
  ------------
77
80
 
78
- You can install this package on top of an existing Airflow 2 installation (see ``Requirements`` below
81
+ You can install this package on top of an existing Airflow installation (see ``Requirements`` below
79
82
  for the minimum Airflow version supported) via
80
83
  ``pip install apache-airflow-providers-exasol``
81
84
 
82
- The package supports the following python versions: 3.9,3.10,3.11,3.12
85
+ The package supports the following python versions: 3.10,3.11,3.12,3.13
83
86
 
84
87
  Requirements
85
88
  ------------
86
89
 
87
- ======================================= ==================
90
+ ======================================= =====================================
88
91
  PIP package Version required
89
- ======================================= ==================
90
- ``apache-airflow`` ``>=2.9.0``
91
- ``apache-airflow-providers-common-sql`` ``>=1.20.0``
92
- ``pyexasol`` ``>=0.5.1``
93
- ``pandas`` ``>=2.1.2,<2.2``
94
- ======================================= ==================
92
+ ======================================= =====================================
93
+ ``apache-airflow`` ``>=2.10.0``
94
+ ``apache-airflow-providers-common-sql`` ``>=1.26.0``
95
+ ``pyexasol`` ``>=0.26.0``
96
+ ``pandas`` ``>=2.1.2; python_version < "3.13"``
97
+ ``pandas`` ``>=2.2.3; python_version >= "3.13"``
98
+ ======================================= =====================================
95
99
 
96
100
  Cross provider package dependencies
97
101
  -----------------------------------
@@ -113,5 +117,5 @@ Dependent package
113
117
  ============================================================================================================ ==============
114
118
 
115
119
  The changelog for the provider package can be found in the
116
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.7.4/changelog.html>`_.
120
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.4/changelog.html>`_.
117
121
 
@@ -0,0 +1,12 @@
1
+ airflow/providers/exasol/__init__.py,sha256=YpuRdtIS7E4bQHkoE6mZM2efoy-NJQZLVjT3ALbAc34,1495
2
+ airflow/providers/exasol/get_provider_info.py,sha256=bVYsODSrBNhtf7j1PKfBo2SK6t8ww_Thf4uUbc-YF5s,2069
3
+ airflow/providers/exasol/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
4
+ airflow/providers/exasol/hooks/exasol.py,sha256=O2AZUERAD9Jxtt0_i1uN-LT_dNpvtih6gP4mpZBPMYA,14768
5
+ airflow/providers/exasol/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
6
+ airflow/providers/exasol/operators/exasol.py,sha256=A4P3Qo65RJzrSVEgSNwPbJ2BSA9OsitmFm8kutyxVfw,2500
7
+ apache_airflow_providers_exasol-4.8.4rc1.dist-info/entry_points.txt,sha256=8pvKoFs3wCXkl3x0a5dzqvTonx17I8zD8oodM_M386Q,102
8
+ apache_airflow_providers_exasol-4.8.4rc1.dist-info/licenses/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
9
+ apache_airflow_providers_exasol-4.8.4rc1.dist-info/licenses/NOTICE,sha256=E3-_E02gwwSEFzeeWPKmnIjOoos3hW28CLISV6sYrbQ,168
10
+ apache_airflow_providers_exasol-4.8.4rc1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
11
+ apache_airflow_providers_exasol-4.8.4rc1.dist-info/METADATA,sha256=ZfWNXO1-jlVrK3isWpX_gtBr11XaSxjm-1vfAENEUa0,5461
12
+ apache_airflow_providers_exasol-4.8.4rc1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: flit 3.11.0
2
+ Generator: flit 3.12.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -0,0 +1,5 @@
1
+ Apache Airflow
2
+ Copyright 2016-2025 The Apache Software Foundation
3
+
4
+ This product includes software developed at
5
+ The Apache Software Foundation (http://www.apache.org/).
@@ -1,11 +0,0 @@
1
- airflow/providers/exasol/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
2
- airflow/providers/exasol/__init__.py,sha256=OqQo-4P3xRmzimyVnQ5c_HRsxg3ZQ1gYCgZrmagGomg,1493
3
- airflow/providers/exasol/get_provider_info.py,sha256=4RY2dvqHm3tJKyZtqT5jkCwKGSU-5GFVHqZz3GLufz8,3110
4
- airflow/providers/exasol/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
5
- airflow/providers/exasol/hooks/exasol.py,sha256=soRJkUan7g8-oBV7drqoYUZoI6DntNl813ENQR7I-ag,11955
6
- airflow/providers/exasol/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
7
- airflow/providers/exasol/operators/exasol.py,sha256=A4P3Qo65RJzrSVEgSNwPbJ2BSA9OsitmFm8kutyxVfw,2500
8
- apache_airflow_providers_exasol-4.7.4rc1.dist-info/entry_points.txt,sha256=8pvKoFs3wCXkl3x0a5dzqvTonx17I8zD8oodM_M386Q,102
9
- apache_airflow_providers_exasol-4.7.4rc1.dist-info/WHEEL,sha256=_2ozNFCLWc93bK4WKHCO-eDUENDlo-dgc9cU3qokYO4,82
10
- apache_airflow_providers_exasol-4.7.4rc1.dist-info/METADATA,sha256=PBBg_5FoXDe8UaCrSC-6FWcfQKTVh36vD6zVJninWos,5202
11
- apache_airflow_providers_exasol-4.7.4rc1.dist-info/RECORD,,