apache-airflow-providers-exasol 4.7.5__tar.gz → 4.8.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.
Files changed (35) hide show
  1. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/PKG-INFO +10 -10
  2. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/README.rst +5 -5
  3. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/docs/changelog.rst +24 -0
  4. apache_airflow_providers_exasol-4.8.0rc1/docs/commits.rst +35 -0
  5. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/docs/index.rst +20 -6
  6. apache_airflow_providers_exasol-4.8.0rc1/docs/operators.rst +79 -0
  7. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/provider.yaml +6 -2
  8. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/pyproject.toml +5 -5
  9. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/src/airflow/providers/exasol/__init__.py +3 -3
  10. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/src/airflow/providers/exasol/hooks/exasol.py +33 -2
  11. apache_airflow_providers_exasol-4.8.0rc1/tests/system/__init__.py +16 -0
  12. apache_airflow_providers_exasol-4.8.0rc1/tests/system/exasol/__init__.py +16 -0
  13. apache_airflow_providers_exasol-4.8.0rc1/tests/system/exasol/example_exasol.py +91 -0
  14. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/tests/unit/exasol/hooks/test_exasol.py +20 -0
  15. apache_airflow_providers_exasol-4.7.5/docs/commits.rst +0 -638
  16. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/docs/.latest-doc-only-change.txt +0 -0
  17. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/docs/conf.py +0 -0
  18. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/docs/installing-providers-from-sources.rst +0 -0
  19. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/docs/integration-logos/Exasol.png +0 -0
  20. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/docs/security.rst +0 -0
  21. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/src/airflow/__init__.py +0 -0
  22. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/src/airflow/providers/__init__.py +0 -0
  23. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/src/airflow/providers/exasol/LICENSE +0 -0
  24. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/src/airflow/providers/exasol/get_provider_info.py +0 -0
  25. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/src/airflow/providers/exasol/hooks/__init__.py +0 -0
  26. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/src/airflow/providers/exasol/operators/__init__.py +0 -0
  27. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/src/airflow/providers/exasol/operators/exasol.py +0 -0
  28. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/tests/conftest.py +0 -0
  29. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/tests/unit/__init__.py +0 -0
  30. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/tests/unit/exasol/__init__.py +0 -0
  31. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/tests/unit/exasol/hooks/__init__.py +0 -0
  32. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/tests/unit/exasol/hooks/test_sql.py +0 -0
  33. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/tests/unit/exasol/operators/__init__.py +0 -0
  34. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/tests/unit/exasol/operators/test_exasol.py +0 -0
  35. {apache_airflow_providers_exasol-4.7.5 → apache_airflow_providers_exasol-4.8.0rc1}/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.7.5
3
+ Version: 4.8.0rc1
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,13 +20,13 @@ Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
21
  Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Topic :: System :: Monitoring
23
- Requires-Dist: apache-airflow>=2.9.0
24
- Requires-Dist: apache-airflow-providers-common-sql>=1.20.0
23
+ Requires-Dist: apache-airflow>=2.10.0rc1
24
+ Requires-Dist: apache-airflow-providers-common-sql>=1.26.0rc1
25
25
  Requires-Dist: pyexasol>=0.5.1
26
26
  Requires-Dist: pandas>=2.1.2,<2.2
27
27
  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.5/changelog.html
29
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.7.5
28
+ Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-exasol/4.8.0/changelog.html
29
+ Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-exasol/4.8.0
30
30
  Project-URL: Mastodon, https://fosstodon.org/@airflow
31
31
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
32
32
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -57,7 +57,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
57
57
 
58
58
  Package ``apache-airflow-providers-exasol``
59
59
 
60
- Release: ``4.7.5``
60
+ Release: ``4.8.0``
61
61
 
62
62
 
63
63
  `Exasol <https://www.exasol.com/>`__
@@ -70,7 +70,7 @@ This is a provider package for ``exasol`` provider. All classes for this provide
70
70
  are in ``airflow.providers.exasol`` python package.
71
71
 
72
72
  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.5/>`_.
73
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.0/>`_.
74
74
 
75
75
  Installation
