apache-airflow-providers-common-sql 1.26.0rc1__tar.gz → 1.27.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.

Files changed (73) hide show
  1. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/PKG-INFO +8 -8
  2. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/README.rst +4 -4
  3. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/docs/changelog.rst +29 -0
  4. apache_airflow_providers_common_sql-1.27.0rc1/docs/commits.rst +35 -0
  5. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/docs/index.rst +5 -5
  6. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/docs/operators.rst +14 -0
  7. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/provider.yaml +2 -1
  8. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/pyproject.toml +4 -4
  9. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/__init__.py +3 -3
  10. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/hooks/sql.py +21 -7
  11. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/hooks/sql.pyi +62 -5
  12. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/operators/sql.py +5 -0
  13. apache_airflow_providers_common_sql-1.27.0rc1/tests/system/common/sql/example_generic_transfer.py +62 -0
  14. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/hooks/test_dbapi.py +23 -0
  15. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/operators/test_sql.py +22 -0
  16. apache_airflow_providers_common_sql-1.26.0rc1/docs/commits.rst +0 -712
  17. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/docs/.latest-doc-only-change.txt +0 -0
  18. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/docs/conf.py +0 -0
  19. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/docs/connections.rst +0 -0
  20. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/docs/dataframes.rst +0 -0
  21. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/docs/dialects.rst +0 -0
  22. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/docs/installing-providers-from-sources.rst +0 -0
  23. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/docs/integration-logos/sql.png +0 -0
  24. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/docs/security.rst +0 -0
  25. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/docs/supported-database-types.rst +0 -0
  26. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/__init__.py +0 -0
  27. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/__init__.py +0 -0
  28. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/__init__.py +0 -0
  29. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/LICENSE +0 -0
  30. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/README_API.md +0 -0
  31. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/dialects/__init__.py +0 -0
  32. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/dialects/dialect.py +0 -0
  33. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/dialects/dialect.pyi +0 -0
  34. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/doc/adr/0001-record-architecture-decisions.md +0 -0
  35. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/doc/adr/0002-return-common-data-structure-from-dbapihook-derived-hooks.md +0 -0
  36. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/doc/adr/0003-introduce-notion-of-dialects-in-dbapihook.md +0 -0
  37. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/get_provider_info.py +0 -0
  38. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/get_provider_info.pyi +0 -0
  39. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/hooks/__init__.py +0 -0
  40. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/hooks/handlers.py +0 -0
  41. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/hooks/handlers.pyi +0 -0
  42. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/operators/__init__.py +0 -0
  43. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/operators/generic_transfer.py +0 -0
  44. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/operators/generic_transfer.pyi +0 -0
  45. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/sensors/__init__.py +0 -0
  46. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/sensors/sql.py +0 -0
  47. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/sensors/sql.pyi +0 -0
  48. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/triggers/__init__.py +0 -0
  49. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/triggers/sql.py +0 -0
  50. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/src/airflow/providers/common/sql/triggers/sql.pyi +0 -0
  51. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/conftest.py +0 -0
  52. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/system/__init__.py +0 -0
  53. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/system/common/__init__.py +0 -0
  54. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/system/common/sql/__init__.py +0 -0
  55. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/system/common/sql/example_sql_column_table_check.py +0 -0
  56. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/system/common/sql/example_sql_execute_query.py +0 -0
  57. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/system/common/sql/example_sql_threshold_check.py +0 -0
  58. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/__init__.py +0 -0
  59. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/__init__.py +0 -0
  60. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/__init__.py +0 -0
  61. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/dialects/__init__.py +0 -0
  62. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/dialects/test_dialect.py +0 -0
  63. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/hooks/__init__.py +0 -0
  64. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/hooks/test_handlers.py +0 -0
  65. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/hooks/test_sql.py +0 -0
  66. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/hooks/test_sqlparse.py +0 -0
  67. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/operators/__init__.py +0 -0
  68. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/operators/test_generic_transfer.py +0 -0
  69. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/operators/test_sql_execute.py +0 -0
  70. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/sensors/__init__.py +0 -0
  71. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/sensors/test_sql.py +0 -0
  72. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/triggers/__init__.py +0 -0
  73. {apache_airflow_providers_common_sql-1.26.0rc1 → apache_airflow_providers_common_sql-1.27.0rc1}/tests/unit/common/sql/triggers/test_sql.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-common-sql
