apache-airflow-providers-mysql 6.2.0rc1__py3-none-any.whl → 6.2.1__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 +0 -65
- airflow/providers/mysql/hooks/mysql.py +39 -0
- {apache_airflow_providers_mysql-6.2.0rc1.dist-info → apache_airflow_providers_mysql-6.2.1.dist-info}/METADATA +10 -10
- {apache_airflow_providers_mysql-6.2.0rc1.dist-info → apache_airflow_providers_mysql-6.2.1.dist-info}/RECORD +7 -7
- {apache_airflow_providers_mysql-6.2.0rc1.dist-info → apache_airflow_providers_mysql-6.2.1.dist-info}/WHEEL +1 -1
- {apache_airflow_providers_mysql-6.2.0rc1.dist-info → apache_airflow_providers_mysql-6.2.1.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.2.
|
32
|
+
__version__ = "6.2.1"
|
33
33
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
35
35
|
"2.9.0"
|
@@ -26,55 +26,6 @@ def get_provider_info():
|
|
26
26
|
"package-name": "apache-airflow-providers-mysql",
|
27
27
|
"name": "MySQL",
|
28
28
|
"description": "`MySQL <https://www.mysql.com/>`__\n",
|
29
|
-
"state": "ready",
|
30
|
-
"source-date-epoch": 1741509216,
|
31
|
-
"versions": [
|
32
|
-
"6.2.0",
|
33
|
-
"6.1.0",
|
34
|
-
"6.0.0",
|
35
|
-
"5.7.4",
|
36
|
-
"5.7.3",
|
37
|
-
"5.7.2",
|
38
|
-
"5.7.1",
|
39
|
-
"5.7.0",
|
40
|
-
"5.6.3",
|
41
|
-
"5.6.2",
|
42
|
-
"5.6.1",
|
43
|
-
"5.6.0",
|
44
|
-
"5.5.4",
|
45
|
-
"5.5.3",
|
46
|
-
"5.5.2",
|
47
|
-
"5.5.1",
|
48
|
-
"5.5.0",
|
49
|
-
"5.4.0",
|
50
|
-
"5.3.1",
|
51
|
-
"5.3.0",
|
52
|
-
"5.2.1",
|
53
|
-
"5.2.0",
|
54
|
-
"5.1.1",
|
55
|
-
"5.1.0",
|
56
|
-
"5.0.0",
|
57
|
-
"4.0.2",
|
58
|
-
"4.0.1",
|
59
|
-
"4.0.0",
|
60
|
-
"3.4.0",
|
61
|
-
"3.3.0",
|
62
|
-
"3.2.1",
|
63
|
-
"3.2.0",
|
64
|
-
"3.1.0",
|
65
|
-
"3.0.0",
|
66
|
-
"2.2.3",
|
67
|
-
"2.2.2",
|
68
|
-
"2.2.1",
|
69
|
-
"2.2.0",
|
70
|
-
"2.1.1",
|
71
|
-
"2.1.0",
|
72
|
-
"2.0.0",
|
73
|
-
"1.1.0",
|
74
|
-
"1.0.2",
|
75
|
-
"1.0.1",
|
76
|
-
"1.0.0",
|
77
|
-
],
|
78
29
|
"integrations": [
|
79
30
|
{
|
80
31
|
"integration-name": "MySQL",
|
@@ -116,20 +67,4 @@ def get_provider_info():
|
|
116
67
|
"dataset-uris": [
|
117
68
|
{"schemes": ["mysql", "mariadb"], "handler": "airflow.providers.mysql.assets.mysql.sanitize_uri"}
|
118
69
|
],
|
119
|
-
"dependencies": [
|
120
|
-
"apache-airflow>=2.9.0",
|
121
|
-
"apache-airflow-providers-common-sql>=1.20.0",
|
122
|
-
"mysqlclient>=1.4.0; sys_platform != 'darwin'",
|
123
|
-
"mysql-connector-python>=8.0.29",
|
124
|
-
"aiomysql>=0.2.0",
|
125
|
-
],
|
126
|
-
"optional-dependencies": {
|
127
|
-
"mysql-connector-python": [],
|
128
|
-
"amazon": ["apache-airflow-providers-amazon"],
|
129
|
-
"openlineage": ["apache-airflow-providers-openlineage"],
|
130
|
-
"presto": ["apache-airflow-providers-presto"],
|
131
|
-
"trino": ["apache-airflow-providers-trino"],
|
132
|
-
"vertica": ["apache-airflow-providers-vertica"],
|
133
|
-
},
|
134
|
-
"devel-dependencies": [],
|
135
70
|
}
|
@@ -22,6 +22,7 @@ from __future__ import annotations
|
|
22
22
|
import json
|
23
23
|
import logging
|
24
24
|
from typing import TYPE_CHECKING, Any, Union
|
25
|
+
from urllib.parse import quote_plus, urlencode
|
25
26
|
|
26
27
|
from airflow.exceptions import AirflowOptionalProviderFeatureException
|
27
28
|
from airflow.providers.common.sql.hooks.sql import DbApiHook
|
@@ -363,3 +364,41 @@ class MySqlHook(DbApiHook):
|
|
363
364
|
def get_openlineage_default_schema(self):
|
364
365
|
"""MySQL has no concept of schema."""
|
365
366
|
return None
|
367
|
+
|
368
|
+
def get_uri(self) -> str:
|
369
|
+
"""Get URI for MySQL connection."""
|
370
|
+
conn = self.connection or self.get_connection(self.get_conn_id())
|
371
|
+
conn_schema = self.schema or conn.schema or ""
|
372
|
+
client_name = conn.extra_dejson.get("client", "mysqlclient")
|
373
|
+
|
374
|
+
# Determine URI prefix based on client
|
375
|
+
if client_name == "mysql-connector-python":
|
376
|
+
uri_prefix = "mysql+mysqlconnector://"
|
377
|
+
else: # default: mysqlclient
|
378
|
+
uri_prefix = "mysql://"
|
379
|
+
|
380
|
+
auth_part = ""
|
381
|
+
if conn.login:
|
382
|
+
auth_part = quote_plus(conn.login)
|
383
|
+
if conn.password:
|
384
|
+
auth_part = f"{auth_part}:{quote_plus(conn.password)}"
|
385
|
+
auth_part = f"{auth_part}@"
|
386
|
+
|
387
|
+
host_part = conn.host or "localhost"
|
388
|
+
if conn.port:
|
389
|
+
host_part = f"{host_part}:{conn.port}"
|
390
|
+
|
391
|
+
schema_part = f"/{quote_plus(conn_schema)}" if conn_schema else ""
|
392
|
+
|
393
|
+
uri = f"{uri_prefix}{auth_part}{host_part}{schema_part}"
|
394
|
+
|
395
|
+
# Add extra connection parameters
|
396
|
+
extra = conn.extra_dejson.copy()
|
397
|
+
if "client" in extra:
|
398
|
+
extra.pop("client")
|
399
|
+
|
400
|
+
query_params = {k: str(v) for k, v in extra.items() if v}
|
401
|
+
if query_params:
|
402
|
+
uri = f"{uri}?{urlencode(query_params)}"
|
403
|
+
|
404
|
+
return uri
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: apache-airflow-providers-mysql
|
3
|
-
Version: 6.2.
|
3
|
+
Version: 6.2.1
|
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,8 +20,8 @@ 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.
|
24
|
-
Requires-Dist: apache-airflow-providers-common-sql>=1.20.
|
23
|
+
Requires-Dist: apache-airflow>=2.9.0
|
24
|
+
Requires-Dist: apache-airflow-providers-common-sql>=1.20.0
|
25
25
|
Requires-Dist: mysqlclient>=1.4.0; sys_platform != 'darwin'
|
26
26
|
Requires-Dist: mysql-connector-python>=8.0.29
|
27
27
|
Requires-Dist: aiomysql>=0.2.0
|
@@ -31,11 +31,11 @@ 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.2.
|
35
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.2.
|
34
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.2.1/changelog.html
|
35
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.2.1
|
36
|
+
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
36
37
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
37
38
|
Project-URL: Source Code, https://github.com/apache/airflow
|
38
|
-
Project-URL: Twitter, https://x.com/ApacheAirflow
|
39
39
|
Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
40
40
|
Provides-Extra: amazon
|
41
41
|
Provides-Extra: mysql-connector-python
|
@@ -69,7 +69,7 @@ Provides-Extra: vertica
|
|
69
69
|
|
70
70
|
Package ``apache-airflow-providers-mysql``
|
71
71
|
|
72
|
-
Release: ``6.2.
|
72
|
+
Release: ``6.2.1``
|
73
73
|
|
74
74
|
|
75
75
|
`MySQL <https://www.mysql.com/>`__
|
@@ -82,7 +82,7 @@ This is a provider package for ``mysql`` provider. All classes for this provider
|
|
82
82
|
are in ``airflow.providers.mysql`` python package.
|
83
83
|
|
84
84
|
You can find package information and changelog for the provider
|
85
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.2.
|
85
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.2.1/>`_.
|
86
86
|
|
87
87
|
Installation
|
88
88
|
------------
|
@@ -110,7 +110,7 @@ Cross provider package dependencies
|
|
110
110
|
-----------------------------------
|
111
111
|
|
112
112
|
Those are dependencies that might be needed in order to use all the features of the package.
|
113
|
-
You need to install the specified
|
113
|
+
You need to install the specified providers in order to use them.
|
114
114
|
|
115
115
|
You can install such cross-provider dependencies when installing from PyPI. For example:
|
116
116
|
|
@@ -131,5 +131,5 @@ Dependent package
|
|
131
131
|
============================================================================================================== ===============
|
132
132
|
|
133
133
|
The changelog for the provider package can be found in the
|
134
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.2.
|
134
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-mysql/6.2.1/changelog.html>`_.
|
135
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=BfeMZ_6D1ws0mzkoBr4UnZ7dk7doM47wl822HM7ruXU,1492
|
3
|
+
airflow/providers/mysql/get_provider_info.py,sha256=LNQZ8O48srWzGjS8mzLeAsa-VFGFY6ypkHK1jjr6umc,3064
|
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=Nl2_fy6AvSgCcGwmlqtlaDCR59cRy9Uxz2rK9rivbSY,16297
|
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.2.
|
14
|
-
apache_airflow_providers_mysql-6.2.
|
15
|
-
apache_airflow_providers_mysql-6.2.
|
16
|
-
apache_airflow_providers_mysql-6.2.
|
13
|
+
apache_airflow_providers_mysql-6.2.1.dist-info/entry_points.txt,sha256=kIbWluJZ1LX9jo9pLkqbnu6DUgYpoGKXzmSvjT5czKM,101
|
14
|
+
apache_airflow_providers_mysql-6.2.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
15
|
+
apache_airflow_providers_mysql-6.2.1.dist-info/METADATA,sha256=uW-fzufNKq-VZ6ErdcRxRswPiF8xK6vNGkCAQXOV9cM,6516
|
16
|
+
apache_airflow_providers_mysql-6.2.1.dist-info/RECORD,,
|