apache-airflow-providers-mysql 6.1.0__py3-none-any.whl → 6.2.0__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 +3 -1
- airflow/providers/mysql/hooks/mysql.py +15 -3
- {apache_airflow_providers_mysql-6.1.0.dist-info → apache_airflow_providers_mysql-6.2.0.dist-info}/METADATA +24 -25
- {apache_airflow_providers_mysql-6.1.0.dist-info → apache_airflow_providers_mysql-6.2.0.dist-info}/RECORD +7 -7
- {apache_airflow_providers_mysql-6.1.0.dist-info → apache_airflow_providers_mysql-6.2.0.dist-info}/WHEEL +1 -1
- {apache_airflow_providers_mysql-6.1.0.dist-info → apache_airflow_providers_mysql-6.2.0.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__ = "6.
|
32
|
+
__version__ = "6.2.0"
|
33
33
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
35
35
|
"2.9.0"
|
@@ -27,8 +27,9 @@ def get_provider_info():
|
|
27
27
|
"name": "MySQL",
|
28
28
|
"description": "`MySQL <https://www.mysql.com/>`__\n",
|
29
29
|
"state": "ready",
|
30
|
-
"source-date-epoch":
|
30
|
+
"source-date-epoch": 1741509216,
|
31
31
|
"versions": [
|
32
|
+
"6.2.0",
|
32
33
|
"6.1.0",
|
33
34
|
"6.0.0",
|
34
35
|
"5.7.4",
|
@@ -130,4 +131,5 @@ def get_provider_info():
|
|
130
131
|
"trino": ["apache-airflow-providers-trino"],
|
131
132
|
"vertica": ["apache-airflow-providers-vertica"],
|
132
133
|
},
|
134
|
+
"devel-dependencies": [],
|
133
135
|
}
|
@@ -240,10 +240,16 @@ class MySqlHook(DbApiHook):
|
|
240
240
|
|
241
241
|
def bulk_load(self, table: str, tmp_file: str) -> None:
|
242
242
|
"""Load a tab-delimited file into a database table."""
|
243
|
+
import re
|
244
|
+
|
243
245
|
conn = self.get_conn()
|
244
246
|
cur = conn.cursor()
|
247
|
+
|
248
|
+
if not re.fullmatch(r"^[a-zA-Z0-9_.]+$", table):
|
249
|
+
raise ValueError(f"Invalid table name: {table}")
|
250
|
+
|
245
251
|
cur.execute(
|
246
|
-
f"LOAD DATA LOCAL INFILE %s INTO TABLE {table}",
|
252
|
+
f"LOAD DATA LOCAL INFILE %s INTO TABLE `{table}`",
|
247
253
|
(tmp_file,),
|
248
254
|
)
|
249
255
|
conn.commit()
|
@@ -251,10 +257,16 @@ class MySqlHook(DbApiHook):
|
|
251
257
|
|
252
258
|
def bulk_dump(self, table: str, tmp_file: str) -> None:
|
253
259
|
"""Dump a database table into a tab-delimited file."""
|
260
|
+
import re
|
261
|
+
|
254
262
|
conn = self.get_conn()
|
255
263
|
cur = conn.cursor()
|
264
|
+
|
265
|
+
if not re.fullmatch(r"^[a-zA-Z0-9_.]+$", table):
|
266
|
+
raise ValueError(f"Invalid table name: {table}")
|
267
|
+
|
256
268
|
cur.execute(
|
257
|
-
f"SELECT * INTO OUTFILE %s FROM {table}",
|
269
|
+
f"SELECT * INTO OUTFILE %s FROM `{table}`",
|
258
270
|
(tmp_file,),
|
259
271
|
)
|
260
272
|
conn.commit()
|
@@ -319,7 +331,7 @@ class MySqlHook(DbApiHook):
|
|
319
331
|
cursor = conn.cursor()
|
320
332
|
|
321
333
|
cursor.execute(
|
322
|
-
f"LOAD DATA LOCAL INFILE %s %s INTO TABLE {table} %s",
|
334
|
+
f"LOAD DATA LOCAL INFILE %s %s INTO TABLE `{table}` %s",
|
323
335
|
(tmp_file, duplicate_key_handling, extra_options),
|
324
336
|
)
|
325
337
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: apache-airflow-providers-mysql
|
3
|
-
Version: 6.
|
3
|
+
Version: 6.2.0
|
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>
|
@@ -31,8 +31,8 @@ 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/6.
|
35
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.
|
34
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.2.0/changelog.html
|
35
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.2.0
|
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://x.com/ApacheAirflow
|
@@ -45,32 +45,31 @@ Provides-Extra: trino
|
|
45
45
|
Provides-Extra: vertica
|
46
46
|
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
48
|
+
.. Licensed to the Apache Software Foundation (ASF) under one
|
49
|
+
or more contributor license agreements. See the NOTICE file
|
50
|
+
distributed with this work for additional information
|
51
|
+
regarding copyright ownership. The ASF licenses this file
|
52
|
+
to you under the Apache License, Version 2.0 (the
|
53
|
+
"License"); you may not use this file except in compliance
|
54
|
+
with the License. You may obtain a copy of the License at
|
55
55
|
|
56
|
-
|
56
|
+
.. http://www.apache.org/licenses/LICENSE-2.0
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
58
|
+
.. Unless required by applicable law or agreed to in writing,
|
59
|
+
software distributed under the License is distributed on an
|
60
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
61
|
+
KIND, either express or implied. See the License for the
|
62
|
+
specific language governing permissions and limitations
|
63
|
+
under the License.
|
64
64
|
|
65
|
-
|
66
|
-
|
67
|
-
.. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
|
68
|
-
`PROVIDER_README_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
|
65
|
+
.. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
|
69
66
|
|
67
|
+
.. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
|
68
|
+
``PROVIDER_README_TEMPLATE.rst.jinja2`` IN the ``dev/breeze/src/airflow_breeze/templates`` DIRECTORY
|
70
69
|
|
71
70
|
Package ``apache-airflow-providers-mysql``
|
72
71
|
|
73
|
-
Release: ``6.
|
72
|
+
Release: ``6.2.0``
|
74
73
|
|
75
74
|
|
76
75
|
`MySQL <https://www.mysql.com/>`__
|
@@ -83,7 +82,7 @@ This is a provider package for ``mysql`` provider. All classes for this provider
|
|
83
82
|
are in ``airflow.providers.mysql`` python package.
|
84
83
|
|
85
84
|
You can find package information and changelog for the provider
|
86
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.
|
85
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.2.0/>`_.
|
87
86
|
|
88
87
|
Installation
|
89
88
|
------------
|
@@ -132,5 +131,5 @@ Dependent package
|
|
132
131
|
============================================================================================================== ===============
|
133
132
|
|
134
133
|
The changelog for the provider package can be found in the
|
135
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.
|
134
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.2.0/changelog.html>`_.
|
136
135
|
|
@@ -1,16 +1,16 @@
|
|
1
1
|
airflow/providers/mysql/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
|
2
|
-
airflow/providers/mysql/__init__.py,sha256=
|
3
|
-
airflow/providers/mysql/get_provider_info.py,sha256=
|
2
|
+
airflow/providers/mysql/__init__.py,sha256=vRM48KxhCgMHEojHFZFdCZREIvf7ICny1I9Mr8XoKGI,1492
|
3
|
+
airflow/providers/mysql/get_provider_info.py,sha256=sEeA_M_vi-347CeEqItA1xi92Lj2uOHPxIadbJqAp94,4806
|
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=ZPoIat8miqmZrINuI13zAdyHOwXvgna-lcAfK5UyXDI,14945
|
8
8
|
airflow/providers/mysql/transfers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
9
9
|
airflow/providers/mysql/transfers/presto_to_mysql.py,sha256=XqevcxJ8i_ABZlO_mFBtQFj9zjITp22DHlZ5uCSpaLw,3458
|
10
10
|
airflow/providers/mysql/transfers/s3_to_mysql.py,sha256=ZKsm8OmbOBl7q-w2RSwSP3UMmOpvKlAVl0RW0qtDzjM,4065
|
11
11
|
airflow/providers/mysql/transfers/trino_to_mysql.py,sha256=_ECbGmZbrjITzhWPZAGD7S5oa0IxujNu23hCKJ6mLyo,3440
|
12
12
|
airflow/providers/mysql/transfers/vertica_to_mysql.py,sha256=CNk0e99Fc4amhZO31WrBCXVgzAl15HgbpV6O2y6JMFI,6950
|
13
|
-
apache_airflow_providers_mysql-6.
|
14
|
-
apache_airflow_providers_mysql-6.
|
15
|
-
apache_airflow_providers_mysql-6.
|
16
|
-
apache_airflow_providers_mysql-6.
|
13
|
+
apache_airflow_providers_mysql-6.2.0.dist-info/entry_points.txt,sha256=kIbWluJZ1LX9jo9pLkqbnu6DUgYpoGKXzmSvjT5czKM,101
|
14
|
+
apache_airflow_providers_mysql-6.2.0.dist-info/WHEEL,sha256=_2ozNFCLWc93bK4WKHCO-eDUENDlo-dgc9cU3qokYO4,82
|
15
|
+
apache_airflow_providers_mysql-6.2.0.dist-info/METADATA,sha256=gvFXCZbHET-LloPW9YorrFKkHsmBKQmDvlQeNQFRBhg,6520
|
16
|
+
apache_airflow_providers_mysql-6.2.0.dist-info/RECORD,,
|
File without changes
|