3
- Version: 1.26.0rc1
3
+ Version: 1.27.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>
@@ -20,7 +20,7 @@ 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.0rc0
23
+ Requires-Dist: apache-airflow>=2.10.0rc1
24
24
  Requires-Dist: sqlparse>=0.5.1
25
25
  Requires-Dist: more-itertools>=9.0.0
26
26
  Requires-Dist: methodtools>=0.4.7
@@ -28,8 +28,8 @@ Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
28
28
  Requires-Dist: pandas>=2.1.2,<2.2 ; extra == "pandas"
29
29
  Requires-Dist: polars>=1.26.0 ; extra == "polars"
30
30
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
31
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.26.0/changelog.html
32
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.26.0
31
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.27.0/changelog.html
32
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.27.0
33
33
  Project-URL: Mastodon, https://fosstodon.org/@airflow
34
34
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
35
35
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -63,7 +63,7 @@ Provides-Extra: polars
63
63
 
64
64
  Package ``apache-airflow-providers-common-sql``
65
65
 
66
- Release: ``1.26.0``
66
+ Release: ``1.27.0``
67
67
 
68
68
 
69
69
  `Common SQL Provider <https://en.wikipedia.org/wiki/SQL>`__
@@ -76,7 +76,7 @@ This is a provider package for ``common.sql`` provider. All classes for this pro
76
76
  are in ``airflow.providers.common.sql`` python package.
77
77
 
78
78
  You can find package information and changelog for the provider
79
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.26.0/>`_.
79
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.27.0/>`_.
80
80
 
81
81
  Installation
82
82
  ------------
@@ -93,7 +93,7 @@ Requirements
93
93
  ================== ==================
94
94
  PIP package Version required
95
95
  ================== ==================
96
- ``apache-airflow`` ``>=2.9.0``
96
+ ``apache-airflow`` ``>=2.10.0``
97
97
  ``sqlparse`` ``>=0.5.1``
98
98
  ``more-itertools`` ``>=9.0.0``
99
99
  ``methodtools`` ``>=0.4.7``
@@ -119,5 +119,5 @@ Dependent package
119
119
  ============================================================================================================== ===============
120
120
 
121
121
  The changelog for the provider package can be found in the
122
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.26.0/changelog.html>`_.
122
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.27.0/changelog.html>`_.
123
123
 
@@ -23,7 +23,7 @@
23
23
 
24
24
  Package ``apache-airflow-providers-common-sql``
25
25
 
26
- Release: ``1.26.0``
26
+ Release: ``1.27.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.26.0/>`_.
39
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.27.0/>`_.
40
40
 
41
41
  Installation
42
42
  ------------
@@ -53,7 +53,7 @@ Requirements
53
53
  ================== ==================
54
54
  PIP package Version required
55
55
  ================== ==================
56
- ``apache-airflow`` ``>=2.9.0``
56
+ ``apache-airflow`` ``>=2.10.0``
57
57
  ``sqlparse`` ``>=0.5.1``
58
58
  ``more-itertools`` ``>=9.0.0``
59
59
  ``methodtools`` ``>=0.4.7``
@@ -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.26.0/changelog.html>`_.
82
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.27.0/changelog.html>`_.
@@ -25,6 +25,35 @@
25
25
  Changelog
26
26
  ---------
27
27
 
