apache-airflow-providers-common-sql 1.24.0__tar.gz → 1.24.1b1__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.
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/PKG-INFO +7 -7
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/README.rst +3 -3
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/pyproject.toml +4 -4
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/__init__.py +1 -1
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/get_provider_info.py +2 -1
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/operators/sql.py +1 -1
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/triggers/sql.py +21 -11
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/LICENSE +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/README_API.md +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/dialects/__init__.py +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/dialects/dialect.py +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/dialects/dialect.pyi +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/doc/adr/0001-record-architecture-decisions.md +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/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.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/doc/adr/0003-introduce-notion-of-dialects-in-dbapihook.md +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/get_provider_info.pyi +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/hooks/__init__.py +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/hooks/handlers.py +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/hooks/handlers.pyi +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/hooks/sql.py +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/hooks/sql.pyi +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/operators/__init__.py +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/operators/generic_transfer.py +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/operators/generic_transfer.pyi +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/sensors/__init__.py +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/sensors/sql.py +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/sensors/sql.pyi +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/triggers/__init__.py +0 -0
- {apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/src/airflow/providers/common/sql/triggers/sql.pyi +0 -0
{apache_airflow_providers_common_sql-1.24.0 → apache_airflow_providers_common_sql-1.24.1b1}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apache-airflow-providers-common-sql
|
|
3
|
-
Version: 1.24.
|
|
3
|
+
Version: 1.24.1b1
|
|
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,11 +27,11 @@ 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.24.
|
|
31
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.24.
|
|
30
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.24.1b1/changelog.html
|
|
31
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.24.1b1
|
|
32
|
+
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
|
32
33
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
33
34
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
34
|
-
Project-URL: Twitter, https://x.com/ApacheAirflow
|
|
35
35
|
Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
36
36
|
Provides-Extra: openlineage
|
|
37
37
|
Provides-Extra: pandas
|
|
@@ -61,7 +61,7 @@ Provides-Extra: pandas
|
|
|
61
61
|
|
|
62
62
|
Package ``apache-airflow-providers-common-sql``
|
|
63
63
|
|
|
64
|
-
Release: ``1.24.
|
|
64
|
+
Release: ``1.24.1b1``
|
|
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.24.
|
|
77
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.24.1b1/>`_.
|
|
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.24.
|
|
120
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.24.1b1/changelog.html>`_.
|
|
121
121
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
Package ``apache-airflow-providers-common-sql``
|
|
25
25
|
|
|
26
|
-
Release: ``1.24.
|
|
26
|
+
Release: ``1.24.1b1``
|
|
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.24.
|
|
39
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.24.1b1/>`_.
|
|
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.24.
|
|
82
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.24.1b1/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.24.
|
|
28
|
+
version = "1.24.1b1"
|
|
29
29
|
description = "Provider package apache-airflow-providers-common-sql for Apache Airflow"
|
|
30
30
|
readme = "README.rst"
|
|
31
31
|
authors = [
|
|
@@ -99,12 +99,12 @@ apache-airflow-providers-fab = {workspace = true}
|
|
|
99
99
|
apache-airflow-providers-standard = {workspace = true}
|
|
100
100
|
|
|
101
101
|
[project.urls]
|
|
102
|
-
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.24.
|
|
103
|
-
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.24.
|
|
102
|
+
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.24.1b1"
|
|
103
|
+
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.24.1b1/changelog.html"
|
|
104
104
|
"Bug Tracker" = "https://github.com/apache/airflow/issues"
|
|
105
105
|
"Source Code" = "https://github.com/apache/airflow"
|
|
106
106
|
"Slack Chat" = "https://s.apache.org/airflow-slack"
|
|
107
|
-
"
|
|
107
|
+
"Mastodon" = "https://fosstodon.org/@airflow"
|
|
108
108
|
"YouTube" = "https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/"
|
|
109
109
|
|
|
110
110
|
[project.entry-points."apache_airflow_provider"]
|
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "1.24.
|
|
32
|
+
__version__ = "1.24.1b1"
|
|
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": 1742481439,
|
|
31
31
|
"versions": [
|
|
32
|
+
"1.24.1b1",
|
|
32
33
|
"1.24.0",
|
|
33
34
|
"1.23.0",
|
|
34
35
|
"1.21.0",
|
|
@@ -1200,7 +1200,7 @@ class BranchSQLOperator(BaseSQLOperator, SkipMixin):
|
|
|
1200
1200
|
self.conn_id,
|
|
1201
1201
|
)
|
|
1202
1202
|
record = self.get_db_hook().get_first(self.sql, self.parameters)
|
|
1203
|
-
if
|
|
1203
|
+
if record is None:
|
|
1204
1204
|
raise AirflowException(
|
|
1205
1205
|
"No rows returned from sql query. Operator expected True or False return value."
|
|
1206
1206
|
)
|
|
@@ -61,25 +61,35 @@ class SQLExecuteQueryTrigger(BaseTrigger):
|
|
|
61
61
|
},
|
|
62
62
|
)
|
|
63
63
|
|
|
64
|
+
def get_hook(self) -> DbApiHook:
|
|
65
|
+
"""
|
|
66
|
+
Return DbApiHook.
|
|
67
|
+
|
|
68
|
+
:return: DbApiHook for this connection
|
|
69
|
+
"""
|
|
70
|
+
connection = BaseHook.get_connection(self.conn_id)
|
|
71
|
+
hook = connection.get_hook(hook_params=self.hook_params)
|
|
72
|
+
if not isinstance(hook, DbApiHook):
|
|
73
|
+
raise AirflowException(
|
|
74
|
+
f"You are trying to use `common-sql` with {hook.__class__.__name__},"
|
|
75
|
+
" but its provider does not support it. Please upgrade the provider to a version that"
|
|
76
|
+
" supports `common-sql`. The hook class should be a subclass of"
|
|
77
|
+
f" `{hook.__class__.__module__}.{hook.__class__.__name__}`."
|
|
78
|
+
f" Got {hook.__class__.__name__} hook with class hierarchy: {hook.__class__.mro()}"
|
|
79
|
+
)
|
|
80
|
+
return hook
|
|
81
|
+
|
|
64
82
|
async def run(self) -> AsyncIterator[TriggerEvent]:
|
|
65
83
|
try:
|
|
66
|
-
hook =
|
|
67
|
-
|
|
68
|
-
if not isinstance(hook, DbApiHook):
|
|
69
|
-
raise AirflowException(
|
|
70
|
-
f"You are trying to use `common-sql` with {hook.__class__.__name__},"
|
|
71
|
-
" but its provider does not support it. Please upgrade the provider to a version that"
|
|
72
|
-
" supports `common-sql`. The hook class should be a subclass of"
|
|
73
|
-
f" `{hook.__class__.__module__}.{hook.__class__.__name__}`."
|
|
74
|
-
f" Got {hook.__class__.__name__} hook with class hierarchy: {hook.__class__.mro()}"
|
|
75
|
-
)
|
|
84
|
+
hook = self.get_hook()
|
|
76
85
|
|
|
77
86
|
self.log.info("Extracting data from %s", self.conn_id)
|
|
78
87
|
self.log.info("Executing: \n %s", self.sql)
|
|
79
88
|
self.log.info("Reading records from %s", self.conn_id)
|
|
89
|
+
|
|
80
90
|
results = hook.get_records(self.sql)
|
|
81
|
-
self.log.info("Reading records from %s done!", self.conn_id)
|
|
82
91
|
|
|
92
|
+
self.log.info("Reading records from %s done!", self.conn_id)
|
|
83
93
|
self.log.debug("results: %s", results)
|
|
84
94
|
yield TriggerEvent({"status": "success", "results": results})
|
|
85
95
|
except Exception as e:
|
|
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
|
|
File without changes
|
|
File without changes
|