apache-airflow-providers-common-sql 1.28.1__py3-none-any.whl → 1.28.2__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.
Potentially problematic release.
This version of apache-airflow-providers-common-sql might be problematic. Click here for more details.
- airflow/providers/common/sql/__init__.py +1 -1
- airflow/providers/common/sql/dialects/dialect.py +12 -15
- airflow/providers/common/sql/hooks/sql.py +1 -1
- {apache_airflow_providers_common_sql-1.28.1.dist-info → apache_airflow_providers_common_sql-1.28.2.dist-info}/METADATA +6 -6
- {apache_airflow_providers_common_sql-1.28.1.dist-info → apache_airflow_providers_common_sql-1.28.2.dist-info}/RECORD +7 -7
- {apache_airflow_providers_common_sql-1.28.1.dist-info → apache_airflow_providers_common_sql-1.28.2.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_common_sql-1.28.1.dist-info → apache_airflow_providers_common_sql-1.28.2.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__ = "1.28.
|
|
32
|
+
__version__ = "1.28.2"
|
|
33
33
|
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
35
35
|
"2.10.0"
|
|
@@ -26,6 +26,7 @@ from airflow.utils.log.logging_mixin import LoggingMixin
|
|
|
26
26
|
|
|
27
27
|
if TYPE_CHECKING:
|
|
28
28
|
from sqlalchemy.engine import Inspector
|
|
29
|
+
from sqlalchemy.engine.interfaces import ReflectedColumn
|
|
29
30
|
|
|
30
31
|
T = TypeVar("T")
|
|
31
32
|
|
|
@@ -85,16 +86,13 @@ class Dialect(LoggingMixin):
|
|
|
85
86
|
return self.escape_word_format.format(word)
|
|
86
87
|
return word
|
|
87
88
|
|
|
88
|
-
def unescape_word(self, word: str
|
|
89
|
+
def unescape_word(self, word: str) -> str:
|
|
89
90
|
"""
|
|
90
91
|
Remove escape characters from each part of a dotted identifier (e.g., schema.table).
|
|
91
92
|
|
|
92
93
|
:param word: Escaped schema, table, or column name, potentially with multiple segments.
|
|
93
94
|
:return: The word without escaped characters.
|
|
94
95
|
"""
|
|
95
|
-
if not word:
|
|
96
|
-
return word
|
|
97
|
-
|
|
98
96
|
escape_char_start = self.escape_word_format[0]
|
|
99
97
|
escape_char_end = self.escape_word_format[-1]
|
|
100
98
|
|
|
@@ -112,20 +110,19 @@ class Dialect(LoggingMixin):
|
|
|
112
110
|
|
|
113
111
|
@lru_cache(maxsize=None)
|
|
114
112
|
def get_column_names(
|
|
115
|
-
self,
|
|
113
|
+
self,
|
|
114
|
+
table: str,
|
|
115
|
+
schema: str | None = None,
|
|
116
|
+
predicate: Callable[[T | ReflectedColumn], bool] = lambda column: True,
|
|
116
117
|
) -> list[str] | None:
|
|
117
118
|
if schema is None:
|
|
118
119
|
table, schema = self.extract_schema_from_table(table)
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
schema=self.unescape_word(schema) if schema else None,
|
|
126
|
-
),
|
|
127
|
-
)
|
|
128
|
-
)
|
|
120
|
+
table_name = self.unescape_word(table)
|
|
121
|
+
schema = self.unescape_word(schema) if schema else None
|
|
122
|
+
column_names = []
|
|
123
|
+
for column in self.inspector.get_columns(table_name=table_name, schema=schema):
|
|
124
|
+
if predicate(column):
|
|
125
|
+
column_names.append(column["name"])
|
|
129
126
|
self.log.debug("Column names for table '%s': %s", table, column_names)
|
|
130
127
|
return column_names
|
|
131
128
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apache-airflow-providers-common-sql
|
|
3
|
-
Version: 1.28.
|
|
3
|
+
Version: 1.28.2
|
|
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>
|
|
@@ -29,8 +29,8 @@ Requires-Dist: pandas[sql-other]>=2.1.2 ; extra == "pandas" and ( python_version
|
|
|
29
29
|
Requires-Dist: pandas>=2.2.3 ; extra == "pandas" and ( python_version >="3.13")
|
|
30
30
|
Requires-Dist: polars>=1.26.0 ; extra == "polars"
|
|
31
31
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
32
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.28.
|
|
33
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.28.
|
|
32
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.28.2/changelog.html
|
|
33
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.28.2
|
|
34
34
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
|
35
35
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
36
36
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
@@ -64,7 +64,7 @@ Provides-Extra: polars
|
|
|
64
64
|
|
|
65
65
|
Package ``apache-airflow-providers-common-sql``
|
|
66
66
|
|
|
67
|
-
Release: ``1.28.
|
|
67
|
+
Release: ``1.28.2``
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
`Common SQL Provider <https://en.wikipedia.org/wiki/SQL>`__
|
|
@@ -77,7 +77,7 @@ This is a provider package for ``common.sql`` provider. All classes for this pro
|
|
|
77
77
|
are in ``airflow.providers.common.sql`` python package.
|
|
78
78
|
|
|
79
79
|
You can find package information and changelog for the provider
|
|
80
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.28.
|
|
80
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.28.2/>`_.
|
|
81
81
|
|
|
82
82
|
Installation
|
|
83
83
|
------------
|
|
@@ -131,5 +131,5 @@ Extra Dependencies
|
|
|
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-common-sql/1.28.
|
|
134
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.28.2/changelog.html>`_.
|
|
135
135
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
airflow/providers/common/sql/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
|
|
2
2
|
airflow/providers/common/sql/README_API.md,sha256=Yug9-DLqoKkG-qT5XMwkyG_T-r17Iqhiipxt5tMZIUw,5906
|
|
3
|
-
airflow/providers/common/sql/__init__.py,sha256=
|
|
3
|
+
airflow/providers/common/sql/__init__.py,sha256=FKvSrNSAd3wg-XD7MF7LubNZckxHT4pGDclBYzzJYQU,1500
|
|
4
4
|
airflow/providers/common/sql/get_provider_info.py,sha256=xCPXLKFA_1ilhGa0aB3E9ggdHtn9Do7Eb469begpZag,2767
|
|
5
5
|
airflow/providers/common/sql/get_provider_info.pyi,sha256=NSIGS74SESn-j0g3xd3BlctUrKlkWaXL605hCs0hjac,1580
|
|
6
6
|
airflow/providers/common/sql/version_compat.py,sha256=WKfSWhm-ZTmqCuSo6UMn9GiEgzfCMGEso4BR52V4A4c,2105
|
|
7
7
|
airflow/providers/common/sql/dialects/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
8
|
-
airflow/providers/common/sql/dialects/dialect.py,sha256=
|
|
8
|
+
airflow/providers/common/sql/dialects/dialect.py,sha256=zdmmL6yU5_Bdp-aiYJ4TxcZdXHDPb08odWLxSYAUBkM,7723
|
|
9
9
|
airflow/providers/common/sql/dialects/dialect.pyi,sha256=ti8eTrLEj-sgtYEoIj3pEfOSl24nbQNhxBcgB8145jY,3504
|
|
10
10
|
airflow/providers/common/sql/doc/adr/0001-record-architecture-decisions.md,sha256=TfANqrzoFto9PMOMza3MitIkXHGLx2kY_BhhF-N0_ow,1675
|
|
11
11
|
airflow/providers/common/sql/doc/adr/0002-return-common-data-structure-from-dbapihook-derived-hooks.md,sha256=ze5w9IVS-HkUwdZvPW8_JaJaVwel7-N6XdEVN4pTuCE,8457
|
|
@@ -13,7 +13,7 @@ airflow/providers/common/sql/doc/adr/0003-introduce-notion-of-dialects-in-dbapih
|
|
|
13
13
|
airflow/providers/common/sql/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
14
14
|
airflow/providers/common/sql/hooks/handlers.py,sha256=XjvycIQsGpDrtg6RFACczybW_dER97RR6Z6B_S6jf6Y,3399
|
|
15
15
|
airflow/providers/common/sql/hooks/handlers.pyi,sha256=Qex63GfW0J6RQeT-prAfukvw4NE6P1IQnM1e04D2sH4,1811
|
|
16
|
-
airflow/providers/common/sql/hooks/sql.py,sha256=
|
|
16
|
+
airflow/providers/common/sql/hooks/sql.py,sha256=HN5zO_cpTmVAMlpS74ljYq-QaywSM9MO5PqS2jY1oXw,44021
|
|
17
17
|
airflow/providers/common/sql/hooks/sql.pyi,sha256=5E3BMnzkKpDaxv47WDsTVlGtTp1_5N-4gk3janeF8nA,7952
|
|
18
18
|
airflow/providers/common/sql/operators/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
19
19
|
airflow/providers/common/sql/operators/generic_transfer.py,sha256=8rK29EisThzJlNmbmPT86fdp7jUqIl8VVFHAb2-ca1A,8510
|
|
@@ -25,7 +25,7 @@ airflow/providers/common/sql/sensors/sql.pyi,sha256=T25x934WUathT0bOULErqx-af8nx
|
|
|
25
25
|
airflow/providers/common/sql/triggers/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
26
26
|
airflow/providers/common/sql/triggers/sql.py,sha256=3xTxMf2oSE8X8IhP22pmlSoEYmJIIFmi8HmsNbiLek0,3690
|
|
27
27
|
airflow/providers/common/sql/triggers/sql.pyi,sha256=TjSM2B3qCv3oN8Y5l_czi9YfxRE2h5Hv_lvUokeiGsE,1968
|
|
28
|
-
apache_airflow_providers_common_sql-1.28.
|
|
29
|
-
apache_airflow_providers_common_sql-1.28.
|
|
30
|
-
apache_airflow_providers_common_sql-1.28.
|
|
31
|
-
apache_airflow_providers_common_sql-1.28.
|
|
28
|
+
apache_airflow_providers_common_sql-1.28.2.dist-info/entry_points.txt,sha256=h8UXRp2crPuGmYVYRM5oe168qIh7g-4t2QQbVMizKjI,106
|
|
29
|
+
apache_airflow_providers_common_sql-1.28.2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
30
|
+
apache_airflow_providers_common_sql-1.28.2.dist-info/METADATA,sha256=NJDfIu7CNbC9OAZasJf4c9R2Fr2NGjSt6mVu__jD47U,6090
|
|
31
|
+
apache_airflow_providers_common_sql-1.28.2.dist-info/RECORD,,
|
|
File without changes
|