apache-airflow-providers-common-sql 1.30.2__py3-none-any.whl → 1.30.3rc1__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/common/sql/__init__.py +1 -1
- airflow/providers/common/sql/hooks/sql.py +41 -14
- {apache_airflow_providers_common_sql-1.30.2.dist-info → apache_airflow_providers_common_sql-1.30.3rc1.dist-info}/METADATA +11 -8
- {apache_airflow_providers_common_sql-1.30.2.dist-info → apache_airflow_providers_common_sql-1.30.3rc1.dist-info}/RECORD +8 -8
- {apache_airflow_providers_common_sql-1.30.2.dist-info → apache_airflow_providers_common_sql-1.30.3rc1.dist-info}/licenses/NOTICE +1 -1
- {apache_airflow_providers_common_sql-1.30.2.dist-info → apache_airflow_providers_common_sql-1.30.3rc1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_common_sql-1.30.2.dist-info → apache_airflow_providers_common_sql-1.30.3rc1.dist-info}/entry_points.txt +0 -0
- {apache_airflow_providers_common_sql-1.30.2.dist-info → apache_airflow_providers_common_sql-1.30.3rc1.dist-info}/licenses/LICENSE +0 -0
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "1.30.
|
|
32
|
+
__version__ = "1.30.3"
|
|
33
33
|
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
35
35
|
"2.11.0"
|
|
@@ -29,14 +29,27 @@ import sqlparse
|
|
|
29
29
|
from deprecated import deprecated
|
|
30
30
|
from methodtools import lru_cache
|
|
31
31
|
from more_itertools import chunked
|
|
32
|
-
from sqlalchemy import create_engine, inspect
|
|
33
|
-
from sqlalchemy.engine import make_url
|
|
34
|
-
from sqlalchemy.exc import ArgumentError, NoSuchModuleError
|
|
35
32
|
|
|
36
|
-
|
|
37
|
-
from
|
|
33
|
+
try:
|
|
34
|
+
from sqlalchemy import create_engine, inspect
|
|
35
|
+
from sqlalchemy.engine import make_url
|
|
36
|
+
from sqlalchemy.exc import ArgumentError, NoSuchModuleError
|
|
37
|
+
except ImportError:
|
|
38
|
+
create_engine = None # type: ignore[assignment]
|
|
39
|
+
inspect = None # type: ignore[assignment]
|
|
40
|
+
make_url = None # type: ignore[assignment]
|
|
41
|
+
ArgumentError = Exception # type: ignore[misc,assignment]
|
|
42
|
+
NoSuchModuleError = Exception # type: ignore[misc,assignment]
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
from airflow.exceptions import AirflowProviderDeprecationWarning
|
|
38
46
|
from airflow.providers.common.compat.module_loading import import_string
|
|
39
|
-
from airflow.providers.common.compat.sdk import
|
|
47
|
+
from airflow.providers.common.compat.sdk import (
|
|
48
|
+
AirflowException,
|
|
49
|
+
AirflowOptionalProviderFeatureException,
|
|
50
|
+
BaseHook,
|
|
51
|
+
conf,
|
|
52
|
+
)
|
|
40
53
|
from airflow.providers.common.sql.dialects.dialect import Dialect
|
|
41
54
|
from airflow.providers.common.sql.hooks import handlers
|
|
42
55
|
|
|
@@ -304,6 +317,12 @@ class DbApiHook(BaseHook):
|
|
|
304
317
|
:param engine_kwargs: Kwargs used in :func:`~sqlalchemy.create_engine`.
|
|
305
318
|
:return: the created engine.
|
|
306
319
|
"""
|
|
320
|
+
if create_engine is None:
|
|
321
|
+
raise AirflowOptionalProviderFeatureException(
|
|
322
|
+
"SQLAlchemy is required to generate the connection URI. "
|
|
323
|
+
"Install it with: pip install 'apache-airflow-providers-common-sql[sqlalchemy]'"
|
|
324
|
+
)
|
|
325
|
+
|
|
307
326
|
if engine_kwargs is None:
|
|
308
327
|
engine_kwargs = {}
|
|
309
328
|
|
|
@@ -318,18 +337,26 @@ class DbApiHook(BaseHook):
|
|
|
318
337
|
|
|
319
338
|
@property
|
|
320
339
|
def inspector(self) -> Inspector:
|
|
340
|
+
if inspect is None:
|
|
341
|
+
raise AirflowOptionalProviderFeatureException(
|
|
342
|
+
"SQLAlchemy is required for database inspection. "
|
|
343
|
+
"Install it with: pip install 'apache-airflow-providers-common-sql[sqlalchemy]'"
|
|
344
|
+
)
|
|
321
345
|
return inspect(self.get_sqlalchemy_engine())
|
|
322
346
|
|
|
323
347
|
@cached_property
|
|
324
348
|
def dialect_name(self) -> str:
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
349
|
+
if make_url is not None:
|
|
350
|
+
try:
|
|
351
|
+
return make_url(self.get_uri()).get_dialect().name
|
|
352
|
+
except (ArgumentError, NoSuchModuleError, ValueError):
|
|
353
|
+
pass
|
|
354
|
+
|
|
355
|
+
config = self.connection_extra
|
|
356
|
+
sqlalchemy_scheme = config.get("sqlalchemy_scheme")
|
|
357
|
+
if sqlalchemy_scheme:
|
|
358
|
+
return sqlalchemy_scheme.split("+")[0] if "+" in sqlalchemy_scheme else sqlalchemy_scheme
|
|
359
|
+
return config.get("dialect", "default")
|
|
333
360
|
|
|
334
361
|
@cached_property
|
|
335
362
|
def dialect(self) -> Dialect:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apache-airflow-providers-common-sql
|
|
3
|
-
Version: 1.30.
|
|
3
|
+
Version: 1.30.3rc1
|
|
4
4
|
Summary: Provider package apache-airflow-providers-common-sql for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,common.sql,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
@@ -22,8 +22,8 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
22
22
|
Classifier: Topic :: System :: Monitoring
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
License-File: NOTICE
|
|
25
|
-
Requires-Dist: apache-airflow>=2.11.
|
|
26
|
-
Requires-Dist: apache-airflow-providers-common-compat>=1.
|
|
25
|
+
Requires-Dist: apache-airflow>=2.11.0rc1
|
|
26
|
+
Requires-Dist: apache-airflow-providers-common-compat>=1.12.0rc1
|
|
27
27
|
Requires-Dist: sqlparse>=0.5.1
|
|
28
28
|
Requires-Dist: more-itertools>=9.0.0
|
|
29
29
|
Requires-Dist: methodtools>=0.4.7
|
|
@@ -31,9 +31,10 @@ Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
|
|
|
31
31
|
Requires-Dist: pandas[sql-other]>=2.1.2 ; extra == "pandas" and ( python_version <"3.13")
|
|
32
32
|
Requires-Dist: pandas>=2.2.3 ; extra == "pandas" and ( python_version >="3.13")
|
|
33
33
|
Requires-Dist: polars>=1.26.0 ; extra == "polars"
|
|
34
|
+
Requires-Dist: sqlalchemy>=1.4.49 ; extra == "sqlalchemy"
|
|
34
35
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
35
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.30.
|
|
36
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.30.
|
|
36
|
+
Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-common-sql/1.30.3/changelog.html
|
|
37
|
+
Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-common-sql/1.30.3
|
|
37
38
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
|
38
39
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
39
40
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
@@ -41,6 +42,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
|
41
42
|
Provides-Extra: openlineage
|
|
42
43
|
Provides-Extra: pandas
|
|
43
44
|
Provides-Extra: polars
|
|
45
|
+
Provides-Extra: sqlalchemy
|
|
44
46
|
|
|
45
47
|
|
|
46
48
|
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
@@ -67,7 +69,7 @@ Provides-Extra: polars
|
|
|
67
69
|
|
|
68
70
|
Package ``apache-airflow-providers-common-sql``
|
|
69
71
|
|
|
70
|
-
Release: ``1.30.
|
|
72
|
+
Release: ``1.30.3``
|
|
71
73
|
|
|
72
74
|
|
|
73
75
|
`Common SQL Provider <https://en.wikipedia.org/wiki/SQL>`__
|
|
@@ -80,7 +82,7 @@ This is a provider package for ``common.sql`` provider. All classes for this pro
|
|
|
80
82
|
are in ``airflow.providers.common.sql`` python package.
|
|
81
83
|
|
|
82
84
|
You can find package information and changelog for the provider
|
|
83
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.30.
|
|
85
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.30.3/>`_.
|
|
84
86
|
|
|
85
87
|
Installation
|
|
86
88
|
------------
|
|
@@ -133,8 +135,9 @@ Extra Dependencies
|
|
|
133
135
|
``pandas`` ``pandas[sql-other]>=2.1.2; python_version <"3.13"``, ``pandas>=2.2.3; python_version >="3.13"``
|
|
134
136
|
``openlineage`` ``apache-airflow-providers-openlineage``
|
|
135
137
|
``polars`` ``polars>=1.26.0``
|
|
138
|
+
``sqlalchemy`` ``sqlalchemy>=1.4.49``
|
|
136
139
|
=============== ================================================================================================
|
|
137
140
|
|
|
138
141
|
The changelog for the provider package can be found in the
|
|
139
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.30.
|
|
142
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.30.3/changelog.html>`_.
|
|
140
143
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
airflow/providers/common/sql/README_API.md,sha256=Yug9-DLqoKkG-qT5XMwkyG_T-r17Iqhiipxt5tMZIUw,5906
|
|
2
|
-
airflow/providers/common/sql/__init__.py,sha256=
|
|
2
|
+
airflow/providers/common/sql/__init__.py,sha256=LzeHC-lf_wRSC7ztPWByVd0z2L9dZ1CQ247OFtqFhAU,1500
|
|
3
3
|
airflow/providers/common/sql/get_provider_info.py,sha256=xCPXLKFA_1ilhGa0aB3E9ggdHtn9Do7Eb469begpZag,2767
|
|
4
4
|
airflow/providers/common/sql/get_provider_info.pyi,sha256=NSIGS74SESn-j0g3xd3BlctUrKlkWaXL605hCs0hjac,1580
|
|
5
5
|
airflow/providers/common/sql/version_compat.py,sha256=A6a37mMJVpSRlvL7wAMj4VGbFao3-lnRXMgnU3F3nLE,1676
|
|
@@ -12,7 +12,7 @@ airflow/providers/common/sql/doc/adr/0003-introduce-notion-of-dialects-in-dbapih
|
|
|
12
12
|
airflow/providers/common/sql/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
13
13
|
airflow/providers/common/sql/hooks/handlers.py,sha256=XjvycIQsGpDrtg6RFACczybW_dER97RR6Z6B_S6jf6Y,3399
|
|
14
14
|
airflow/providers/common/sql/hooks/handlers.pyi,sha256=Qex63GfW0J6RQeT-prAfukvw4NE6P1IQnM1e04D2sH4,1811
|
|
15
|
-
airflow/providers/common/sql/hooks/sql.py,sha256=
|
|
15
|
+
airflow/providers/common/sql/hooks/sql.py,sha256=qSBG9SURspOMX-jQ_PTWFFaNzvatIChjtx6b3GqR3ys,44829
|
|
16
16
|
airflow/providers/common/sql/hooks/sql.pyi,sha256=K7WXuEYXtzrdyBD4zDk7khEO8Wken5fTD1YGqeAOkFk,7916
|
|
17
17
|
airflow/providers/common/sql/operators/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
18
18
|
airflow/providers/common/sql/operators/generic_transfer.py,sha256=4FRcbvCoL0T_a2pU-Sw4Z29zh-OXpp8iknXybe-iAl0,8494
|
|
@@ -24,9 +24,9 @@ airflow/providers/common/sql/sensors/sql.pyi,sha256=2NC2oxVxhHgUN2elwd06CSdMhgX1
|
|
|
24
24
|
airflow/providers/common/sql/triggers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
25
25
|
airflow/providers/common/sql/triggers/sql.py,sha256=8dHrYYOziwyRdNuQfFj7lX2lImYRC2waU6YevhFAgls,3652
|
|
26
26
|
airflow/providers/common/sql/triggers/sql.pyi,sha256=TjSM2B3qCv3oN8Y5l_czi9YfxRE2h5Hv_lvUokeiGsE,1968
|
|
27
|
-
apache_airflow_providers_common_sql-1.30.
|
|
28
|
-
apache_airflow_providers_common_sql-1.30.
|
|
29
|
-
apache_airflow_providers_common_sql-1.30.
|
|
30
|
-
apache_airflow_providers_common_sql-1.30.
|
|
31
|
-
apache_airflow_providers_common_sql-1.30.
|
|
32
|
-
apache_airflow_providers_common_sql-1.30.
|
|
27
|
+
apache_airflow_providers_common_sql-1.30.3rc1.dist-info/entry_points.txt,sha256=h8UXRp2crPuGmYVYRM5oe168qIh7g-4t2QQbVMizKjI,106
|
|
28
|
+
apache_airflow_providers_common_sql-1.30.3rc1.dist-info/licenses/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
|
|
29
|
+
apache_airflow_providers_common_sql-1.30.3rc1.dist-info/licenses/NOTICE,sha256=_cWHznIoUSbLCY_KfmKqetlKlsoH0c2VBjmZjElAzuc,168
|
|
30
|
+
apache_airflow_providers_common_sql-1.30.3rc1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
31
|
+
apache_airflow_providers_common_sql-1.30.3rc1.dist-info/METADATA,sha256=4ct9yjPHjtvpOGDzNzgpVfWQQzXbZepYEZ2HFYbYqQo,6722
|
|
32
|
+
apache_airflow_providers_common_sql-1.30.3rc1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|