apache-airflow-providers-exasol 4.8.2rc1__tar.gz → 4.8.3__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-exasol might be problematic. Click here for more details.

Files changed (35) hide show
  1. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/PKG-INFO +9 -10
  2. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/README.rst +4 -5
  3. apache_airflow_providers_exasol-4.8.3/docs/.latest-doc-only-change.txt +1 -0
  4. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/docs/changelog.rst +17 -0
  5. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/docs/index.rst +4 -6
  6. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/provider.yaml +2 -1
  7. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/pyproject.toml +6 -6
  8. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/src/airflow/providers/exasol/__init__.py +1 -1
  9. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/src/airflow/providers/exasol/hooks/exasol.py +44 -1
  10. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/tests/unit/exasol/hooks/test_exasol.py +85 -0
  11. apache_airflow_providers_exasol-4.8.2rc1/docs/.latest-doc-only-change.txt +0 -1
  12. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/docs/commits.rst +0 -0
  13. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/docs/conf.py +0 -0
  14. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/docs/installing-providers-from-sources.rst +0 -0
  15. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/docs/integration-logos/Exasol.png +0 -0
  16. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/docs/operators.rst +0 -0
  17. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/docs/security.rst +0 -0
  18. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/src/airflow/__init__.py +0 -0
  19. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/src/airflow/providers/__init__.py +0 -0
  20. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/src/airflow/providers/exasol/LICENSE +0 -0
  21. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/src/airflow/providers/exasol/get_provider_info.py +0 -0
  22. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/src/airflow/providers/exasol/hooks/__init__.py +0 -0
  23. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/src/airflow/providers/exasol/operators/__init__.py +0 -0
  24. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/src/airflow/providers/exasol/operators/exasol.py +0 -0
  25. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/tests/conftest.py +0 -0
  26. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/tests/system/__init__.py +0 -0
  27. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/tests/system/exasol/__init__.py +0 -0
  28. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/tests/system/exasol/example_exasol.py +0 -0
  29. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/tests/unit/__init__.py +0 -0
  30. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/tests/unit/exasol/__init__.py +0 -0
  31. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/tests/unit/exasol/hooks/__init__.py +0 -0
  32. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/tests/unit/exasol/hooks/test_sql.py +0 -0
  33. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/tests/unit/exasol/operators/__init__.py +0 -0
  34. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/tests/unit/exasol/operators/test_exasol.py +0 -0
  35. {apache_airflow_providers_exasol-4.8.2rc1 → apache_airflow_providers_exasol-4.8.3}/tests/unit/exasol/operators/test_exasol_sql.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-exasol
3
- Version: 4.8.2rc1
3
+ Version: 4.8.3
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>
@@ -20,14 +20,14 @@ Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Topic :: System :: Monitoring
23
- Requires-Dist: apache-airflow>=2.10.0rc1
24
- Requires-Dist: apache-airflow-providers-common-sql>=1.26.0rc1
23
+ Requires-Dist: apache-airflow>=2.10.0
24
+ Requires-Dist: apache-airflow-providers-common-sql>=1.26.0
25
25
  Requires-Dist: pyexasol>=0.26.0
26
26
  Requires-Dist: pandas>=2.1.2; python_version <"3.13"
27
27
  Requires-Dist: pandas>=2.2.3; python_version >="3.13"
28
28
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
29
- Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-exasol/4.8.2/changelog.html
30
- Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-exasol/4.8.2
29
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.3/changelog.html
30
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.3
31
31
  Project-URL: Mastodon, https://fosstodon.org/@airflow
32
32
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
33
33
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -58,9 +58,8 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
58
58
 
59
59
  Package ``apache-airflow-providers-exasol``
60
60
 
61
- Release: ``4.8.2``
61
+ Release: ``4.8.3``
62
62
 
63
- Release Date: ``|PypiReleaseDate|``
64
63
 
65
64
  `Exasol <https://www.exasol.com/>`__
66
65
 
@@ -72,12 +71,12 @@ This is a provider package for ``exasol`` provider. All classes for this provide
72
71
  are in ``airflow.providers.exasol`` python package.
73
72
 
74
73
  You can find package information and changelog for the provider
75
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.2/>`_.
74
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.3/>`_.
76
75
 
77
76
  Installation
78
77
  ------------
79
78
 