76
76
  ------------
@@ -87,8 +87,8 @@ Requirements
87
87
  ======================================= ==================
88
88
  PIP package Version required
89
89
  ======================================= ==================
90
- ``apache-airflow`` ``>=2.9.0``
91
- ``apache-airflow-providers-common-sql`` ``>=1.20.0``
90
+ ``apache-airflow`` ``>=2.10.0``
91
+ ``apache-airflow-providers-common-sql`` ``>=1.26.0``
92
92
  ``pyexasol`` ``>=0.5.1``
93
93
  ``pandas`` ``>=2.1.2,<2.2``
94
94
  ======================================= ==================
@@ -113,5 +113,5 @@ Dependent package
113
113
  ============================================================================================================ ==============
114
114
 
115
115
  The changelog for the provider package can be found in the
116
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.7.5/changelog.html>`_.
116
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.0/changelog.html>`_.
117
117
 
@@ -23,7 +23,7 @@
23
23
 
24
24
  Package ``apache-airflow-providers-exasol``
25
25
 
26
- Release: ``4.7.5``
26
+ Release: ``4.8.0``
27
27
 
28
28
 
29
29
  `Exasol <https://www.exasol.com/>`__
@@ -36,7 +36,7 @@ This is a provider package for ``exasol`` provider. All classes for this provide
36
36
  are in ``airflow.providers.exasol`` python package.
37
37
 
38
38
  You can find package information and changelog for the provider
39
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.7.5/>`_.
39
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.0/>`_.
40
40
 
41
41
  Installation
42
42
  ------------
@@ -53,8 +53,8 @@ Requirements
53
53
  ======================================= ==================
54
54
  PIP package Version required
55
55
  ======================================= ==================
56
- ``apache-airflow`` ``>=2.9.0``
57
- ``apache-airflow-providers-common-sql`` ``>=1.20.0``
56
+ ``apache-airflow`` ``>=2.10.0``
57
+ ``apache-airflow-providers-common-sql`` ``>=1.26.0``
58
58
  ``pyexasol`` ``>=0.5.1``
59
59
  ``pandas`` ``>=2.1.2,<2.2``
60
60
  ======================================= ==================
@@ -79,4 +79,4 @@ Dependent package
79
79
  ============================================================================================================ ==============
80
80
 
81
81
  The changelog for the provider package can be found in the
82
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.7.5/changelog.html>`_.
82
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.8.0/changelog.html>`_.
@@ -27,6 +27,30 @@
27
27
  Changelog
28
28
  ---------
29
29
 
