apache-airflow-providers-common-sql 1.24.1rc1__tar.gz → 1.25.0rc1__tar.gz
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.
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/PKG-INFO +6 -6
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/README.rst +3 -3
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/pyproject.toml +7 -3
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/__init__.py +1 -1
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/get_provider_info.py +2 -1
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/hooks/handlers.pyi +3 -1
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/hooks/sql.py +2 -2
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/hooks/sql.pyi +3 -1
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/operators/sql.py +12 -10
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/LICENSE +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/README_API.md +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/dialects/__init__.py +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/dialects/dialect.py +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/dialects/dialect.pyi +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/doc/adr/0001-record-architecture-decisions.md +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/doc/adr/0002-return-common-data-structure-from-dbapihook-derived-hooks.md +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/doc/adr/0003-introduce-notion-of-dialects-in-dbapihook.md +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/get_provider_info.pyi +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/hooks/__init__.py +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/hooks/handlers.py +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/operators/__init__.py +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/operators/generic_transfer.py +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/operators/generic_transfer.pyi +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/sensors/__init__.py +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/sensors/sql.py +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/sensors/sql.pyi +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/triggers/__init__.py +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/triggers/sql.py +0 -0
- {apache_airflow_providers_common_sql-1.24.1rc1 → apache_airflow_providers_common_sql-1.25.0rc1}/src/airflow/providers/common/sql/triggers/sql.pyi +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apache-airflow-providers-common-sql
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.25.0rc1
|
|
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>
|
|
@@ -27,8 +27,8 @@ Requires-Dist: methodtools>=0.4.7
|
|
|
27
27
|
Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
|
|
28
28
|
Requires-Dist: pandas>=2.1.2,<2.2 ; extra == "pandas"
|
|
29
29
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
30
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.
|
|
31
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.
|
|
30
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.25.0/changelog.html
|
|
31
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.25.0
|
|
32
32
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
|
33
33
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
34
34
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
@@ -61,7 +61,7 @@ Provides-Extra: pandas
|
|
|
61
61
|
|
|
62
62
|
Package ``apache-airflow-providers-common-sql``
|
|
63
63
|
|
|
64
|
-
Release: ``1.
|
|
64
|
+
Release: ``1.25.0``
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
`Common SQL Provider <https://en.wikipedia.org/wiki/SQL>`__
|
|
@@ -74,7 +74,7 @@ This is a provider package for ``common.sql`` provider. All classes for this pro
|
|
|
74
74
|
are in ``airflow.providers.common.sql`` python package.
|
|
75
75
|
|
|
76
76
|
You can find package information and changelog for the provider
|
|
77
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.
|
|
77
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.25.0/>`_.
|
|
78
78
|
|
|
79
79
|
Installation
|
|
80
80
|
------------
|
|
@@ -117,5 +117,5 @@ Dependent package
|
|
|
117
117
|
============================================================================================================== ===============
|
|
118
118
|
|
|
119
119
|
The changelog for the provider package can be found in the
|
|
120
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.
|
|
120
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.25.0/changelog.html>`_.
|
|
121
121
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
Package ``apache-airflow-providers-common-sql``
|
|
25
25
|
|
|
26
|
-
Release: ``1.
|
|
26
|
+
Release: ``1.25.0``
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
`Common SQL Provider <https://en.wikipedia.org/wiki/SQL>`__
|
|
@@ -36,7 +36,7 @@ This is a provider package for ``common.sql`` provider. All classes for this pro
|
|
|
36
36
|
are in ``airflow.providers.common.sql`` python package.
|
|
37
37
|
|
|
38
38
|
You can find package information and changelog for the provider
|
|
39
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.
|
|
39
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.25.0/>`_.
|
|
40
40
|
|
|
41
41
|
Installation
|
|
42
42
|
------------
|
|
@@ -79,4 +79,4 @@ Dependent package
|
|
|
79
79
|
============================================================================================================== ===============
|
|
80
80
|
|
|
81
81
|
The changelog for the provider package can be found in the
|
|
82
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.
|
|
82
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.25.0/changelog.html>`_.
|
|
@@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"
|
|
|
25
25
|
|
|
26
26
|
[project]
|
|
27
27
|
name = "apache-airflow-providers-common-sql"
|
|
28
|
-
version = "1.
|
|
28
|
+
version = "1.25.0.rc1"
|
|
29
29
|
description = "Provider package apache-airflow-providers-common-sql for Apache Airflow"
|
|
30
30
|
readme = "README.rst"
|
|
31
31
|
authors = [
|
|
@@ -86,6 +86,10 @@ dev = [
|
|
|
86
86
|
"apache-airflow-devel-common",
|
|
87
87
|
"apache-airflow-providers-openlineage",
|
|
88
88
|
# Additional devel dependencies (do not remove this line and add extra development dependencies)
|
|
89
|
+
"apache-airflow-providers-common-sql[pandas]",
|
|
90
|
+
"apache-airflow-providers-mysql",
|
|
91
|
+
"apache-airflow-providers-postgres",
|
|
92
|
+
"apache-airflow-providers-odbc",
|
|
89
93
|
]
|
|
90
94
|
|
|
91
95
|
[tool.uv.sources]
|
|
@@ -99,8 +103,8 @@ apache-airflow-providers-fab = {workspace = true}
|
|
|
99
103
|
apache-airflow-providers-standard = {workspace = true}
|
|
100
104
|
|
|
101
105
|
[project.urls]
|
|
102
|
-
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.
|
|
103
|
-
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.
|
|
106
|
+
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.25.0"
|
|
107
|
+
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.25.0/changelog.html"
|
|
104
108
|
"Bug Tracker" = "https://github.com/apache/airflow/issues"
|
|
105
109
|
"Source Code" = "https://github.com/apache/airflow"
|
|
106
110
|
"Slack Chat" = "https://s.apache.org/airflow-slack"
|
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "1.
|
|
32
|
+
__version__ = "1.25.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": "Common SQL",
|
|
28
28
|
"description": "`Common SQL Provider <https://en.wikipedia.org/wiki/SQL>`__\n",
|
|
29
29
|
"state": "ready",
|
|
30
|
-
"source-date-epoch":
|
|
30
|
+
"source-date-epoch": 1743835974,
|
|
31
31
|
"versions": [
|
|
32
|
+
"1.25.0",
|
|
32
33
|
"1.24.1",
|
|
33
34
|
"1.24.0",
|
|
34
35
|
"1.23.0",
|
|
@@ -34,6 +34,8 @@ isort:skip_file
|
|
|
34
34
|
|
|
35
35
|
from collections.abc import Iterable
|
|
36
36
|
|
|
37
|
-
def return_single_query_results(
|
|
37
|
+
def return_single_query_results(
|
|
38
|
+
sql: str | Iterable[str], return_last: bool, split_statements: bool | None
|
|
39
|
+
): ...
|
|
38
40
|
def fetch_all_handler(cursor) -> list[tuple] | None: ...
|
|
39
41
|
def fetch_one_handler(cursor) -> list[tuple] | None: ...
|
|
@@ -615,8 +615,8 @@ class DbApiHook(BaseHook):
|
|
|
615
615
|
is already a common data structure, this method should be ignored.
|
|
616
616
|
"""
|
|
617
617
|
if isinstance(result, Sequence):
|
|
618
|
-
return cast(list[tuple], result)
|
|
619
|
-
return cast(tuple, result)
|
|
618
|
+
return cast("list[tuple]", result)
|
|
619
|
+
return cast("tuple", result)
|
|
620
620
|
|
|
621
621
|
def _run_command(self, cur, sql_statement, parameters):
|
|
622
622
|
"""Run a statement using an already open cursor."""
|
|
@@ -50,7 +50,9 @@ T = TypeVar("T")
|
|
|
50
50
|
SQL_PLACEHOLDERS: Incomplete
|
|
51
51
|
WARNING_MESSAGE: str
|
|
52
52
|
|
|
53
|
-
def return_single_query_results(
|
|
53
|
+
def return_single_query_results(
|
|
54
|
+
sql: str | Iterable[str], return_last: bool, split_statements: bool | None
|
|
55
|
+
): ...
|
|
54
56
|
def fetch_all_handler(cursor) -> list[tuple] | None: ...
|
|
55
57
|
def fetch_one_handler(cursor) -> list[tuple] | None: ...
|
|
56
58
|
def resolve_dialects() -> MutableMapping[str, MutableMapping]: ...
|
|
@@ -224,6 +224,9 @@ class SQLExecuteQueryOperator(BaseSQLOperator):
|
|
|
224
224
|
:param return_last: (optional) return the result of only last statement (default: True).
|
|
225
225
|
:param show_return_value_in_logs: (optional) if true operator output will be printed to the task log.
|
|
226
226
|
Use with caution. It's not recommended to dump large datasets to the log. (default: False).
|
|
227
|
+
:param requires_result_fetch: (optional) if True, ensures that query results are fetched before
|
|
228
|
+
completing execution. If `do_xcom_push` is True, results are fetched automatically,
|
|
229
|
+
making this parameter redundant. (default: False).
|
|
227
230
|
|
|
228
231
|
.. seealso::
|
|
229
232
|
For more information on how to use this operator, take a look at the guide:
|
|
@@ -254,6 +257,7 @@ class SQLExecuteQueryOperator(BaseSQLOperator):
|
|
|
254
257
|
split_statements: bool | None = None,
|
|
255
258
|
return_last: bool = True,
|
|
256
259
|
show_return_value_in_logs: bool = False,
|
|
260
|
+
requires_result_fetch: bool = False,
|
|
257
261
|
**kwargs,
|
|
258
262
|
) -> None:
|
|
259
263
|
super().__init__(conn_id=conn_id, database=database, **kwargs)
|
|
@@ -265,6 +269,7 @@ class SQLExecuteQueryOperator(BaseSQLOperator):
|
|
|
265
269
|
self.split_statements = split_statements
|
|
266
270
|
self.return_last = return_last
|
|
267
271
|
self.show_return_value_in_logs = show_return_value_in_logs
|
|
272
|
+
self.requires_result_fetch = requires_result_fetch
|
|
268
273
|
|
|
269
274
|
def _process_output(
|
|
270
275
|
self, results: list[Any], descriptions: list[Sequence[Sequence] | None]
|
|
@@ -303,7 +308,9 @@ class SQLExecuteQueryOperator(BaseSQLOperator):
|
|
|
303
308
|
sql=self.sql,
|
|
304
309
|
autocommit=self.autocommit,
|
|
305
310
|
parameters=self.parameters,
|
|
306
|
-
handler=self.handler
|
|
311
|
+
handler=self.handler
|
|
312
|
+
if self._should_run_output_processing() or self.requires_result_fetch
|
|
313
|
+
else None,
|
|
307
314
|
return_last=self.return_last,
|
|
308
315
|
**extra_kwargs,
|
|
309
316
|
)
|
|
@@ -1015,12 +1022,7 @@ class SQLIntervalCheckOperator(BaseSQLOperator):
|
|
|
1015
1022
|
test_results[metric] = self.ignore_zero
|
|
1016
1023
|
|
|
1017
1024
|
self.log.info(
|
|
1018
|
-
(
|
|
1019
|
-
"Current metric for %s: %s\n"
|
|
1020
|
-
"Past metric for %s: %s\n"
|
|
1021
|
-
"Ratio for %s: %s\n"
|
|
1022
|
-
"Threshold: %s\n"
|
|
1023
|
-
),
|
|
1025
|
+
("Current metric for %s: %s\nPast metric for %s: %s\nRatio for %s: %s\nThreshold: %s\n"),
|
|
1024
1026
|
metric,
|
|
1025
1027
|
cur,
|
|
1026
1028
|
metric,
|
|
@@ -1134,11 +1136,11 @@ class SQLThresholdCheckOperator(BaseSQLOperator):
|
|
|
1134
1136
|
)
|
|
1135
1137
|
error_msg = (
|
|
1136
1138
|
f'Threshold Check: "{meta_data.get("task_id")}" failed.\n'
|
|
1137
|
-
f
|
|
1138
|
-
f
|
|
1139
|
+
f"DAG: {self.dag_id}\nTask_id: {meta_data.get('task_id')}\n"
|
|
1140
|
+
f"Check description: {meta_data.get('description')}\n"
|
|
1139
1141
|
f"SQL: {self.sql}\n"
|
|
1140
1142
|
f"Result: {result} is not within thresholds "
|
|
1141
|
-
f
|
|
1143
|
+
f"{meta_data.get('min_threshold')} and {meta_data.get('max_threshold')}"
|
|
1142
1144
|
)
|
|
1143
1145
|
self._raise_exception(error_msg)
|
|
1144
1146
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|