80
- You can install this package on top of an existing Airflow 2 installation (see ``Requirements`` below
79
+ You can install this package on top of an existing Airflow installation (see ``Requirements`` below
81
80
  for the minimum Airflow version supported) via
82
81
  ``pip install apache-airflow-providers-exasol``
83
82
 
@@ -116,5 +115,5 @@ Dependent package
116
115
  ============================================================================================================ ==============
117
116
 
118
117
  The changelog for the provider package can be found in the
119
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.2/changelog.html>`_.
118
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.3/changelog.html>`_.
120
119
 
@@ -23,9 +23,8 @@
23
23
 
24
24
  Package ``apache-airflow-providers-exasol``
25
25
 
26
- Release: ``4.8.2``
26
+ Release: ``4.8.3``
27
27
 
28
- Release Date: ``|PypiReleaseDate|``
29
28
 
30
29
  `Exasol <https://www.exasol.com/>`__
31
30
 
@@ -37,12 +36,12 @@ This is a provider package for ``exasol`` provider. All classes for this provide
37
36
  are in ``airflow.providers.exasol`` python package.
38
37
 
39
38
  You can find package information and changelog for the provider
40
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.2/>`_.
39
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.3/>`_.
41
40
 
42
41
  Installation
43
42
  ------------
44
43
 
45
- You can install this package on top of an existing Airflow 2 installation (see ``Requirements`` below
44
+ You can install this package on top of an existing Airflow installation (see ``Requirements`` below
46
45
  for the minimum Airflow version supported) via
47
46
  ``pip install apache-airflow-providers-exasol``
48
47
 
@@ -81,4 +80,4 @@ Dependent package
81
80
  ============================================================================================================ ==============
82
81
 
83
82
  The changelog for the provider package can be found in the
84
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.2/changelog.html>`_.
83
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.3/changelog.html>`_.
@@ -0,0 +1 @@
1
+ 3442d811cf693e836a862652c9caf04b7a373af7
@@ -27,6 +27,23 @@
27
27
  Changelog
28
28
  ---------
29
29
 
30
+ 4.8.3
31
+ .....
32
+
33
+
34
+ Release Date: ``|PypiReleaseDate|``
35
+
36
+ Bug Fixes
37
+ ~~~~~~~~~
38
+
39
+ * ``Fix SqlAlchemy URI Construction in ExasolHook (#53798)``
40
+
41
+ .. Below changes are excluded from the changelog. Move them to
42
+ appropriate section above if needed. Do not delete the lines(!):
43
+ * ``Prepare release for Sep 2025 1st wave of providers (#55203)``
44
+ * ``Fix Airflow 2 reference in README/index of providers (#55240)``
45
+ * ``Switch pre-commit to prek (#54258)``
46
+
30
47
  4.8.2
31
48
  .....
32
49
 
@@ -75,9 +75,7 @@ apache-airflow-providers-exasol package
75
75
  `Exasol <https://www.exasol.com/>`__
76
76
 
77
77
 
78
- Release: 4.8.2
79
-
80
- Release Date: ``|PypiReleaseDate|``
78
+ Release: 4.8.3
81
79
 
82
80
  Provider package
83
81
  ----------------
@@ -88,7 +86,7 @@ All classes for this package are included in the ``airflow.providers.exasol`` py
88
86
  Installation
89
87
  ------------
90
88
 
91
- You can install this package on top of an existing Airflow 2 installation via
89
+ You can install this package on top of an existing Airflow installation via
92
90
  ``pip install apache-airflow-providers-exasol``.
93
91
  For the minimum Airflow version supported, see ``Requirements`` below.
94
92
 
@@ -132,5 +130,5 @@ Downloading official packages
132
130
  You can download officially released packages and verify their checksums and signatures from the
133
131
  `Official Apache Download site <https://downloads.apache.org/airflow/providers/>`_
134
132
 
135
- * `The apache-airflow-providers-exasol 4.8.2 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.2.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.2.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.2.tar.gz.sha512>`__)
136
- * `The apache-airflow-providers-exasol 4.8.2 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.2-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.2-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.2-py3-none-any.whl.sha512>`__)
133
+ * `The apache-airflow-providers-exasol 4.8.3 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.3.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.3.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.3.tar.gz.sha512>`__)
134
+ * `The apache-airflow-providers-exasol 4.8.3 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.3-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.3-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.3-py3-none-any.whl.sha512>`__)
@@ -22,12 +22,13 @@ description: |
22
22
  `Exasol <https://www.exasol.com/>`__
23
23
 
24
24
  state: ready
25
- source-date-epoch: 1753690659
25
+ source-date-epoch: 1757950251
26
26
  # Note that those versions are maintained by release manager - do not update them manually
27
27
  # with the exception of case where other provider in sources has >= new provider version.
28
28
  # In such case adding >= NEW_VERSION and bumping to NEW_VERSION in a provider have
29
29
  # to be done in the same PR
30
30
  versions:
31
+ - 4.8.3
31
32
  - 4.8.2
32
33
  - 4.8.1
33
34
  - 4.8.0
@@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"
25
25
 
26
26
  [project]
27
27
  name = "apache-airflow-providers-exasol"
28
- version = "4.8.2rc1"
28
+ version = "4.8.3"
29
29
  description = "Provider package apache-airflow-providers-exasol for Apache Airflow"
30
30
  readme = "README.rst"
31
31
  authors = [
@@ -54,11 +54,11 @@ requires-python = ">=3.10"
54
54
 
55
55
  # The dependencies should be modified in place in the generated file.
56
56
  # Any change in the dependencies is preserved when the file is regenerated
57
- # Make sure to run ``breeze static-checks --type update-providers-dependencies --all-files``
57
+ # Make sure to run ``prek update-providers-dependencies --all-files``
58
58
  # After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
59
59
  dependencies = [
60
- "apache-airflow>=2.10.0rc1",
61
- "apache-airflow-providers-common-sql>=1.26.0rc1",
60
+ "apache-airflow>=2.10.0",
61
+ "apache-airflow-providers-common-sql>=1.26.0",
62
62
  "pyexasol>=0.26.0",
63
63
  'pandas>=2.1.2; python_version <"3.13"',
64
64
  'pandas>=2.2.3; python_version >="3.13"',
@@ -99,8 +99,8 @@ apache-airflow-providers-common-sql = {workspace = true}
99
99
  apache-airflow-providers-standard = {workspace = true}
100
100
 
101
101
  [project.urls]
102
- "Documentation" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-exasol/4.8.2"
103
- "Changelog" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-exasol/4.8.2/changelog.html"
102
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.3"
103
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.3/changelog.html"
104
104
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
105
105
  "Source Code" = "https://github.com/apache/airflow"
106
106
  "Slack Chat" = "https://s.apache.org/airflow-slack"
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "4.8.2"
32
+ __version__ = "4.8.3"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
35
  "2.10.0"
@@ -24,6 +24,7 @@ from typing import TYPE_CHECKING, Any, TypeVar, overload
24
24
  import pyexasol
25
25
  from deprecated import deprecated
26
26
  from pyexasol import ExaConnection, ExaStatement
27
+ from sqlalchemy.engine import URL
27
28
 
28
29
  from airflow.exceptions import AirflowProviderDeprecationWarning
29
30
  from airflow.providers.common.sql.hooks.handlers import return_single_query_results
@@ -53,10 +54,12 @@ class ExasolHook(DbApiHook):
53
54
  conn_type = "exasol"
54
55
  hook_name = "Exasol"
55
56
  supports_autocommit = True
57
+ DEFAULT_SQLALCHEMY_SCHEME = "exa+websocket" # sqlalchemy-exasol dialect
56
58
 
57
- def __init__(self, *args, **kwargs) -> None:
59
+ def __init__(self, *args, sqlalchemy_scheme: str | None = None, **kwargs) -> None:
58
60
  super().__init__(*args, **kwargs)
59
61
  self.schema = kwargs.pop("schema", None)
62
+ self._sqlalchemy_scheme = sqlalchemy_scheme
60
63
 
61
64
  def get_conn(self) -> ExaConnection:
62
65
  conn = self.get_connection(self.get_conn_id())
@@ -74,6 +77,46 @@ class ExasolHook(DbApiHook):
74
77
  conn = pyexasol.connect(**conn_args)
75
78
  return conn
76
79
 
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
+
77
120
  def _get_pandas_df(
78
121
  self, sql, parameters: Iterable | Mapping[str, Any] | None = None, **kwargs
79
122
  ) -> pd.DataFrame:
@@ -63,6 +63,91 @@ class TestExasolHookConn:
63
63
  assert kwargs["encryption"] is True
64
64
 
65
65
 
66
+ class TestExasolHookSqlalchemy:
67
+ def get_connection(self, extra: dict | None = None) -> models.Connection:
68
+ return models.Connection(
69
+ login="login",
70
+ password="password",
71
+ host="host",
72
+ port=1234,
73
+ schema="schema",
74
+ extra=extra,
75
+ )
76
+
77
+ @pytest.mark.parametrize(
78
+ "init_scheme, extra_scheme, expected_result, expect_error",
79
+ [
80
+ (None, None, "exa+websocket", False),
81
+ ("exa+pyodbc", None, "exa+pyodbc", False),
82
+ (None, "exa+turbodbc", "exa+turbodbc", False),
83
+ ("exa+invalid", None, None, True),
84
+ (None, "exa+invalid", None, True),
85
+ ],
86
+ ids=[
87
+ "default",
88
+ "from_init_arg",
89
+ "from_extra",
90
+ "invalid_from_init_arg",
91
+ "invalid_from_extra",
92
+ ],
93
+ )
94
+ def test_sqlalchemy_scheme_property(self, init_scheme, extra_scheme, expected_result, expect_error):
95
+ hook = ExasolHook(sqlalchemy_scheme=init_scheme) if init_scheme else ExasolHook()
96
+ connection = self.get_connection(extra={"sqlalchemy_scheme": extra_scheme} if extra_scheme else None)
97
+ hook.get_connection = mock.Mock(return_value=connection)
98
+
99
+ if not expect_error:
100
+ assert hook.sqlalchemy_scheme == expected_result
101
+ else:
102
+ with pytest.raises(ValueError):
103
+ _ = hook.sqlalchemy_scheme
104
+
105
+ @pytest.mark.parametrize(
106
+ "hook_scheme, extra, expected_url",
107
+ [
108
+ (None, {}, "exa+websocket://login:password@host:1234/schema"),
109
+ (
110
+ None,
111
+ {"CONNECTIONLCALL": "en_US.UTF-8", "driver": "EXAODBC"},
112
+ "exa+websocket://login:password@host:1234/schema?CONNECTIONLCALL=en_US.UTF-8&driver=EXAODBC",
113
+ ),
114
+ (
115
+ None,
116
+ {"sqlalchemy_scheme": "exa+turbodbc", "CONNECTIONLCALL": "en_US.UTF-8", "driver": "EXAODBC"},
117
+ "exa+turbodbc://login:password@host:1234/schema?CONNECTIONLCALL=en_US.UTF-8&driver=EXAODBC",
118
+ ),
119
+ (
120
+ "exa+pyodbc",
121
+ {
122
+ "sqlalchemy_scheme": "exa+turbodbc", # should be overridden
123
+ "CONNECTIONLCALL": "en_US.UTF-8",
124
+ "driver": "EXAODBC",
125
+ },
126
+ "exa+pyodbc://login:password@host:1234/schema?CONNECTIONLCALL=en_US.UTF-8&driver=EXAODBC",
127
+ ),
128
+ ],
129
+ ids=[
130
+ "default",
131
+ "default_with_extra",
132
+ "scheme_from_extra_turbodbc",
133
+ "scheme_from_hook",
134
+ ],
135
+ )
136
+ def test_sqlalchemy_url_property(self, hook_scheme, extra, expected_url):
137
+ hook = ExasolHook(sqlalchemy_scheme=hook_scheme) if hook_scheme else ExasolHook()
138
+ hook.get_connection = mock.Mock(return_value=self.get_connection(extra=extra))
139
+ assert hook.sqlalchemy_url.render_as_string(hide_password=False) == expected_url
140
+
141
+ def test_get_uri(self):
142
+ hook = ExasolHook()
143
+ connection = self.get_connection(extra={"CONNECTIONLCALL": "en_US.UTF-8", "driver": "EXAODBC"})
144
+ hook.get_connection = mock.Mock(return_value=connection)
145
+ assert (
146
+ hook.get_uri()
147
+ == "exa+websocket://login:password@host:1234/schema?CONNECTIONLCALL=en_US.UTF-8&driver=EXAODBC"
148
+ )
149
+
150
+
66
151
  class TestExasolHook:
67
152
  def setup_method(self):
68
153
  self.cur = mock.MagicMock(rowcount=lambda: 0)
@@ -1 +0,0 @@
1
- 7b2ec33c7ad4998d9c9735b79593fcdcd3b9dd1f