30
+ 4.8.0
31
+ .....
32
+
33
+ .. note::
34
+ This release of provider is only available for Airflow 2.10+ as explained in the
35
+ Apache Airflow providers support policy <https://github.com/apache/airflow/blob/main/PROVIDERS.rst#minimum-supported-version-of-airflow-for-community-managed-providers>_.
36
+
37
+ Misc
38
+ ~~~~
39
+
40
+ * ``Update Exasol provider dependencies and deprecate get_pandas_df method (#50017)``
41
+ * ``Bump min Airflow version in providers to 2.10 (#49843)``
42
+ * ``chore: import paths use the stable functions (#49460)``
43
+
44
+ Doc-only
45
+ ~~~~~~~~
46
+
47
+ * ``add exasol operators doc and example & refactor trino (#49679)``
48
+
49
+ .. Below changes are excluded from the changelog. Move them to
50
+ appropriate section above if needed. Do not delete the lines(!):
51
+ * ``Update description of provider.yaml dependencies (#50231)``
52
+ * ``Avoid committing history for providers (#49907)``
53
+
30
54
  4.7.5
31
55
  .....
32
56
 
@@ -0,0 +1,35 @@
1
+
2
+ .. Licensed to the Apache Software Foundation (ASF) under one
3
+ or more contributor license agreements. See the NOTICE file
4
+ distributed with this work for additional information
5
+ regarding copyright ownership. The ASF licenses this file
6
+ to you under the Apache License, Version 2.0 (the
7
+ "License"); you may not use this file except in compliance
8
+ with the License. You may obtain a copy of the License at
9
+
10
+ .. http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ .. Unless required by applicable law or agreed to in writing,
13
+ software distributed under the License is distributed on an
14
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ KIND, either express or implied. See the License for the
16
+ specific language governing permissions and limitations
17
+ under the License.
18
+
19
+ .. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
20
+
21
+ .. IF YOU WANT TO MODIFY THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
22
+ `PROVIDER_COMMITS_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
23
+
24
+ .. THE REMAINDER OF THE FILE IS AUTOMATICALLY GENERATED. IT WILL BE OVERWRITTEN!
25
+
26
+ Package apache-airflow-providers-exasol
27
+ ------------------------------------------------------
28
+
29
+ `Exasol <https://www.exasol.com/>`__
30
+
31
+
32
+ This is detailed commit list of changes for versions provider package: ``exasol``.
33
+ For high-level changelog, see :doc:`package information including changelog <index>`.
34
+
35
+ .. airflow-providers-commits::
@@ -29,6 +29,13 @@
29
29
  Changelog <changelog>
30
30
  Security <security>
31
31
 
32
+ .. toctree::
33
+ :hidden:
34
+ :maxdepth: 1
35
+ :caption: Guides
36
+
37
+ Operators <operators>
38
+
32
39
  .. toctree::
33
40
  :hidden:
34
41
  :maxdepth: 1
@@ -44,6 +51,13 @@
44
51
  PyPI Repository <https://pypi.org/project/apache-airflow-providers-exasol/>
45
52
  Installing from sources <installing-providers-from-sources>
46
53
 
54
+ .. toctree::
55
+ :hidden:
56
+ :maxdepth: 1
57
+ :caption: System tests
58
+
59
+ System Tests <_api/tests/system/exasol/index>
60
+
47
61
  .. THE REMAINDER OF THE FILE IS AUTOMATICALLY GENERATED. IT WILL BE OVERWRITTEN AT RELEASE TIME!
48
62
 
49
63
 
@@ -61,7 +75,7 @@ apache-airflow-providers-exasol package
61
75
  `Exasol <https://www.exasol.com/>`__
62
76
 
63
77
 
64
- Release: 4.7.5
78
+ Release: 4.8.0
65
79
 
66
80
  Provider package
67
81
  ----------------
@@ -79,13 +93,13 @@ For the minimum Airflow version supported, see ``Requirements`` below.
79
93
  Requirements
80
94
  ------------
81
95
 
82
- The minimum Apache Airflow version supported by this provider distribution is ``2.9.0``.
96
+ The minimum Apache Airflow version supported by this provider distribution is ``2.10.0``.
83
97
 
84
98
  ======================================= ==================
85
99
  PIP package Version required
86
100
  ======================================= ==================
87
- ``apache-airflow`` ``>=2.9.0``
88
- ``apache-airflow-providers-common-sql`` ``>=1.20.0``
101
+ ``apache-airflow`` ``>=2.10.0``
102
+ ``apache-airflow-providers-common-sql`` ``>=1.26.0``
89
103
  ``pyexasol`` ``>=0.5.1``
90
104
  ``pandas`` ``>=2.1.2,<2.2``
91
105
  ======================================= ==================
@@ -115,5 +129,5 @@ Downloading official packages
115
129
  You can download officially released packages and verify their checksums and signatures from the
116
130
  `Official Apache Download site <https://downloads.apache.org/airflow/providers/>`_
117
131
 
118
- * `The apache-airflow-providers-exasol 4.7.5 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.7.5.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.7.5.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.7.5.tar.gz.sha512>`__)
119
- * `The apache-airflow-providers-exasol 4.7.5 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.7.5-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.7.5-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.7.5-py3-none-any.whl.sha512>`__)
132
+ * `The apache-airflow-providers-exasol 4.8.0 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.0.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.0.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.0.tar.gz.sha512>`__)
133
+ * `The apache-airflow-providers-exasol 4.8.0 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.0-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.0-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_exasol-4.8.0-py3-none-any.whl.sha512>`__)
@@ -0,0 +1,79 @@
1
+ .. Licensed to the Apache Software Foundation (ASF) under one
2
+ or more contributor license agreements. See the NOTICE file
3
+ distributed with this work for additional information
4
+ regarding copyright ownership. The ASF licenses this file
5
+ to you under the Apache License, Version 2.0 (the
6
+ "License"); you may not use this file except in compliance
7
+ with the License. You may obtain a copy of the License at
8
+
9
+ .. http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ .. Unless required by applicable law or agreed to in writing,
12
+ software distributed under the License is distributed on an
13
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ KIND, either express or implied. See the License for the
15
+ specific language governing permissions and limitations
16
+ under the License.
17
+
18
+
19
+
20
+ .. _howto/operator:ExasolOperator:
21
+
22
+ SQLExecuteQueryOperator to connect to Exasol
23
+ ====================================================
24
+
25
+ Use the :class:`SQLExecuteQueryOperator<airflow.providers.common.sql.operators.sql>` to execute
26
+ SQL commands in an `Exasol <https://www.exasol.com/>`__ database.
27
+
28
+ .. note::
29
+ Previously, an ``ExasolOperator`` was used to perform this kind of operation.
30
+ After deprecation this has been removed. Please use ``SQLExecuteQueryOperator`` instead.
31
+
32
+ .. note::
33
+ Make sure you have installed the ``apache-airflow-providers-exasol`` package
34
+ and its dependency ``pyexasol`` to enable Exasol support.
35
+
36
+ Using the Operator
37
+ ^^^^^^^^^^^^^^^^^^
38
+
39
+ Use the ``conn_id`` argument to connect to your Exasol instance where
40
+ the connection metadata is structured as follows:
41
+
42
+ .. list-table:: Exasol Airflow Connection Metadata
43
+ :widths: 25 25
44
+ :header-rows: 1
45
+
46
+ * - Parameter
47
+ - Input
48
+ * - Host: string
49
+ - Exasol hostname, container alias or IP address
50
+ * - Schema: string
51
+ - Default schema name (e.g. ``TEST``) (optional)
52
+ * - Login: string
53
+ - Exasol username (e.g. ``TEST`` or ``sys``)
54
+ * - Password: string
55
+ - Exasol password
56
+ * - Port: int
57
+ - Exasol port (default: 8563)
58
+ * - Extra: JSON
59
+ - Additional connection configuration passed to *pyexasol*, such as:
60
+ ``{"encryption": false}`` or
61
+ ``{"encryption": true, "websocket_sslopt": {"cert_reqs": 0}}``
62
+
63
+ An example usage of the SQLExecuteQueryOperator to connect to Exasol is as follows:
64
+
65
+ .. exampleinclude:: /../../exasol/tests/system/exasol/example_exasol.py
66
+ :language: python
67
+ :start-after: [START howto_operator_exasol]
68
+ :end-before: [END howto_operator_exasol]
69
+
70
+ Reference
71
+ ^^^^^^^^^
72
+ For further information, look at:
73
+
74
+ * `Exasol Documentation <https://docs.exasol.com/>`__
75
+
76
+ .. note::
77
+
78
+ Parameters provided directly via SQLExecuteQueryOperator() take precedence
79
+ over those specified in the Airflow connection metadata (such as ``schema``, ``login``, ``password``, etc).
@@ -22,9 +22,13 @@ description: |
22
22
  `Exasol <https://www.exasol.com/>`__
23
23
 
24
24
  state: ready
25
- source-date-epoch: 1744791930
26
- # note that those versions are maintained by release manager - do not update them manually
25
+ source-date-epoch: 1747132739
26
+ # Note that those versions are maintained by release manager - do not update them manually
27
+ # with the exception of case where other provider in sources has >= new provider version.
28
+ # In such case adding >= NEW_VERSION and bumping to NEW_VERSION in a provider have
29
+ # to be done in the same PR
27
30
  versions:
31
+ - 4.8.0
28
32
  - 4.7.5
29
33
  - 4.7.4
30
34
  - 4.7.3
@@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"
25
25
 
26
26
  [project]
27
27
  name = "apache-airflow-providers-exasol"
28
- version = "4.7.5"
28
+ version = "4.8.0rc1"
29
29
  description = "Provider package apache-airflow-providers-exasol for Apache Airflow"
30
30
  readme = "README.rst"
31
31
  authors = [
@@ -57,8 +57,8 @@ requires-python = "~=3.9"
57
57
  # Make sure to run ``breeze static-checks --type 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.9.0",
61
- "apache-airflow-providers-common-sql>=1.20.0",
60
+ "apache-airflow>=2.10.0rc1",
61
+ "apache-airflow-providers-common-sql>=1.26.0rc1",
62
62
  "pyexasol>=0.5.1",
63
63
  # In pandas 2.2 minimal version of the sqlalchemy is 2.0
64
64
  # https://pandas.pydata.org/docs/whatsnew/v2.2.0.html#increased-minimum-versions-for-dependencies
@@ -102,8 +102,8 @@ apache-airflow-providers-common-sql = {workspace = true}
102
102
  apache-airflow-providers-standard = {workspace = true}
103
103
 
104
104
  [project.urls]
105
- "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.7.5"
106
- "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-exasol/4.7.5/changelog.html"
105
+ "Documentation" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-exasol/4.8.0"
106
+ "Changelog" = "https://airflow.staged.apache.org/docs/apache-airflow-providers-exasol/4.8.0/changelog.html"
107
107
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
108
108
  "Source Code" = "https://github.com/apache/airflow"
109
109
  "Slack Chat" = "https://s.apache.org/airflow-slack"
@@ -29,11 +29,11 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "4.7.5"
32
+ __version__ = "4.8.0"
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
  )
@@ -22,9 +22,12 @@ from contextlib import closing
22
22
  from typing import TYPE_CHECKING, Any, Callable, TypeVar, overload
23
23
 
24
24
  import pyexasol
25
+ from deprecated import deprecated
25
26
  from pyexasol import ExaConnection, ExaStatement
26
27
 
27
- from airflow.providers.common.sql.hooks.sql import DbApiHook, return_single_query_results
28
+ from airflow.exceptions import AirflowProviderDeprecationWarning
29
+ from airflow.providers.common.sql.hooks.handlers import return_single_query_results
30
+ from airflow.providers.common.sql.hooks.sql import DbApiHook
28
31
 
29
32
  if TYPE_CHECKING:
30
33
  import pandas as pd
@@ -72,7 +75,7 @@ class ExasolHook(DbApiHook):
72
75
  conn = pyexasol.connect(**conn_args)
73
76
  return conn
74
77
 
75
- def get_pandas_df(
78
+ def _get_pandas_df(
76
79
  self, sql, parameters: Iterable | Mapping[str, Any] | None = None, **kwargs
77
80
  ) -> pd.DataFrame:
78
81
  """
@@ -89,6 +92,34 @@ class ExasolHook(DbApiHook):
89
92
  df = conn.export_to_pandas(sql, query_params=parameters, **kwargs)
90
93
  return df
91
94
 
95
+ @deprecated(
96
+ reason="Replaced by function `get_df`.",
97
+ category=AirflowProviderDeprecationWarning,
98
+ action="ignore",
99
+ )
100
+ def get_pandas_df(
101
+ self,
102
+ sql,
103
+ parameters: list | tuple | Mapping[str, Any] | None = None,
104
+ **kwargs,
105
+ ) -> pd.DataFrame:
106
+ """
107
+ Execute the sql and returns a pandas dataframe.
108
+
109
+ :param sql: the sql statement to be executed (str) or a list of sql statements to execute
110
+ :param parameters: The parameters to render the SQL query with.
111
+ :param kwargs: (optional) passed into pandas.io.sql.read_sql method
112
+ """
113
+ return self._get_pandas_df(sql, parameters, **kwargs)
114
+
115
+ def _get_polars_df(
116
+ self,
117
+ sql,
118
+ parameters: list | tuple | Mapping[str, Any] | None = None,
119
+ **kwargs,
120
+ ):
121
+ raise NotImplementedError("Polars is not supported for Exasol")
122
+
92
123
  def get_records(
93
124
  self,
94
125
  sql: str | list[str],
@@ -0,0 +1,16 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
@@ -0,0 +1,16 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
@@ -0,0 +1,91 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ """
18
+ This is an example DAG for the use of the SQLExecuteQueryOperator with Exasol.
19
+ """
20
+
21
+ from __future__ import annotations
22
+
23
+ import datetime
24
+
25
+ from airflow import DAG
26
+ from airflow.providers.common.sql.operators.sql import SQLExecuteQueryOperator
27
+ from airflow.providers.exasol.hooks.exasol import exasol_fetch_all_handler
28
+
29
+ DAG_ID = "example_exasol"
30
+
31
+ with DAG(
32
+ dag_id=DAG_ID,
33
+ start_date=datetime.datetime(2025, 1, 1),
34
+ default_args={"conn_id": "my_exasol_conn", "handler": exasol_fetch_all_handler},
35
+ schedule="@once",
36
+ catchup=False,
37
+ ) as dag:
38
+ # [START howto_operator_exasol]
39
+ create_table_exasol = SQLExecuteQueryOperator(
40
+ task_id="create_table_exasol",
41
+ sql="""
42
+ CREATE OR REPLACE TABLE exasol_example (
43
+ a VARCHAR(100),
44
+ b DECIMAL(18,0)
45
+ );
46
+ """,
47
+ )
48
+
49
+ alter_table_exasol = SQLExecuteQueryOperator(
50
+ task_id="alter_table_exasol",
51
+ sql="ALTER TABLE exasol_example ADD COLUMN c DECIMAL(18,0);",
52
+ )
53
+
54
+ insert_data_exasol = SQLExecuteQueryOperator(
55
+ task_id="insert_data_exasol",
56
+ sql="""
57
+ INSERT INTO exasol_example (a, b, c)
58
+ VALUES
59
+ ('a', 1, 1),
60
+ ('a', 2, 1),
61
+ ('b', 3, 1);
62
+ """,
63
+ )
64
+
65
+ select_data_exasol = SQLExecuteQueryOperator(
66
+ task_id="select_data_exasol",
67
+ sql="SELECT * FROM exasol_example;",
68
+ )
69
+
70
+ drop_table_exasol = SQLExecuteQueryOperator(
71
+ task_id="drop_table_exasol",
72
+ sql="DROP TABLE exasol_example;",
73
+ )
74
+ # [END howto_operator_exasol]
75
+
76
+ (
77
+ create_table_exasol
78
+ >> alter_table_exasol
79
+ >> insert_data_exasol
80
+ >> select_data_exasol
81
+ >> drop_table_exasol
82
+ )
83
+
84
+ from tests_common.test_utils.watcher import watcher
85
+
86
+ list(dag.tasks) >> watcher()
87
+
88
+ from tests_common.test_utils.system_tests import get_test_run # noqa: E402
89
+
90
+ # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
91
+ test_run = get_test_run(dag)
@@ -171,3 +171,23 @@ class TestExasolHook:
171
171
  query_params=query_params,
172
172
  export_params=export_params,
173
173
  )
174
+
175
+ def test_get_df_pandas(self):
176
+ statement = "SQL"
177
+ column = "col"
178
+ result_sets = [("row1",), ("row2",)]
179
+ mock_df = mock.MagicMock()
180
+ mock_df.columns = [column]
181
+ mock_df.values.tolist.return_value = result_sets
182
+ self.conn.export_to_pandas.return_value = mock_df
183
+
184
+ df = self.db_hook.get_df(statement, df_type="pandas")
185
+
186
+ assert column == df.columns[0]
187
+
188
+ assert result_sets[0][0] == df.values.tolist()[0][0]
189
+ assert result_sets[1][0] == df.values.tolist()[1][0]
190
+
191
+ def test_get_df_polars(self):
192
+ with pytest.raises(NotImplementedError):
193
+ self.db_hook.get_df("SQL", df_type="polars")