28
+ 1.27.0
29
+ ......
30
+
31
+ .. note::
32
+ This release of provider is only available for Airflow 2.10+ as explained in the
33
+ `Apache Airflow providers support policy <https://github.com/apache/airflow/blob/main/PROVIDERS.rst#minimum-supported-version-of-airflow-for-community-managed-providers>`_.
34
+
35
+ Bug Fixes
36
+ ~~~~~~~~~
37
+
38
+ * ``Fix SADeprecationWarning when using inspector with SQLAlchemy in DbApiHook (#48938)``
39
+ * ``Fix: SQLExecuteQueryOperator does not pass extra_dejson values to hook_params (#49282)``
40
+
41
+ Misc
42
+ ~~~~
43
+
44
+ * ``Refine type overload for 'common-sql' (#50161)``
45
+ * ``Bump min Airflow version in providers to 2.10 (#49843)``
46
+ * ``refactor: Log generated SQL-statement and passed parameters as ERROR message when an exception occurs during insert_rows (#48932)``
47
+
48
+ Doc-only
49
+ ~~~~~~~~
50
+
51
+ * ``Update standard provider doc operators in core operators-and-hooks-ref.rst (#49401)``
52
+
53
+ .. Below changes are excluded from the changelog. Move them to
54
+ appropriate section above if needed. Do not delete the lines(!):
55
+ * ``Avoid committing history for providers (#49907)``
56
+
28
57
  1.26.0
29
58
  ......
30
59
 
@@ -0,0 +1,35 @@
1
+
2
+ .. Licensed to the Apache Software Foundation (ASF) under one
3
+ or more contributor license agreements. See the NOTICE file
4
+ distributed with this work for additional information
5
+ regarding copyright ownership. The ASF licenses this file
6
+ to you under the Apache License, Version 2.0 (the
7
+ "License"); you may not use this file except in compliance
8
+ with the License. You may obtain a copy of the License at
9
+
10
+ .. http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ .. Unless required by applicable law or agreed to in writing,
13
+ software distributed under the License is distributed on an
14
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ KIND, either express or implied. See the License for the
16
+ specific language governing permissions and limitations
17
+ under the License.
18
+
19
+ .. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
20
+
21
+ .. IF YOU WANT TO MODIFY THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
22
+ `PROVIDER_COMMITS_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
23
+
24
+ .. THE REMAINDER OF THE FILE IS AUTOMATICALLY GENERATED. IT WILL BE OVERWRITTEN!
25
+
26
+ Package apache-airflow-providers-common-sql
27
+ ------------------------------------------------------
28
+
29
+ `Common SQL Provider <https://en.wikipedia.org/wiki/SQL>`__
30
+
31
+
32
+ This is detailed commit list of changes for versions provider package: ``common.sql``.
33
+ For high-level changelog, see :doc:`package information including changelog <index>`.
34
+
35
+ .. airflow-providers-commits::
@@ -79,7 +79,7 @@ apache-airflow-providers-common-sql package
79
79
  `Common SQL Provider <https://en.wikipedia.org/wiki/SQL>`__
80
80
 
81
81
 
82
- Release: 1.26.0
82
+ Release: 1.27.0
83
83
 
84
84
  Provider package
85
85
  ----------------
@@ -97,12 +97,12 @@ For the minimum Airflow version supported, see ``Requirements`` below.
97
97
  Requirements
98
98
  ------------
99
99
 
100
- The minimum Apache Airflow version supported by this provider distribution is ``2.9.0``.
100
+ The minimum Apache Airflow version supported by this provider distribution is ``2.10.0``.
101
101
 
102
102
  ================== ==================
103
103
  PIP package Version required
104
104
  ================== ==================
105
- ``apache-airflow`` ``>=2.9.0``
105
+ ``apache-airflow`` ``>=2.10.0``
106
106
  ``sqlparse`` ``>=0.5.1``
107
107
  ``more-itertools`` ``>=9.0.0``
108
108
  ``methodtools`` ``>=0.4.7``
@@ -133,5 +133,5 @@ Downloading official packages
133
133
  You can download officially released packages and verify their checksums and signatures from the
134
134
  `Official Apache Download site <https://downloads.apache.org/airflow/providers/>`_
135
135
 
136
- * `The apache-airflow-providers-common-sql 1.26.0 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_sql-1.26.0.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_sql-1.26.0.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_sql-1.26.0.tar.gz.sha512>`__)
137
- * `The apache-airflow-providers-common-sql 1.26.0 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_sql-1.26.0-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_sql-1.26.0-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_sql-1.26.0-py3-none-any.whl.sha512>`__)
136
+ * `The apache-airflow-providers-common-sql 1.27.0 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_sql-1.27.0.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_sql-1.27.0.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_sql-1.27.0.tar.gz.sha512>`__)
137
+ * `The apache-airflow-providers-common-sql 1.27.0 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_sql-1.27.0-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_sql-1.27.0-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_common_sql-1.27.0-py3-none-any.whl.sha512>`__)
@@ -173,3 +173,17 @@ The below example demonstrates how to instantiate the SQLThresholdCheckOperator
173
173
  :end-before: [END howto_operator_sql_threshold_check]
174
174
 
175
175
  If the value returned by the query, is within the thresholds, the task passes. Otherwise, it fails.
176
+
177
+ .. _howto/operator:GenericTransfer:
178
+
179
+ Generic Transfer
180
+ ~~~~~~~~~~~~~~~~
181
+
182
+ Use the :class:`~airflow.providers.common.sql.operators.generic_transfer.GenericTransfer` to transfer data between
183
+ between two connections.
184
+
185
+ .. exampleinclude:: /../tests/system/common/sql/example_generic_transfer.py
186
+ :language: python
187
+ :dedent: 4
188
+ :start-after: [START howto_operator_generic_transfer]
189
+ :end-before: [END howto_operator_generic_transfer]
@@ -22,9 +22,10 @@ description: |
22
22
  `Common SQL Provider <https://en.wikipedia.org/wiki/SQL>`__
23
23
 
24
24
  state: ready
25
- source-date-epoch: 1744788973
25
+ source-date-epoch: 1746344573
26
26
  # note that those versions are maintained by release manager - do not update them manually
27
27
  versions:
28
+ - 1.27.0
28
29
  - 1.26.0
29
30
  - 1.25.0
30
31
  - 1.24.1
@@ -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.26.0.rc1"
28
+ version = "1.27.0rc1"
29
29
  description = "Provider package apache-airflow-providers-common-sql for Apache Airflow"
30
30
  readme = "README.rst"
31
31
  authors = [
@@ -57,7 +57,7 @@ requires-python = "~=3.9"
57
57
  # Make sure to run ``breeze static-checks --type update-providers-dependencies --all-files``
58
58
  # After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
59
59
  dependencies = [
60
- "apache-airflow>=2.9.0rc0",
60
+ "apache-airflow>=2.10.0rc1",
61
61
  "sqlparse>=0.5.1",
62
62
  "more-itertools>=9.0.0",
63
63
  # The methodtools dependency is necessary since the introduction of dialects:
@@ -122,8 +122,8 @@ apache-airflow-providers-common-sql = {workspace = true}
122
122
  apache-airflow-providers-standard = {workspace = true}
123
123
 
124
124
  [project.urls]
125
- "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.26.0"
126
- "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.26.0/changelog.html"
125
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.27.0"
126
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-common-sql/1.27.0/changelog.html"
127
127
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
128
128
  "Source Code" = "https://github.com/apache/airflow"
129
129
  "Slack Chat" = "https://s.apache.org/airflow-slack"
@@ -29,11 +29,11 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "1.26.0"
32
+ __version__ = "1.27.0"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
- "2.9.0"
35
+ "2.10.0"
36
36
  ):
37
37
  raise RuntimeError(
38
- f"The package `apache-airflow-providers-common-sql:{__version__}` needs Apache Airflow 2.9.0+"
38
+ f"The package `apache-airflow-providers-common-sql:{__version__}` needs Apache Airflow 2.10.0+"
39
39
  )
@@ -37,8 +37,8 @@ import sqlparse
37
37
  from deprecated import deprecated
38
38
  from methodtools import lru_cache
39
39
  from more_itertools import chunked
40
- from sqlalchemy import create_engine
41
- from sqlalchemy.engine import Inspector, make_url
40
+ from sqlalchemy import create_engine, inspect
41
+ from sqlalchemy.engine import make_url
42
42
  from sqlalchemy.exc import ArgumentError, NoSuchModuleError
43
43
  from typing_extensions import Literal
44
44
 
@@ -56,7 +56,7 @@ from airflow.utils.module_loading import import_string
56
56
  if TYPE_CHECKING:
57
57
  from pandas import DataFrame
58
58
  from polars import DataFrame as PolarsDataFrame
59
- from sqlalchemy.engine import URL
59
+ from sqlalchemy.engine import URL, Engine, Inspector
60
60
 
61
61
  from airflow.models import Connection
62
62
  from airflow.providers.openlineage.extractors import OperatorLineage
@@ -307,7 +307,7 @@ class DbApiHook(BaseHook):
307
307
  msg = "`sqlalchemy_url` property should be implemented in the provider subclass."
308
308
  raise NotImplementedError(msg)
309
309
 
310
- def get_sqlalchemy_engine(self, engine_kwargs=None):
310
+ def get_sqlalchemy_engine(self, engine_kwargs=None) -> Engine:
311
311
  """
312
312
  Get an sqlalchemy_engine object.
313
313
 
@@ -328,7 +328,7 @@ class DbApiHook(BaseHook):
328
328
 
329
329
  @property
330
330
  def inspector(self) -> Inspector:
331
- return Inspector.from_engine(self.get_sqlalchemy_engine())
331
+ return inspect(self.get_sqlalchemy_engine())
332
332
 
333
333
  @cached_property
334
334
  def dialect_name(self) -> str:
@@ -890,7 +890,14 @@ class DbApiHook(BaseHook):
890
890
  )
891
891
  sql = self._generate_insert_sql(table, values[0], target_fields, replace, **kwargs)
892
892
  self.log.debug("Generated sql: %s", sql)
893
- cur.executemany(sql, values)
893
+
894
+ try:
895
+ cur.executemany(sql, values)
896
+ except Exception as e:
897
+ self.log.error("Generated sql: %s", sql)
898
+ self.log.error("Parameters: %s", values)
899
+ raise e
900
+
894
901
  conn.commit()
895
902
  nb_rows += len(chunked_rows)
896
903
  self.log.info("Loaded %s rows into %s so far", nb_rows, table)
@@ -899,7 +906,14 @@ class DbApiHook(BaseHook):
899
906
  values = self._serialize_cells(row, conn)
900
907
  sql = self._generate_insert_sql(table, values, target_fields, replace, **kwargs)
901
908
  self.log.debug("Generated sql: %s", sql)
902
- cur.execute(sql, values)
909
+
910
+ try:
911
+ cur.execute(sql, values)
912
+ except Exception as e:
913
+ self.log.error("Generated sql: %s", sql)
914
+ self.log.error("Parameters: %s", values)
915
+ raise e
916
+
903
917
  if commit_every and i % commit_every == 0:
904
918
  conn.commit()
905
919
  self.log.info("Loaded %s rows into %s so far", i, table)
@@ -37,8 +37,10 @@ from functools import cached_property as cached_property
37
37
  from typing import Any, Callable, Protocol, TypeVar, overload
38
38
 
39
39
  from _typeshed import Incomplete as Incomplete
40
- from pandas import DataFrame as DataFrame
41
- from sqlalchemy.engine import URL as URL, Inspector as Inspector
40
+ from pandas import DataFrame as PandasDataFrame
41
+ from polars import DataFrame as PolarsDataFrame
42
+ from sqlalchemy.engine import URL as URL, Engine as Engine, Inspector as Inspector
43
+ from typing_extensions import Literal
42
44
 
43
45
  from airflow.hooks.base import BaseHook as BaseHook
44
46
  from airflow.models import Connection as Connection
@@ -93,7 +95,7 @@ class DbApiHook(BaseHook):
93
95
  def get_uri(self) -> str: ...
94
96
  @property
95
97
  def sqlalchemy_url(self) -> URL: ...
96
- def get_sqlalchemy_engine(self, engine_kwargs: Incomplete | None = None): ...
98
+ def get_sqlalchemy_engine(self, engine_kwargs: Incomplete | None = None) -> Engine: ...
97
99
  @property
98
100
  def inspector(self) -> Inspector: ...
99
101
  @cached_property
@@ -105,10 +107,65 @@ class DbApiHook(BaseHook):
105
107
  def get_reserved_words(self, dialect_name: str) -> set[str]: ...
106
108
  def get_pandas_df(
107
109
  self, sql, parameters: list | tuple | Mapping[str, Any] | None = None, **kwargs
108
- ) -> DataFrame: ...
110
+ ) -> PandasDataFrame: ...
109
111
  def get_pandas_df_by_chunks(
110
112
  self, sql, parameters: list | tuple | Mapping[str, Any] | None = None, *, chunksize: int, **kwargs
111
- ) -> Generator[DataFrame, None, None]: ...
113
+ ) -> Generator[PandasDataFrame, None, None]: ...
114
+ @overload
115
+ def get_df(
116
+ self,
117
+ sql: str | list[str],
118
+ parameters: list | tuple | Mapping[str, Any] | None = None,
119
+ *,
120
+ df_type: Literal["pandas"] = "pandas",
121
+ **kwargs: Any,
122
+ ) -> PandasDataFrame: ...
123
+ @overload
124
+ def get_df(
125
+ self,
126
+ sql: str | list[str],
127
+ parameters: list | tuple | Mapping[str, Any] | None = None,
128
+ *,
129
+ df_type: Literal["polars"] = "polars",
130
+ **kwargs: Any,
131
+ ) -> PolarsDataFrame: ...
132
+ @overload
133
+ def get_df( # fallback overload
134
+ self,
135
+ sql: str | list[str],
136
+ parameters: list | tuple | Mapping[str, Any] | None = None,
137
+ *,
138
+ df_type: Literal["pandas", "polars"] = "pandas",
139
+ ) -> PandasDataFrame | PolarsDataFrame: ...
140
+ @overload
141
+ def get_df_by_chunks(
142
+ self,
143
+ sql,
144
+ parameters: list | tuple | Mapping[str, Any] | None = None,
145
+ *,
146
+ chunksize: int,
147
+ df_type: Literal["pandas"] = "pandas",
148
+ **kwargs,
149
+ ) -> Generator[PandasDataFrame, None, None]: ...
150
+ @overload
151
+ def get_df_by_chunks(
152
+ self,
153
+ sql,
154
+ parameters: list | tuple | Mapping[str, Any] | None = None,
155
+ *,
156
+ chunksize: int,
157
+ df_type: Literal["polars"],
158
+ **kwargs,
159
+ ) -> Generator[PolarsDataFrame, None, None]: ...
160
+ @overload
161
+ def get_df_by_chunks( # fallback overload
162
+ self,
163
+ sql,
164
+ parameters: list | tuple | Mapping[str, Any] | None = None,
165
+ *,
166
+ chunksize: int,
167
+ df_type: Literal["pandas", "polars"] = "pandas",
168
+ ) -> Generator[PandasDataFrame | PolarsDataFrame, None, None]: ...
112
169
  def get_records(
113
170
  self, sql: str | list[str], parameters: Iterable | Mapping[str, Any] | None = None
114
171
  ) -> Any: ...
@@ -161,7 +161,12 @@ class BaseSQLOperator(BaseOperator):
161
161
  :param hook_params: hook parameters
162
162
  :return: default hook for this connection
163
163
  """
164
+ hook_params = hook_params or {}
164
165
  connection = BaseHook.get_connection(conn_id)
166
+ conn_params = connection.extra_dejson
167
+ for conn_param in conn_params:
168
+ if conn_param not in hook_params:
169
+ hook_params[conn_param] = conn_params[conn_param]
165
170
  return connection.get_hook(hook_params=hook_params)
166
171
 
167
172
  @cached_property
@@ -0,0 +1,62 @@
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one
3
+ # or more contributor license agreements. See the NOTICE file
4
+ # distributed with this work for additional information
5
+ # regarding copyright ownership. The ASF licenses this file
6
+ # to you under the Apache License, Version 2.0 (the
7
+ # "License"); you may not use this file except in compliance
8
+ # with the License. You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing,
13
+ # software distributed under the License is distributed on an
14
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ # KIND, either express or implied. See the License for the
16
+ # specific language governing permissions and limitations
17
+ # under the License.
18
+ from __future__ import annotations
19
+
20
+ from airflow import DAG
21
+ from airflow.providers.common.sql.operators.generic_transfer import GenericTransfer
22
+ from airflow.utils import timezone
23
+
24
+ connection_args = {
25
+ "conn_id": "airflow_db",
26
+ "conn_type": "Postgres",
27
+ "host": "postgres",
28
+ "schema": "postgres",
29
+ "login": "postgres",
30
+ "password": "postgres",
31
+ "port": 5432,
32
+ }
33
+
34
+ with DAG(
35
+ "example_generic_transfer",
36
+ description="Example DAG for GenericTransfer.",
37
+ default_args=connection_args,
38
+ start_date=timezone.datetime(2021, 1, 1),
39
+ schedule=None,
40
+ catchup=False,
41
+ ) as dag:
42
+ # [START howto_operator_generic_transfer]
43
+ sql = "SELECT * FROM connection LIMIT 10;"
44
+
45
+ generic_transfer = GenericTransfer(
46
+ task_id="generic_transfer",
47
+ preoperator=[
48
+ "DROP TABLE IF EXISTS test_mysql_to_mysql",
49
+ "CREATE TABLE IF NOT EXISTS test_mysql_to_mysql LIKE connection",
50
+ ],
51
+ source_conn_id="airflow_db",
52
+ destination_conn_id="airflow_db",
53
+ destination_table="test_mysql_to_mysql",
54
+ sql=sql,
55
+ )
56
+ # [END howto_operator_generic_transfer]
57
+
58
+
59
+ from tests_common.test_utils.system_tests import get_test_run # noqa: E402
60
+
61
+ # Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
62
+ test_run = get_test_run(dag)
@@ -267,6 +267,29 @@ class TestDbApiHook:
267
267
 
268
268
  self.cur.executemany.assert_any_call(sql, rows)
269
269
 
270
+ def test_insert_rows_logs_generated_sql_on_exception(self, caplog):
271
+ table = "table"
272
+ rows = [("What's",), ("up",), ("world",)]
273
+
274
+ with caplog.at_level(logging.ERROR):
275
+ self.cur.executemany.side_effect = Exception("Boom!")
276
+ self.db_hook.supports_executemany = True
277
+
278
+ with pytest.raises(Exception, match="Boom!"):
279
+ self.db_hook.insert_rows(table, iter(rows))
280
+
281
+ assert self.conn.close.call_count == 1
282
+ assert self.cur.close.call_count == 1
283
+ assert self.conn.commit.call_count == 1
284
+
285
+ sql = f"INSERT INTO {table} VALUES (%s)"
286
+
287
+ assert len(caplog.messages) == 2
288
+ assert any(f"Generated sql: {sql}" in message for message in caplog.messages)
289
+ assert any(f"Parameters: {rows}" in message for message in caplog.messages)
290
+
291
+ self.cur.executemany.assert_any_call(sql, rows)
292
+
270
293
  def test_get_uri_schema_not_none(self):
271
294
  self.db_hook.get_connection = mock.MagicMock(
272
295
  return_value=Connection(
@@ -113,6 +113,11 @@ class TestBaseSQLOperator:
113
113
 
114
114
 
115
115
  class TestSQLExecuteQueryOperator:
116
+ def setup_method(self):
117
+ self.task_id = "test_task"
118
+ self.conn_id = "sql_default"
119
+ self._operator = SQLExecuteQueryOperator(task_id=self.task_id, conn_id=self.conn_id, sql="sql")
120
+
116
121
  def _construct_operator(self, sql, **kwargs):
117
122
  dag = DAG("test_dag", schedule=None, start_date=datetime.datetime(2017, 1, 1))
118
123
  return SQLExecuteQueryOperator(
@@ -190,6 +195,23 @@ class TestSQLExecuteQueryOperator:
190
195
  assert descriptions == ("id", "name")
191
196
  assert result == [(1, "Alice"), (2, "Bob")]
192
197
 
198
+ @skip_if_force_lowest_dependencies_marker
199
+ def test_sql_operator_extra_dejson_fields_to_hook_params(self):
200
+ with mock.patch(
201
+ "airflow.providers.common.sql.operators.sql.BaseHook.get_connection",
202
+ return_value=Connection(conn_id="sql_default", conn_type="postgres"),
203
+ ) as mock_get_conn:
204
+ mock_get_conn.return_value = Connection(
205
+ conn_id="google_cloud_bigquery_default",
206
+ conn_type="gcpbigquery",
207
+ extra={"use_legacy_sql": False, "priority": "INTERACTIVE"},
208
+ )
209
+ self._operator.hook_params = {"use_legacy_sql": True, "location": "us-east1"}
210
+ assert self._operator._hook.conn_type == "gcpbigquery"
211
+ assert self._operator._hook.use_legacy_sql is True
212
+ assert self._operator._hook.location == "us-east1"
213
+ assert self._operator._hook.priority == "INTERACTIVE"
214
+
193
215
 
194
216
  class TestColumnCheckOperator:
195
217
  valid_column_mapping = {