apache-airflow-providers-mysql 5.7.3rc1__py3-none-any.whl → 5.7.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.
- airflow/providers/mysql/__init__.py +1 -1
- airflow/providers/mysql/get_provider_info.py +4 -3
- airflow/providers/mysql/hooks/mysql.py +27 -3
- airflow/providers/mysql/operators/mysql.py +2 -2
- airflow/providers/mysql/transfers/vertica_to_mysql.py +9 -1
- {apache_airflow_providers_mysql-5.7.3rc1.dist-info → apache_airflow_providers_mysql-5.7.4rc1.dist-info}/METADATA +16 -16
- {apache_airflow_providers_mysql-5.7.3rc1.dist-info → apache_airflow_providers_mysql-5.7.4rc1.dist-info}/RECORD +9 -9
- {apache_airflow_providers_mysql-5.7.3rc1.dist-info → apache_airflow_providers_mysql-5.7.4rc1.dist-info}/WHEEL +1 -1
- {apache_airflow_providers_mysql-5.7.3rc1.dist-info → apache_airflow_providers_mysql-5.7.4rc1.dist-info}/entry_points.txt +0 -0
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
29
29
|
|
30
30
|
__all__ = ["__version__"]
|
31
31
|
|
32
|
-
__version__ = "5.7.
|
32
|
+
__version__ = "5.7.4"
|
33
33
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
35
35
|
"2.8.0"
|
@@ -28,8 +28,9 @@ def get_provider_info():
|
|
28
28
|
"name": "MySQL",
|
29
29
|
"description": "`MySQL <https://www.mysql.com/>`__\n",
|
30
30
|
"state": "ready",
|
31
|
-
"source-date-epoch":
|
31
|
+
"source-date-epoch": 1731570417,
|
32
32
|
"versions": [
|
33
|
+
"5.7.4",
|
33
34
|
"5.7.3",
|
34
35
|
"5.7.2",
|
35
36
|
"5.7.1",
|
@@ -74,8 +75,8 @@ def get_provider_info():
|
|
74
75
|
],
|
75
76
|
"dependencies": [
|
76
77
|
"apache-airflow>=2.8.0",
|
77
|
-
"apache-airflow-providers-common-sql>=1.
|
78
|
-
"mysqlclient>=1.4.0",
|
78
|
+
"apache-airflow-providers-common-sql>=1.20.0",
|
79
|
+
"mysqlclient>=1.4.0; sys_platform != 'darwin'",
|
79
80
|
"mysql-connector-python>=8.0.29",
|
80
81
|
],
|
81
82
|
"additional-extras": [{"name": "mysql-connector-python", "dependencies": []}],
|
@@ -35,7 +35,15 @@ if TYPE_CHECKING:
|
|
35
35
|
from mysql.connector.abstracts import MySQLConnectionAbstract
|
36
36
|
except ModuleNotFoundError:
|
37
37
|
logger.warning("The package 'mysql-connector-python' is not installed. Import skipped")
|
38
|
-
|
38
|
+
try:
|
39
|
+
from MySQLdb.connections import Connection as MySQLdbConnection
|
40
|
+
except ImportError:
|
41
|
+
raise RuntimeError(
|
42
|
+
"You do not have `mysqlclient` package installed. "
|
43
|
+
"Please install it with `pip install mysqlclient` and make sure you have system "
|
44
|
+
"mysql libraries installed, as well as well as `pkg-config` system package "
|
45
|
+
"installed in case you see compilation error during installation."
|
46
|
+
)
|
39
47
|
|
40
48
|
MySQLConnectionTypes = Union["MySQLdbConnection", "MySQLConnectionAbstract"]
|
41
49
|
|
@@ -125,7 +133,15 @@ class MySqlHook(DbApiHook):
|
|
125
133
|
if conn_config["charset"].lower() in ("utf8", "utf-8"):
|
126
134
|
conn_config["use_unicode"] = True
|
127
135
|
if conn.extra_dejson.get("cursor", False):
|
128
|
-
|
136
|
+
try:
|
137
|
+
import MySQLdb.cursors
|
138
|
+
except ImportError:
|
139
|
+
raise RuntimeError(
|
140
|
+
"You do not have `mysqlclient` package installed. "
|
141
|
+
"Please install it with `pip install mysqlclient` and make sure you have system "
|
142
|
+
"mysql libraries installed, as well as well as `pkg-config` system package "
|
143
|
+
"installed in case you see compilation error during installation."
|
144
|
+
)
|
129
145
|
|
130
146
|
cursor_type = conn.extra_dejson.get("cursor", "").lower()
|
131
147
|
# Dictionary mapping cursor types to their respective classes
|
@@ -194,7 +210,15 @@ class MySqlHook(DbApiHook):
|
|
194
210
|
client_name = conn.extra_dejson.get("client", "mysqlclient")
|
195
211
|
|
196
212
|
if client_name == "mysqlclient":
|
197
|
-
|
213
|
+
try:
|
214
|
+
import MySQLdb
|
215
|
+
except ImportError:
|
216
|
+
raise RuntimeError(
|
217
|
+
"You do not have `mysqlclient` package installed. "
|
218
|
+
"Please install it with `pip install mysqlclient` and make sure you have system "
|
219
|
+
"mysql libraries installed, as well as well as `pkg-config` system package "
|
220
|
+
"installed in case you see compilation error during installation."
|
221
|
+
)
|
198
222
|
|
199
223
|
conn_config = self._get_conn_config_mysql_client(conn)
|
200
224
|
return MySQLdb.connect(**conn_config)
|
@@ -17,7 +17,7 @@
|
|
17
17
|
# under the License.
|
18
18
|
from __future__ import annotations
|
19
19
|
|
20
|
-
from typing import Sequence
|
20
|
+
from typing import ClassVar, Sequence
|
21
21
|
|
22
22
|
from deprecated import deprecated
|
23
23
|
|
@@ -58,7 +58,7 @@ class MySqlOperator(SQLExecuteQueryOperator):
|
|
58
58
|
"""
|
59
59
|
|
60
60
|
template_fields: Sequence[str] = ("sql", "parameters")
|
61
|
-
template_fields_renderers = {
|
61
|
+
template_fields_renderers: ClassVar[dict] = {
|
62
62
|
"sql": "mysql",
|
63
63
|
"parameters": "json",
|
64
64
|
}
|
@@ -22,7 +22,15 @@ from contextlib import closing
|
|
22
22
|
from tempfile import NamedTemporaryFile
|
23
23
|
from typing import TYPE_CHECKING, Sequence
|
24
24
|
|
25
|
-
|
25
|
+
try:
|
26
|
+
import MySQLdb
|
27
|
+
except ImportError:
|
28
|
+
raise RuntimeError(
|
29
|
+
"You do not have `mysqlclient` package installed. "
|
30
|
+
"Please install it with `pip install mysqlclient` and make sure you have system "
|
31
|
+
"mysql libraries installed, as well as well as `pkg-config` system package "
|
32
|
+
"installed in case you see compilation error during installation."
|
33
|
+
)
|
26
34
|
|
27
35
|
from airflow.models import BaseOperator
|
28
36
|
from airflow.providers.mysql.hooks.mysql import MySqlHook
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: apache-airflow-providers-mysql
|
3
|
-
Version: 5.7.
|
3
|
+
Version: 5.7.4rc1
|
4
4
|
Summary: Provider package apache-airflow-providers-mysql for Apache Airflow
|
5
5
|
Keywords: airflow-provider,mysql,airflow,integration
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
@@ -20,25 +20,25 @@ 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-providers-common-sql>=1.
|
23
|
+
Requires-Dist: apache-airflow-providers-common-sql>=1.20.0rc0
|
24
24
|
Requires-Dist: apache-airflow>=2.8.0rc0
|
25
25
|
Requires-Dist: mysql-connector-python>=8.0.29
|
26
|
-
Requires-Dist: mysqlclient>=1.4.0
|
26
|
+
Requires-Dist: mysqlclient>=1.4.0; sys_platform != 'darwin'
|
27
27
|
Requires-Dist: apache-airflow-providers-amazon ; extra == "amazon"
|
28
|
-
Requires-Dist: apache-airflow-providers-common-sql ; extra == "common
|
28
|
+
Requires-Dist: apache-airflow-providers-common-sql ; extra == "common-sql"
|
29
29
|
Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
|
30
30
|
Requires-Dist: apache-airflow-providers-presto ; extra == "presto"
|
31
31
|
Requires-Dist: apache-airflow-providers-trino ; extra == "trino"
|
32
32
|
Requires-Dist: apache-airflow-providers-vertica ; extra == "vertica"
|
33
33
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
34
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-mysql/5.7.
|
35
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-mysql/5.7.
|
34
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-mysql/5.7.4/changelog.html
|
35
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-mysql/5.7.4
|
36
36
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
37
37
|
Project-URL: Source Code, https://github.com/apache/airflow
|
38
38
|
Project-URL: Twitter, https://twitter.com/ApacheAirflow
|
39
39
|
Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
40
40
|
Provides-Extra: amazon
|
41
|
-
Provides-Extra: common
|
41
|
+
Provides-Extra: common-sql
|
42
42
|
Provides-Extra: mysql-connector-python
|
43
43
|
Provides-Extra: openlineage
|
44
44
|
Provides-Extra: presto
|
@@ -89,7 +89,7 @@ Provides-Extra: vertica
|
|
89
89
|
|
90
90
|
Package ``apache-airflow-providers-mysql``
|
91
91
|
|
92
|
-
Release: ``5.7.
|
92
|
+
Release: ``5.7.4.rc1``
|
93
93
|
|
94
94
|
|
95
95
|
`MySQL <https://www.mysql.com/>`__
|
@@ -102,7 +102,7 @@ This is a provider package for ``mysql`` provider. All classes for this provider
|
|
102
102
|
are in ``airflow.providers.mysql`` python package.
|
103
103
|
|
104
104
|
You can find package information and changelog for the provider
|
105
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/5.7.
|
105
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/5.7.4/>`_.
|
106
106
|
|
107
107
|
Installation
|
108
108
|
------------
|
@@ -116,14 +116,14 @@ The package supports the following python versions: 3.9,3.10,3.11,3.12
|
|
116
116
|
Requirements
|
117
117
|
------------
|
118
118
|
|
119
|
-
=======================================
|
119
|
+
======================================= =====================================
|
120
120
|
PIP package Version required
|
121
|
-
=======================================
|
121
|
+
======================================= =====================================
|
122
122
|
``apache-airflow`` ``>=2.8.0``
|
123
|
-
``apache-airflow-providers-common-sql`` ``>=1.
|
124
|
-
``mysqlclient`` ``>=1.4.0``
|
123
|
+
``apache-airflow-providers-common-sql`` ``>=1.20.0``
|
124
|
+
``mysqlclient`` ``>=1.4.0; sys_platform != "darwin"``
|
125
125
|
``mysql-connector-python`` ``>=8.0.29``
|
126
|
-
=======================================
|
126
|
+
======================================= =====================================
|
127
127
|
|
128
128
|
Cross provider package dependencies
|
129
129
|
-----------------------------------
|
@@ -150,4 +150,4 @@ Dependent package
|
|
150
150
|
============================================================================================================== ===============
|
151
151
|
|
152
152
|
The changelog for the provider package can be found in the
|
153
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/5.7.
|
153
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/5.7.4/changelog.html>`_.
|
@@ -1,18 +1,18 @@
|
|
1
1
|
airflow/providers/mysql/LICENSE,sha256=FFb4jd2AXnOOf7XLP04pQW6jbdhG49TxlGY6fFpCV1Y,13609
|
2
|
-
airflow/providers/mysql/__init__.py,sha256=
|
3
|
-
airflow/providers/mysql/get_provider_info.py,sha256=
|
2
|
+
airflow/providers/mysql/__init__.py,sha256=9liNxyPE42Ws-z8tZPUZRpPpw72PsIga8GD4RPGFSgI,1492
|
3
|
+
airflow/providers/mysql/get_provider_info.py,sha256=QQr9ISI2nk_WBgP3pddQIhS3-jWrEtCgPUP3EljEuq0,4538
|
4
4
|
airflow/providers/mysql/assets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
5
5
|
airflow/providers/mysql/assets/mysql.py,sha256=ORHZmCa1AZAWwpF7GKH-8faqOKSohJvKtqRgfDnQRRc,1385
|
6
6
|
airflow/providers/mysql/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
7
|
-
airflow/providers/mysql/hooks/mysql.py,sha256=
|
7
|
+
airflow/providers/mysql/hooks/mysql.py,sha256=8KXPSWAbkO33Vlex_KjXHiFZimBHCp4gbOP8AvxJpNw,14623
|
8
8
|
airflow/providers/mysql/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
9
|
-
airflow/providers/mysql/operators/mysql.py,sha256=
|
9
|
+
airflow/providers/mysql/operators/mysql.py,sha256=4shjfLcSUn4d8eHfiQxBqN-XQHvQSr2audqgklfexmM,2952
|
10
10
|
airflow/providers/mysql/transfers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
11
11
|
airflow/providers/mysql/transfers/presto_to_mysql.py,sha256=gGtZIGXLpY2jP8o3xwZ5u8khqcQK3cVSa9P-aev7Qiw,3269
|
12
12
|
airflow/providers/mysql/transfers/s3_to_mysql.py,sha256=E5I7QHWqzrG3Fi9AGklwZWRCVxVDOD1tOB2xHEOZUJw,3876
|
13
13
|
airflow/providers/mysql/transfers/trino_to_mysql.py,sha256=wiiuilxSHchJD0W2K838UHH5iUs-R5HNc0zyRDOZDRs,3251
|
14
|
-
airflow/providers/mysql/transfers/vertica_to_mysql.py,sha256=
|
15
|
-
apache_airflow_providers_mysql-5.7.
|
16
|
-
apache_airflow_providers_mysql-5.7.
|
17
|
-
apache_airflow_providers_mysql-5.7.
|
18
|
-
apache_airflow_providers_mysql-5.7.
|
14
|
+
airflow/providers/mysql/transfers/vertica_to_mysql.py,sha256=q2vjlvK4UfpBqFpixIs-xeEC5kxoc6j9EO8KqG-oRLo,6677
|
15
|
+
apache_airflow_providers_mysql-5.7.4rc1.dist-info/entry_points.txt,sha256=kIbWluJZ1LX9jo9pLkqbnu6DUgYpoGKXzmSvjT5czKM,101
|
16
|
+
apache_airflow_providers_mysql-5.7.4rc1.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
17
|
+
apache_airflow_providers_mysql-5.7.4rc1.dist-info/METADATA,sha256=RzK8aL3JkR4Gesb_BLXEEpQDjlBDyQjxYBLZ5BkYDXw,7396
|
18
|
+
apache_airflow_providers_mysql-5.7.4rc1.dist-info/RECORD,,
|