apache-airflow-providers-snowflake 6.5.4__tar.gz → 6.6.0__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-snowflake might be problematic. Click here for more details.
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/PKG-INFO +28 -24
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/README.rst +20 -18
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/changelog.rst +37 -5
- apache_airflow_providers_snowflake-6.6.0/docs/configurations-ref.rst +19 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/connections/snowflake.rst +1 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/index.rst +15 -13
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/provider.yaml +17 -1
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/pyproject.toml +10 -6
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/__init__.py +1 -1
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/decorators/snowpark.py +1 -11
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/get_provider_info.py +16 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/hooks/snowflake.py +48 -8
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/operators/snowflake.py +1 -5
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/transfers/copy_into_snowflake.py +1 -1
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/version_compat.py +0 -6
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/decorators/test_snowpark.py +1 -6
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/hooks/test_snowflake.py +80 -2
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/hooks/test_sql.py +1 -2
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/operators/test_snowflake.py +1 -6
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/.latest-doc-only-change.txt +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/commits.rst +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/conf.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/decorators/index.rst +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/decorators/snowpark.rst +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/installing-providers-from-sources.rst +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/integration-logos/Snowflake.png +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/operators/copy_into_snowflake.rst +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/operators/index.rst +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/operators/snowflake.rst +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/operators/snowpark.rst +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/security.rst +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/LICENSE +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/decorators/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/hooks/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/hooks/snowflake_sql_api.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/operators/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/operators/snowpark.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/transfers/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/triggers/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/triggers/snowflake_trigger.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/utils/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/utils/common.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/utils/openlineage.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/utils/snowpark.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/src/airflow/providers/snowflake/utils/sql_api_generate_jwt.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/conftest.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/system/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/system/snowflake/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/system/snowflake/example_copy_into_snowflake.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/system/snowflake/example_snowflake.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/system/snowflake/example_snowflake_snowflake_op_template_file.sql +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/system/snowflake/example_snowpark_decorator.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/system/snowflake/example_snowpark_operator.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/decorators/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/hooks/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/hooks/test_snowflake_sql_api.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/operators/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/operators/test_snowflake_sql.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/operators/test_snowpark.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/transfers/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/transfers/test_copy_into_snowflake.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/triggers/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/triggers/test_snowflake.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/utils/__init__.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/utils/test_common.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/utils/test_openlineage.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/utils/test_snowpark.py +0 -0
- {apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/tests/unit/snowflake/utils/test_sql_api_generate_jwt.py +0 -0
{apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apache-airflow-providers-snowflake
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.6.0
|
|
4
4
|
Summary: Provider package apache-airflow-providers-snowflake for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,snowflake,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
@@ -21,7 +21,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
22
|
Classifier: Topic :: System :: Monitoring
|
|
23
23
|
Requires-Dist: apache-airflow>=2.10.0
|
|
24
|
-
Requires-Dist: apache-airflow-providers-common-compat>=1.
|
|
24
|
+
Requires-Dist: apache-airflow-providers-common-compat>=1.8.0
|
|
25
25
|
Requires-Dist: apache-airflow-providers-common-sql>=1.27.5
|
|
26
26
|
Requires-Dist: pandas>=2.1.2; python_version <"3.13"
|
|
27
27
|
Requires-Dist: pandas>=2.2.3; python_version >="3.13"
|
|
@@ -29,16 +29,18 @@ Requires-Dist: pyarrow>=16.1.0; python_version < '3.13'
|
|
|
29
29
|
Requires-Dist: pyarrow>=18.0.0; python_version >= '3.13'
|
|
30
30
|
Requires-Dist: snowflake-connector-python>=3.7.1
|
|
31
31
|
Requires-Dist: snowflake-sqlalchemy>=1.4.0
|
|
32
|
-
Requires-Dist: snowflake-snowpark-python>=1.17.0;python_version<'3.12'
|
|
33
|
-
Requires-Dist: snowflake-snowpark-python>=1.27.0,<9999;python_version>='3.12' and python_version<'3.
|
|
32
|
+
Requires-Dist: snowflake-snowpark-python>=1.17.0,<9999;python_version<'3.12'
|
|
33
|
+
Requires-Dist: snowflake-snowpark-python>=1.27.0,<9999;python_version>='3.12' and python_version<'3.14'
|
|
34
|
+
Requires-Dist: apache-airflow-providers-microsoft-azure ; extra == "microsoft-azure"
|
|
34
35
|
Requires-Dist: apache-airflow-providers-openlineage>=2.3.0 ; extra == "openlineage"
|
|
35
36
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
36
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.
|
|
37
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.
|
|
37
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.6.0/changelog.html
|
|
38
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.6.0
|
|
38
39
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
|
39
40
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
40
41
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
41
42
|
Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
43
|
+
Provides-Extra: microsoft-azure
|
|
42
44
|
Provides-Extra: openlineage
|
|
43
45
|
|
|
44
46
|
|
|
@@ -66,7 +68,7 @@ Provides-Extra: openlineage
|
|
|
66
68
|
|
|
67
69
|
Package ``apache-airflow-providers-snowflake``
|
|
68
70
|
|
|
69
|
-
Release: ``6.
|
|
71
|
+
Release: ``6.6.0``
|
|
70
72
|
|
|
71
73
|
|
|
72
74
|
`Snowflake <https://www.snowflake.com/>`__
|
|
@@ -79,7 +81,7 @@ This is a provider package for ``snowflake`` provider. All classes for this prov
|
|
|
79
81
|
are in ``airflow.providers.snowflake`` python package.
|
|
80
82
|
|
|
81
83
|
You can find package information and changelog for the provider
|
|
82
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.
|
|
84
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.6.0/>`_.
|
|
83
85
|
|
|
84
86
|
Installation
|
|
85
87
|
------------
|
|
@@ -97,7 +99,7 @@ Requirements
|
|
|
97
99
|
PIP package Version required
|
|
98
100
|
========================================== ========================================================================
|
|
99
101
|
``apache-airflow`` ``>=2.10.0``
|
|
100
|
-
``apache-airflow-providers-common-compat`` ``>=1.
|
|
102
|
+
``apache-airflow-providers-common-compat`` ``>=1.8.0``
|
|
101
103
|
``apache-airflow-providers-common-sql`` ``>=1.27.5``
|
|
102
104
|
``pandas`` ``>=2.1.2; python_version < "3.13"``
|
|
103
105
|
``pandas`` ``>=2.2.3; python_version >= "3.13"``
|
|
@@ -105,8 +107,8 @@ PIP package Version required
|
|
|
105
107
|
``pyarrow`` ``>=18.0.0; python_version >= "3.13"``
|
|
106
108
|
``snowflake-connector-python`` ``>=3.7.1``
|
|
107
109
|
``snowflake-sqlalchemy`` ``>=1.4.0``
|
|
108
|
-
``snowflake-snowpark-python`` ``>=1.17.0; python_version < "3.12"``
|
|
109
|
-
``snowflake-snowpark-python`` ``>=1.27.0,<9999; python_version >= "3.12" and python_version < "3.
|
|
110
|
+
``snowflake-snowpark-python`` ``>=1.17.0,<9999; python_version < "3.12"``
|
|
111
|
+
``snowflake-snowpark-python`` ``>=1.27.0,<9999; python_version >= "3.12" and python_version < "3.14"``
|
|
110
112
|
========================================== ========================================================================
|
|
111
113
|
|
|
112
114
|
Cross provider package dependencies
|
|
@@ -122,23 +124,25 @@ You can install such cross-provider dependencies when installing from PyPI. For
|
|
|
122
124
|
pip install apache-airflow-providers-snowflake[common.compat]
|
|
123
125
|
|
|
124
126
|
|
|
125
|
-
|
|
126
|
-
Dependent package
|
|
127
|
-
|
|
128
|
-
`apache-airflow-providers-common-compat <https://airflow.apache.org/docs/apache-airflow-providers-common-compat>`_
|
|
129
|
-
`apache-airflow-providers-common-sql <https://airflow.apache.org/docs/apache-airflow-providers-common-sql>`_
|
|
130
|
-
`apache-airflow-providers-
|
|
131
|
-
|
|
127
|
+
====================================================================================================================== ===================
|
|
128
|
+
Dependent package Extra
|
|
129
|
+
====================================================================================================================== ===================
|
|
130
|
+
`apache-airflow-providers-common-compat <https://airflow.apache.org/docs/apache-airflow-providers-common-compat>`_ ``common.compat``
|
|
131
|
+
`apache-airflow-providers-common-sql <https://airflow.apache.org/docs/apache-airflow-providers-common-sql>`_ ``common.sql``
|
|
132
|
+
`apache-airflow-providers-microsoft-azure <https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure>`_ ``microsoft.azure``
|
|
133
|
+
`apache-airflow-providers-openlineage <https://airflow.apache.org/docs/apache-airflow-providers-openlineage>`_ ``openlineage``
|
|
134
|
+
====================================================================================================================== ===================
|
|
132
135
|
|
|
133
136
|
Optional dependencies
|
|
134
137
|
----------------------
|
|
135
138
|
|
|
136
|
-
|
|
137
|
-
Extra
|
|
138
|
-
|
|
139
|
-
``
|
|
140
|
-
|
|
139
|
+
=================== ===============================================
|
|
140
|
+
Extra Dependencies
|
|
141
|
+
=================== ===============================================
|
|
142
|
+
``microsoft.azure`` ``apache-airflow-providers-microsoft-azure``
|
|
143
|
+
``openlineage`` ``apache-airflow-providers-openlineage>=2.3.0``
|
|
144
|
+
=================== ===============================================
|
|
141
145
|
|
|
142
146
|
The changelog for the provider package can be found in the
|
|
143
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.
|
|
147
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.6.0/changelog.html>`_.
|
|
144
148
|
|
{apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/README.rst
RENAMED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
Package ``apache-airflow-providers-snowflake``
|
|
25
25
|
|
|
26
|
-
Release: ``6.
|
|
26
|
+
Release: ``6.6.0``
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
`Snowflake <https://www.snowflake.com/>`__
|
|
@@ -36,7 +36,7 @@ This is a provider package for ``snowflake`` provider. All classes for this prov
|
|
|
36
36
|
are in ``airflow.providers.snowflake`` 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-snowflake/6.
|
|
39
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.6.0/>`_.
|
|
40
40
|
|
|
41
41
|
Installation
|
|
42
42
|
------------
|
|
@@ -54,7 +54,7 @@ Requirements
|
|
|
54
54
|
PIP package Version required
|
|
55
55
|
========================================== ========================================================================
|
|
56
56
|
``apache-airflow`` ``>=2.10.0``
|
|
57
|
-
``apache-airflow-providers-common-compat`` ``>=1.
|
|
57
|
+
``apache-airflow-providers-common-compat`` ``>=1.8.0``
|
|
58
58
|
``apache-airflow-providers-common-sql`` ``>=1.27.5``
|
|
59
59
|
``pandas`` ``>=2.1.2; python_version < "3.13"``
|
|
60
60
|
``pandas`` ``>=2.2.3; python_version >= "3.13"``
|
|
@@ -62,8 +62,8 @@ PIP package Version required
|
|
|
62
62
|
``pyarrow`` ``>=18.0.0; python_version >= "3.13"``
|
|
63
63
|
``snowflake-connector-python`` ``>=3.7.1``
|
|
64
64
|
``snowflake-sqlalchemy`` ``>=1.4.0``
|
|
65
|
-
``snowflake-snowpark-python`` ``>=1.17.0; python_version < "3.12"``
|
|
66
|
-
``snowflake-snowpark-python`` ``>=1.27.0,<9999; python_version >= "3.12" and python_version < "3.
|
|
65
|
+
``snowflake-snowpark-python`` ``>=1.17.0,<9999; python_version < "3.12"``
|
|
66
|
+
``snowflake-snowpark-python`` ``>=1.27.0,<9999; python_version >= "3.12" and python_version < "3.14"``
|
|
67
67
|
========================================== ========================================================================
|
|
68
68
|
|
|
69
69
|
Cross provider package dependencies
|
|
@@ -79,22 +79,24 @@ You can install such cross-provider dependencies when installing from PyPI. For
|
|
|
79
79
|
pip install apache-airflow-providers-snowflake[common.compat]
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
Dependent package
|
|
84
|
-
|
|
85
|
-
`apache-airflow-providers-common-compat <https://airflow.apache.org/docs/apache-airflow-providers-common-compat>`_
|
|
86
|
-
`apache-airflow-providers-common-sql <https://airflow.apache.org/docs/apache-airflow-providers-common-sql>`_
|
|
87
|
-
`apache-airflow-providers-
|
|
88
|
-
|
|
82
|
+
====================================================================================================================== ===================
|
|
83
|
+
Dependent package Extra
|
|
84
|
+
====================================================================================================================== ===================
|
|
85
|
+
`apache-airflow-providers-common-compat <https://airflow.apache.org/docs/apache-airflow-providers-common-compat>`_ ``common.compat``
|
|
86
|
+
`apache-airflow-providers-common-sql <https://airflow.apache.org/docs/apache-airflow-providers-common-sql>`_ ``common.sql``
|
|
87
|
+
`apache-airflow-providers-microsoft-azure <https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure>`_ ``microsoft.azure``
|
|
88
|
+
`apache-airflow-providers-openlineage <https://airflow.apache.org/docs/apache-airflow-providers-openlineage>`_ ``openlineage``
|
|
89
|
+
====================================================================================================================== ===================
|
|
89
90
|
|
|
90
91
|
Optional dependencies
|
|
91
92
|
----------------------
|
|
92
93
|
|
|
93
|
-
|
|
94
|
-
Extra
|
|
95
|
-
|
|
96
|
-
``
|
|
97
|
-
|
|
94
|
+
=================== ===============================================
|
|
95
|
+
Extra Dependencies
|
|
96
|
+
=================== ===============================================
|
|
97
|
+
``microsoft.azure`` ``apache-airflow-providers-microsoft-azure``
|
|
98
|
+
``openlineage`` ``apache-airflow-providers-openlineage>=2.3.0``
|
|
99
|
+
=================== ===============================================
|
|
98
100
|
|
|
99
101
|
The changelog for the provider package can be found in the
|
|
100
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.
|
|
102
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.6.0/changelog.html>`_.
|
|
@@ -27,11 +27,38 @@
|
|
|
27
27
|
Changelog
|
|
28
28
|
---------
|
|
29
29
|
|
|
30
|
-
6.
|
|
30
|
+
6.6.0
|
|
31
31
|
.....
|
|
32
32
|
|
|
33
|
+
Features
|
|
34
|
+
~~~~~~~~
|
|
35
|
+
|
|
36
|
+
* ``Add Azure IAM/Entra ID support for SnowflakeHook (#55874)``
|
|
37
|
+
|
|
38
|
+
Bug Fixes
|
|
39
|
+
~~~~~~~~~
|
|
40
|
+
|
|
41
|
+
* ``Add 'snowflake-snowpark-python' pip resolver hint for Python 3.13 (#56606)``
|
|
42
|
+
|
|
43
|
+
Misc
|
|
44
|
+
~~~~
|
|
45
|
+
|
|
46
|
+
* ``Migrate snowflake provider to ''common.compat'' (#57003)``
|
|
47
|
+
|
|
48
|
+
Doc-only
|
|
49
|
+
~~~~~~~~
|
|
50
|
+
|
|
51
|
+
* ``Fix path of how-to-guide docs for copy_into_snowflake.rst(#56527)``
|
|
52
|
+
* ``Update Snowflake docs with breaking change (#56516)``
|
|
53
|
+
|
|
54
|
+
.. Below changes are excluded from the changelog. Move them to
|
|
55
|
+
appropriate section above if needed. Do not delete the lines(!):
|
|
56
|
+
* ``Enable PT001 rule to prvoider tests (#55935)``
|
|
57
|
+
* ``Remove placeholder Release Date in changelog and index files (#56056)``
|
|
58
|
+
|
|
59
|
+
6.5.4
|
|
60
|
+
.....
|
|
33
61
|
|
|
34
|
-
Release Date: ``|PypiReleaseDate|``
|
|
35
62
|
|
|
36
63
|
Misc
|
|
37
64
|
~~~~
|
|
@@ -45,8 +72,6 @@ Misc
|
|
|
45
72
|
.....
|
|
46
73
|
|
|
47
74
|
|
|
48
|
-
Release Date: ``|PypiReleaseDate|``
|
|
49
|
-
|
|
50
75
|
Bug Fixes
|
|
51
76
|
~~~~~~~~~
|
|
52
77
|
|
|
@@ -196,10 +221,17 @@ Features
|
|
|
196
221
|
|
|
197
222
|
* ``Adding OAuth support for SnowflakeHook (#47191)``
|
|
198
223
|
|
|
224
|
+
Breaking changes
|
|
225
|
+
~~~~~~~~~~~~~~~~
|
|
226
|
+
|
|
227
|
+
.. warning::
|
|
228
|
+
Existing connections using key pairs break as a result of changing the connection string to be base64 encoded.
|
|
229
|
+
|
|
230
|
+
* ``make 'private_key_content' in snowflake connection to be a base64 encoded string (#49467)``
|
|
231
|
+
|
|
199
232
|
Bug Fixes
|
|
200
233
|
~~~~~~~~~
|
|
201
234
|
|
|
202
|
-
* ``make 'private_key_content' in snowflake connection to be a base64 encoded string (#49467)``
|
|
203
235
|
* ``Fix SnowflakeSqlApiHook backwards compatibility for get_oauth_token method (#49482)``
|
|
204
236
|
* ``Fix mypy for get_oauth_token signature in SnowflakeSqlApiHook (#49449)``
|
|
205
237
|
* ``Fix infinite recursive call of _get_conn_params while getting oauth token from snowflake (#50344)``
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
2
|
+
or more contributor license agreements. See the NOTICE file
|
|
3
|
+
distributed with this work for additional information
|
|
4
|
+
regarding copyright ownership. The ASF licenses this file
|
|
5
|
+
to you under the Apache License, Version 2.0 (the
|
|
6
|
+
"License"); you may not use this file except in compliance
|
|
7
|
+
with the License. You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
.. http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
.. Unless required by applicable law or agreed to in writing,
|
|
12
|
+
software distributed under the License is distributed on an
|
|
13
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
KIND, either express or implied. See the License for the
|
|
15
|
+
specific language governing permissions and limitations
|
|
16
|
+
under the License.
|
|
17
|
+
|
|
18
|
+
.. include:: /../../../devel-common/src/sphinx_exts/includes/providers-configurations-ref.rst
|
|
19
|
+
.. include:: /../../../devel-common/src/sphinx_exts/includes/sections-and-options.rst
|
|
@@ -61,6 +61,7 @@ Extra (optional)
|
|
|
61
61
|
* ``token_endpoint``: Specify token endpoint for external OAuth provider.
|
|
62
62
|
* ``grant_type``: Specify grant type for OAuth authentication. Currently supported: ``refresh_token`` (default), ``client_credentials``.
|
|
63
63
|
* ``refresh_token``: Specify refresh_token for OAuth connection.
|
|
64
|
+
* ``azure_conn_id``: Azure Connection ID to be used for retrieving the OAuth token using Azure Entra authentication. Login and Password fields aren't required when using this method. Scope for the Azure OAuth token can be set in the config option ``azure_oauth_scope`` under the section ``[snowflake]``. Requires `apache-airflow-providers-microsoft-azure>=12.8.0`.
|
|
64
65
|
* ``private_key_file``: Specify the path to the private key file.
|
|
65
66
|
* ``private_key_content``: Specify the content of the private key file in base64 encoded format. You can use the following Python code to encode the private key:
|
|
66
67
|
|
{apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/index.rst
RENAMED
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
:maxdepth: 1
|
|
44
44
|
:caption: References
|
|
45
45
|
|
|
46
|
+
Configuration <configurations-ref>
|
|
46
47
|
Python API <_api/airflow/providers/snowflake/index>
|
|
47
48
|
|
|
48
49
|
.. toctree::
|
|
@@ -78,7 +79,7 @@ apache-airflow-providers-snowflake package
|
|
|
78
79
|
`Snowflake <https://www.snowflake.com/>`__
|
|
79
80
|
|
|
80
81
|
|
|
81
|
-
Release: 6.
|
|
82
|
+
Release: 6.6.0
|
|
82
83
|
|
|
83
84
|
Provider package
|
|
84
85
|
----------------
|
|
@@ -102,7 +103,7 @@ The minimum Apache Airflow version supported by this provider distribution is ``
|
|
|
102
103
|
PIP package Version required
|
|
103
104
|
========================================== ========================================================================
|
|
104
105
|
``apache-airflow`` ``>=2.10.0``
|
|
105
|
-
``apache-airflow-providers-common-compat`` ``>=1.
|
|
106
|
+
``apache-airflow-providers-common-compat`` ``>=1.8.0``
|
|
106
107
|
``apache-airflow-providers-common-sql`` ``>=1.27.5``
|
|
107
108
|
``pandas`` ``>=2.1.2; python_version < "3.13"``
|
|
108
109
|
``pandas`` ``>=2.2.3; python_version >= "3.13"``
|
|
@@ -110,8 +111,8 @@ PIP package Version required
|
|
|
110
111
|
``pyarrow`` ``>=18.0.0; python_version >= "3.13"``
|
|
111
112
|
``snowflake-connector-python`` ``>=3.7.1``
|
|
112
113
|
``snowflake-sqlalchemy`` ``>=1.4.0``
|
|
113
|
-
``snowflake-snowpark-python`` ``>=1.17.0; python_version < "3.12"``
|
|
114
|
-
``snowflake-snowpark-python`` ``>=1.27.0,<9999; python_version >= "3.12" and python_version < "3.
|
|
114
|
+
``snowflake-snowpark-python`` ``>=1.17.0,<9999; python_version < "3.12"``
|
|
115
|
+
``snowflake-snowpark-python`` ``>=1.27.0,<9999; python_version >= "3.12" and python_version < "3.14"``
|
|
115
116
|
========================================== ========================================================================
|
|
116
117
|
|
|
117
118
|
Cross provider package dependencies
|
|
@@ -127,13 +128,14 @@ You can install such cross-provider dependencies when installing from PyPI. For
|
|
|
127
128
|
pip install apache-airflow-providers-snowflake[common.compat]
|
|
128
129
|
|
|
129
130
|
|
|
130
|
-
|
|
131
|
-
Dependent package
|
|
132
|
-
|
|
133
|
-
`apache-airflow-providers-common-compat <https://airflow.apache.org/docs/apache-airflow-providers-common-compat>`_
|
|
134
|
-
`apache-airflow-providers-common-sql <https://airflow.apache.org/docs/apache-airflow-providers-common-sql>`_
|
|
135
|
-
`apache-airflow-providers-
|
|
136
|
-
|
|
131
|
+
====================================================================================================================== ===================
|
|
132
|
+
Dependent package Extra
|
|
133
|
+
====================================================================================================================== ===================
|
|
134
|
+
`apache-airflow-providers-common-compat <https://airflow.apache.org/docs/apache-airflow-providers-common-compat>`_ ``common.compat``
|
|
135
|
+
`apache-airflow-providers-common-sql <https://airflow.apache.org/docs/apache-airflow-providers-common-sql>`_ ``common.sql``
|
|
136
|
+
`apache-airflow-providers-microsoft-azure <https://airflow.apache.org/docs/apache-airflow-providers-microsoft-azure>`_ ``microsoft.azure``
|
|
137
|
+
`apache-airflow-providers-openlineage <https://airflow.apache.org/docs/apache-airflow-providers-openlineage>`_ ``openlineage``
|
|
138
|
+
====================================================================================================================== ===================
|
|
137
139
|
|
|
138
140
|
Downloading official packages
|
|
139
141
|
-----------------------------
|
|
@@ -141,5 +143,5 @@ Downloading official packages
|
|
|
141
143
|
You can download officially released packages and verify their checksums and signatures from the
|
|
142
144
|
`Official Apache Download site <https://downloads.apache.org/airflow/providers/>`_
|
|
143
145
|
|
|
144
|
-
* `The apache-airflow-providers-snowflake 6.
|
|
145
|
-
* `The apache-airflow-providers-snowflake 6.
|
|
146
|
+
* `The apache-airflow-providers-snowflake 6.6.0 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.6.0.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.6.0.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.6.0.tar.gz.sha512>`__)
|
|
147
|
+
* `The apache-airflow-providers-snowflake 6.6.0 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.6.0-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.6.0-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.6.0-py3-none-any.whl.sha512>`__)
|
{apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/provider.yaml
RENAMED
|
@@ -22,12 +22,13 @@ description: |
|
|
|
22
22
|
`Snowflake <https://www.snowflake.com/>`__
|
|
23
23
|
|
|
24
24
|
state: ready
|
|
25
|
-
source-date-epoch:
|
|
25
|
+
source-date-epoch: 1761117514
|
|
26
26
|
# Note that those versions are maintained by release manager - do not update them manually
|
|
27
27
|
# with the exception of case where other provider in sources has >= new provider version.
|
|
28
28
|
# In such case adding >= NEW_VERSION and bumping to NEW_VERSION in a provider have
|
|
29
29
|
# to be done in the same PR
|
|
30
30
|
versions:
|
|
31
|
+
- 6.6.0
|
|
31
32
|
- 6.5.4
|
|
32
33
|
- 6.5.3
|
|
33
34
|
- 6.5.2
|
|
@@ -129,9 +130,11 @@ transfers:
|
|
|
129
130
|
- source-integration-name: Google Cloud Storage (GCS)
|
|
130
131
|
target-integration-name: Snowflake
|
|
131
132
|
python-module: airflow.providers.snowflake.transfers.copy_into_snowflake
|
|
133
|
+
how-to-guide: /docs/apache-airflow-providers-snowflake/operators/copy_into_snowflake.rst
|
|
132
134
|
- source-integration-name: Microsoft Azure Blob Storage
|
|
133
135
|
target-integration-name: Snowflake
|
|
134
136
|
python-module: airflow.providers.snowflake.transfers.copy_into_snowflake
|
|
137
|
+
how-to-guide: /docs/apache-airflow-providers-snowflake/operators/copy_into_snowflake.rst
|
|
135
138
|
|
|
136
139
|
connection-types:
|
|
137
140
|
- hook-class-name: airflow.providers.snowflake.hooks.snowflake.SnowflakeHook
|
|
@@ -141,3 +144,16 @@ triggers:
|
|
|
141
144
|
- integration-name: Snowflake
|
|
142
145
|
python-modules:
|
|
143
146
|
- airflow.providers.snowflake.triggers.snowflake_trigger
|
|
147
|
+
|
|
148
|
+
config:
|
|
149
|
+
snowflake:
|
|
150
|
+
description: |
|
|
151
|
+
Configuration for Snowflake hooks and operators.
|
|
152
|
+
options:
|
|
153
|
+
azure_oauth_scope:
|
|
154
|
+
description: |
|
|
155
|
+
The scope to use while retrieving OAuth token for Snowflake from Azure Entra authentication.
|
|
156
|
+
version_added: 6.6.0
|
|
157
|
+
type: string
|
|
158
|
+
example: ~
|
|
159
|
+
default: "api://snowflake_oauth_server/.default"
|
{apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/pyproject.toml
RENAMED
|
@@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"
|
|
|
25
25
|
|
|
26
26
|
[project]
|
|
27
27
|
name = "apache-airflow-providers-snowflake"
|
|
28
|
-
version = "6.
|
|
28
|
+
version = "6.6.0"
|
|
29
29
|
description = "Provider package apache-airflow-providers-snowflake for Apache Airflow"
|
|
30
30
|
readme = "README.rst"
|
|
31
31
|
authors = [
|
|
@@ -58,7 +58,7 @@ requires-python = ">=3.10"
|
|
|
58
58
|
# After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
|
|
59
59
|
dependencies = [
|
|
60
60
|
"apache-airflow>=2.10.0",
|
|
61
|
-
"apache-airflow-providers-common-compat>=1.
|
|
61
|
+
"apache-airflow-providers-common-compat>=1.8.0",
|
|
62
62
|
"apache-airflow-providers-common-sql>=1.27.5",
|
|
63
63
|
'pandas>=2.1.2; python_version <"3.13"',
|
|
64
64
|
'pandas>=2.2.3; python_version >="3.13"',
|
|
@@ -66,15 +66,18 @@ dependencies = [
|
|
|
66
66
|
"pyarrow>=18.0.0; python_version >= '3.13'",
|
|
67
67
|
"snowflake-connector-python>=3.7.1",
|
|
68
68
|
"snowflake-sqlalchemy>=1.4.0",
|
|
69
|
-
"snowflake-snowpark-python>=1.17.0;python_version<'3.12'",
|
|
70
69
|
# The "<9999" is a hint to the pip resolver to resolve this requirement early,
|
|
71
70
|
# can be removed when the pip resolver is improved
|
|
72
|
-
"snowflake-snowpark-python>=1.
|
|
71
|
+
"snowflake-snowpark-python>=1.17.0,<9999;python_version<'3.12'",
|
|
72
|
+
"snowflake-snowpark-python>=1.27.0,<9999;python_version>='3.12' and python_version<'3.14'",
|
|
73
73
|
]
|
|
74
74
|
|
|
75
75
|
# The optional dependencies should be modified in place in the generated file
|
|
76
76
|
# Any change in the dependencies is preserved when the file is regenerated
|
|
77
77
|
[project.optional-dependencies]
|
|
78
|
+
"microsoft.azure" = [
|
|
79
|
+
"apache-airflow-providers-microsoft-azure"
|
|
80
|
+
]
|
|
78
81
|
"openlineage" = [
|
|
79
82
|
"apache-airflow-providers-openlineage>=2.3.0"
|
|
80
83
|
]
|
|
@@ -86,6 +89,7 @@ dev = [
|
|
|
86
89
|
"apache-airflow-devel-common",
|
|
87
90
|
"apache-airflow-providers-common-compat",
|
|
88
91
|
"apache-airflow-providers-common-sql",
|
|
92
|
+
"apache-airflow-providers-microsoft-azure",
|
|
89
93
|
"apache-airflow-providers-openlineage",
|
|
90
94
|
# Additional devel dependencies (do not remove this line and add extra development dependencies)
|
|
91
95
|
"responses>=0.25.0",
|
|
@@ -117,8 +121,8 @@ apache-airflow-providers-common-sql = {workspace = true}
|
|
|
117
121
|
apache-airflow-providers-standard = {workspace = true}
|
|
118
122
|
|
|
119
123
|
[project.urls]
|
|
120
|
-
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.
|
|
121
|
-
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.
|
|
124
|
+
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.6.0"
|
|
125
|
+
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.6.0/changelog.html"
|
|
122
126
|
"Bug Tracker" = "https://github.com/apache/airflow/issues"
|
|
123
127
|
"Source Code" = "https://github.com/apache/airflow"
|
|
124
128
|
"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__ = "6.
|
|
32
|
+
__version__ = "6.6.0"
|
|
33
33
|
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
35
35
|
"2.10.0"
|
|
@@ -18,21 +18,11 @@
|
|
|
18
18
|
from __future__ import annotations
|
|
19
19
|
|
|
20
20
|
from collections.abc import Callable, Sequence
|
|
21
|
-
from typing import TYPE_CHECKING
|
|
22
|
-
|
|
23
|
-
from airflow.providers.snowflake.version_compat import AIRFLOW_V_3_0_PLUS
|
|
24
|
-
|
|
25
|
-
if AIRFLOW_V_3_0_PLUS:
|
|
26
|
-
from airflow.sdk.bases.decorator import DecoratedOperator, task_decorator_factory
|
|
27
|
-
else:
|
|
28
|
-
from airflow.decorators.base import DecoratedOperator, task_decorator_factory # type: ignore[no-redef]
|
|
29
21
|
|
|
22
|
+
from airflow.providers.common.compat.sdk import DecoratedOperator, TaskDecorator, task_decorator_factory
|
|
30
23
|
from airflow.providers.snowflake.operators.snowpark import SnowparkOperator
|
|
31
24
|
from airflow.providers.snowflake.utils.snowpark import inject_session_into_op_kwargs
|
|
32
25
|
|
|
33
|
-
if TYPE_CHECKING:
|
|
34
|
-
from airflow.sdk.bases.decorator import TaskDecorator
|
|
35
|
-
|
|
36
26
|
|
|
37
27
|
class _SnowparkDecoratedOperator(DecoratedOperator, SnowparkOperator):
|
|
38
28
|
"""
|
|
@@ -73,11 +73,13 @@ def get_provider_info():
|
|
|
73
73
|
"source-integration-name": "Google Cloud Storage (GCS)",
|
|
74
74
|
"target-integration-name": "Snowflake",
|
|
75
75
|
"python-module": "airflow.providers.snowflake.transfers.copy_into_snowflake",
|
|
76
|
+
"how-to-guide": "/docs/apache-airflow-providers-snowflake/operators/copy_into_snowflake.rst",
|
|
76
77
|
},
|
|
77
78
|
{
|
|
78
79
|
"source-integration-name": "Microsoft Azure Blob Storage",
|
|
79
80
|
"target-integration-name": "Snowflake",
|
|
80
81
|
"python-module": "airflow.providers.snowflake.transfers.copy_into_snowflake",
|
|
82
|
+
"how-to-guide": "/docs/apache-airflow-providers-snowflake/operators/copy_into_snowflake.rst",
|
|
81
83
|
},
|
|
82
84
|
],
|
|
83
85
|
"connection-types": [
|
|
@@ -92,4 +94,18 @@ def get_provider_info():
|
|
|
92
94
|
"python-modules": ["airflow.providers.snowflake.triggers.snowflake_trigger"],
|
|
93
95
|
}
|
|
94
96
|
],
|
|
97
|
+
"config": {
|
|
98
|
+
"snowflake": {
|
|
99
|
+
"description": "Configuration for Snowflake hooks and operators.\n",
|
|
100
|
+
"options": {
|
|
101
|
+
"azure_oauth_scope": {
|
|
102
|
+
"description": "The scope to use while retrieving OAuth token for Snowflake from Azure Entra authentication.\n",
|
|
103
|
+
"version_added": "6.6.0",
|
|
104
|
+
"type": "string",
|
|
105
|
+
"example": None,
|
|
106
|
+
"default": "api://snowflake_oauth_server/.default",
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
}
|
|
110
|
+
},
|
|
95
111
|
}
|
|
@@ -36,7 +36,9 @@ from snowflake.connector import DictCursor, SnowflakeConnection, util_text
|
|
|
36
36
|
from snowflake.sqlalchemy import URL
|
|
37
37
|
from sqlalchemy import create_engine
|
|
38
38
|
|
|
39
|
+
from airflow.configuration import conf
|
|
39
40
|
from airflow.exceptions import AirflowException
|
|
41
|
+
from airflow.providers.common.compat.sdk import Connection
|
|
40
42
|
from airflow.providers.common.sql.hooks.handlers import return_single_query_results
|
|
41
43
|
from airflow.providers.common.sql.hooks.sql import DbApiHook
|
|
42
44
|
from airflow.providers.snowflake.utils.openlineage import fix_snowflake_sqlalchemy_uri
|
|
@@ -94,6 +96,7 @@ class SnowflakeHook(DbApiHook):
|
|
|
94
96
|
hook_name = "Snowflake"
|
|
95
97
|
supports_autocommit = True
|
|
96
98
|
_test_connection_sql = "select 1"
|
|
99
|
+
default_azure_oauth_scope = "api://snowflake_oauth_server/.default"
|
|
97
100
|
|
|
98
101
|
@classmethod
|
|
99
102
|
def get_connection_form_widgets(cls) -> dict[str, Any]:
|
|
@@ -246,6 +249,40 @@ class SnowflakeHook(DbApiHook):
|
|
|
246
249
|
token = response.json()["access_token"]
|
|
247
250
|
return token
|
|
248
251
|
|
|
252
|
+
def get_azure_oauth_token(self, azure_conn_id: str) -> str:
|
|
253
|
+
"""
|
|
254
|
+
Generate OAuth access token using Azure connection id.
|
|
255
|
+
|
|
256
|
+
This uses AzureBaseHook on the connection id to retrieve the token. Scope for the OAuth token can be
|
|
257
|
+
set in the config option ``azure_oauth_scope`` under the section ``[snowflake]``.
|
|
258
|
+
|
|
259
|
+
:param azure_conn_id: The connection id for the Azure connection that will be used to fetch the token.
|
|
260
|
+
:raises AttributeError: If AzureBaseHook does not have a get_token method which happens when
|
|
261
|
+
package apache-airflow-providers-microsoft-azure<12.8.0.
|
|
262
|
+
:returns: The OAuth access token string.
|
|
263
|
+
"""
|
|
264
|
+
if TYPE_CHECKING:
|
|
265
|
+
from airflow.providers.microsoft.azure.hooks.azure_base import AzureBaseHook
|
|
266
|
+
|
|
267
|
+
try:
|
|
268
|
+
azure_conn = Connection.get(azure_conn_id)
|
|
269
|
+
except AttributeError:
|
|
270
|
+
azure_conn = Connection.get_connection_from_secrets(azure_conn_id) # type: ignore[attr-defined]
|
|
271
|
+
azure_base_hook: AzureBaseHook = azure_conn.get_hook()
|
|
272
|
+
scope = conf.get("snowflake", "azure_oauth_scope", fallback=self.default_azure_oauth_scope)
|
|
273
|
+
try:
|
|
274
|
+
token = azure_base_hook.get_token(scope).token
|
|
275
|
+
except AttributeError as e:
|
|
276
|
+
if e.name == "get_token" and e.obj == azure_base_hook:
|
|
277
|
+
raise AttributeError(
|
|
278
|
+
"'AzureBaseHook' object has no attribute 'get_token'. "
|
|
279
|
+
"Please upgrade apache-airflow-providers-microsoft-azure>=12.8.0",
|
|
280
|
+
name=e.name,
|
|
281
|
+
obj=e.obj,
|
|
282
|
+
) from e
|
|
283
|
+
raise
|
|
284
|
+
return token
|
|
285
|
+
|
|
249
286
|
@cached_property
|
|
250
287
|
def _get_conn_params(self) -> dict[str, str | None]:
|
|
251
288
|
"""
|
|
@@ -349,14 +386,17 @@ class SnowflakeHook(DbApiHook):
|
|
|
349
386
|
conn_config["authenticator"] = "oauth"
|
|
350
387
|
|
|
351
388
|
if conn_config.get("authenticator") == "oauth":
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
conn_config=
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
389
|
+
if extra_dict.get("azure_conn_id"):
|
|
390
|
+
conn_config["token"] = self.get_azure_oauth_token(extra_dict["azure_conn_id"])
|
|
391
|
+
else:
|
|
392
|
+
token_endpoint = self._get_field(extra_dict, "token_endpoint") or ""
|
|
393
|
+
conn_config["client_id"] = conn.login
|
|
394
|
+
conn_config["client_secret"] = conn.password
|
|
395
|
+
conn_config["token"] = self.get_oauth_token(
|
|
396
|
+
conn_config=conn_config,
|
|
397
|
+
token_endpoint=token_endpoint,
|
|
398
|
+
grant_type=extra_dict.get("grant_type", "refresh_token"),
|
|
399
|
+
)
|
|
360
400
|
|
|
361
401
|
conn_config.pop("login", None)
|
|
362
402
|
conn_config.pop("user", None)
|
|
@@ -35,11 +35,7 @@ from airflow.providers.snowflake.hooks.snowflake_sql_api import SnowflakeSqlApiH
|
|
|
35
35
|
from airflow.providers.snowflake.triggers.snowflake_trigger import SnowflakeSqlApiTrigger
|
|
36
36
|
|
|
37
37
|
if TYPE_CHECKING:
|
|
38
|
-
|
|
39
|
-
from airflow.sdk.definitions.context import Context
|
|
40
|
-
except ImportError:
|
|
41
|
-
# TODO: Remove once provider drops support for Airflow 2
|
|
42
|
-
from airflow.utils.context import Context
|
|
38
|
+
from airflow.providers.common.compat.sdk import Context
|
|
43
39
|
|
|
44
40
|
|
|
45
41
|
class SnowflakeCheckOperator(SQLCheckOperator):
|
|
@@ -22,9 +22,9 @@ from __future__ import annotations
|
|
|
22
22
|
from collections.abc import Sequence
|
|
23
23
|
from typing import Any
|
|
24
24
|
|
|
25
|
+
from airflow.providers.common.compat.sdk import BaseOperator
|
|
25
26
|
from airflow.providers.snowflake.hooks.snowflake import SnowflakeHook
|
|
26
27
|
from airflow.providers.snowflake.utils.common import enclose_param
|
|
27
|
-
from airflow.providers.snowflake.version_compat import BaseOperator
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
def _validate_parameter(param_name: str, value: str | None) -> str | None:
|
|
@@ -34,12 +34,6 @@ def get_base_airflow_version_tuple() -> tuple[int, int, int]:
|
|
|
34
34
|
|
|
35
35
|
AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)
|
|
36
36
|
|
|
37
|
-
if AIRFLOW_V_3_0_PLUS:
|
|
38
|
-
from airflow.sdk import BaseOperator
|
|
39
|
-
else:
|
|
40
|
-
from airflow.models import BaseOperator
|
|
41
|
-
|
|
42
37
|
__all__ = [
|
|
43
38
|
"AIRFLOW_V_3_0_PLUS",
|
|
44
|
-
"BaseOperator",
|
|
45
39
|
]
|
|
@@ -26,12 +26,7 @@ import pytest
|
|
|
26
26
|
pytest.importorskip("snowflake-snowpark-python")
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
from
|
|
30
|
-
|
|
31
|
-
if AIRFLOW_V_3_0_PLUS:
|
|
32
|
-
from airflow.sdk import task
|
|
33
|
-
else:
|
|
34
|
-
from airflow.decorators import task # type: ignore[attr-defined,no-redef]
|
|
29
|
+
from airflow.providers.common.compat.sdk import task
|
|
35
30
|
from airflow.utils import timezone
|
|
36
31
|
|
|
37
32
|
from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS
|
|
@@ -666,6 +666,44 @@ class TestPytestSnowflakeHook:
|
|
|
666
666
|
assert "region" in conn_params_extra_keys
|
|
667
667
|
assert "account" in conn_params_extra_keys
|
|
668
668
|
|
|
669
|
+
def test_get_conn_params_should_support_oauth_with_azure_conn_id(self, mocker):
|
|
670
|
+
azure_conn_id = "azure_test_conn"
|
|
671
|
+
mock_azure_token = "azure_test_token"
|
|
672
|
+
connection_kwargs = {
|
|
673
|
+
"extra": {
|
|
674
|
+
"database": "db",
|
|
675
|
+
"account": "airflow",
|
|
676
|
+
"region": "af_region",
|
|
677
|
+
"warehouse": "af_wh",
|
|
678
|
+
"authenticator": "oauth",
|
|
679
|
+
"azure_conn_id": azure_conn_id,
|
|
680
|
+
},
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
mock_connection_class = mocker.patch("airflow.providers.snowflake.hooks.snowflake.Connection")
|
|
684
|
+
mock_azure_base_hook = mock_connection_class.get.return_value.get_hook.return_value
|
|
685
|
+
mock_azure_base_hook.get_token.return_value.token = mock_azure_token
|
|
686
|
+
|
|
687
|
+
with mock.patch.dict("os.environ", AIRFLOW_CONN_TEST_CONN=Connection(**connection_kwargs).get_uri()):
|
|
688
|
+
hook = SnowflakeHook(snowflake_conn_id="test_conn")
|
|
689
|
+
conn_params = hook._get_conn_params
|
|
690
|
+
|
|
691
|
+
# Check AzureBaseHook initialization and get_token call args
|
|
692
|
+
mock_connection_class.get.assert_called_once_with(azure_conn_id)
|
|
693
|
+
mock_azure_base_hook.get_token.assert_called_once_with(SnowflakeHook.default_azure_oauth_scope)
|
|
694
|
+
|
|
695
|
+
assert "authenticator" in conn_params
|
|
696
|
+
assert conn_params["authenticator"] == "oauth"
|
|
697
|
+
assert "token" in conn_params
|
|
698
|
+
assert conn_params["token"] == mock_azure_token
|
|
699
|
+
|
|
700
|
+
assert "user" not in conn_params
|
|
701
|
+
assert "password" not in conn_params
|
|
702
|
+
assert "refresh_token" not in conn_params
|
|
703
|
+
# Mandatory fields to generate account_identifier `https://<account>.<region>`
|
|
704
|
+
assert "region" in conn_params
|
|
705
|
+
assert "account" in conn_params
|
|
706
|
+
|
|
669
707
|
def test_should_add_partner_info(self):
|
|
670
708
|
with mock.patch.dict(
|
|
671
709
|
"os.environ",
|
|
@@ -879,9 +917,8 @@ class TestPytestSnowflakeHook:
|
|
|
879
917
|
hook = SnowflakeHook()
|
|
880
918
|
|
|
881
919
|
for empty_statement in ([], "", "\n"):
|
|
882
|
-
with pytest.raises(ValueError
|
|
920
|
+
with pytest.raises(ValueError, match="List of SQL statements is empty"):
|
|
883
921
|
hook.run(sql=empty_statement)
|
|
884
|
-
assert err.value.args[0] == "List of SQL statements is empty"
|
|
885
922
|
|
|
886
923
|
def test_get_openlineage_default_schema_with_no_schema_set(self):
|
|
887
924
|
connection_kwargs = {
|
|
@@ -1055,3 +1092,44 @@ class TestPytestSnowflakeHook:
|
|
|
1055
1092
|
headers={"Content-Type": "application/x-www-form-urlencoded"},
|
|
1056
1093
|
auth=basic_auth,
|
|
1057
1094
|
)
|
|
1095
|
+
|
|
1096
|
+
def test_get_azure_oauth_token(self, mocker):
|
|
1097
|
+
"""Test get_azure_oauth_token method gets token from provided connection id"""
|
|
1098
|
+
azure_conn_id = "azure_test_conn"
|
|
1099
|
+
mock_azure_token = "azure_test_token"
|
|
1100
|
+
|
|
1101
|
+
mock_connection_class = mocker.patch("airflow.providers.snowflake.hooks.snowflake.Connection")
|
|
1102
|
+
mock_azure_base_hook = mock_connection_class.get.return_value.get_hook.return_value
|
|
1103
|
+
mock_azure_base_hook.get_token.return_value.token = mock_azure_token
|
|
1104
|
+
|
|
1105
|
+
hook = SnowflakeHook(snowflake_conn_id="mock_conn_id")
|
|
1106
|
+
token = hook.get_azure_oauth_token(azure_conn_id)
|
|
1107
|
+
|
|
1108
|
+
# Check AzureBaseHook initialization and get_token call args
|
|
1109
|
+
mock_connection_class.get.assert_called_once_with(azure_conn_id)
|
|
1110
|
+
mock_azure_base_hook.get_token.assert_called_once_with(SnowflakeHook.default_azure_oauth_scope)
|
|
1111
|
+
assert token == mock_azure_token
|
|
1112
|
+
|
|
1113
|
+
def test_get_azure_oauth_token_expect_failure_on_get_token(self, mocker):
|
|
1114
|
+
"""Test get_azure_oauth_token method gets token from provided connection id"""
|
|
1115
|
+
|
|
1116
|
+
class MockAzureBaseHookWithoutGetToken:
|
|
1117
|
+
def __init__(self):
|
|
1118
|
+
pass
|
|
1119
|
+
|
|
1120
|
+
azure_conn_id = "azure_test_conn"
|
|
1121
|
+
mock_connection_class = mocker.patch("airflow.providers.snowflake.hooks.snowflake.Connection")
|
|
1122
|
+
mock_connection_class.get.return_value.get_hook.return_value = MockAzureBaseHookWithoutGetToken()
|
|
1123
|
+
|
|
1124
|
+
hook = SnowflakeHook(snowflake_conn_id="mock_conn_id")
|
|
1125
|
+
with pytest.raises(
|
|
1126
|
+
AttributeError,
|
|
1127
|
+
match=(
|
|
1128
|
+
"'AzureBaseHook' object has no attribute 'get_token'. "
|
|
1129
|
+
"Please upgrade apache-airflow-providers-microsoft-azure>="
|
|
1130
|
+
),
|
|
1131
|
+
):
|
|
1132
|
+
hook.get_azure_oauth_token(azure_conn_id)
|
|
1133
|
+
|
|
1134
|
+
# Check AzureBaseHook initialization
|
|
1135
|
+
mock_connection_class.get.assert_called_once_with(azure_conn_id)
|
|
@@ -244,6 +244,5 @@ def test_query(
|
|
|
244
244
|
def test_no_query(empty_statement):
|
|
245
245
|
dbapi_hook = SnowflakeHookForTests()
|
|
246
246
|
dbapi_hook.get_conn.return_value.cursor.rowcount = 0
|
|
247
|
-
with pytest.raises(ValueError
|
|
247
|
+
with pytest.raises(ValueError, match="List of SQL statements is empty"):
|
|
248
248
|
dbapi_hook.run(sql=empty_statement)
|
|
249
|
-
assert err.value.args[0] == "List of SQL statements is empty"
|
|
@@ -40,12 +40,7 @@ from airflow.utils.types import DagRunType
|
|
|
40
40
|
|
|
41
41
|
from tests_common.test_utils.dag import sync_dag_to_db
|
|
42
42
|
from tests_common.test_utils.db import clear_db_dag_bundles, clear_db_dags, clear_db_runs
|
|
43
|
-
from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS,
|
|
44
|
-
|
|
45
|
-
if AIRFLOW_V_3_1_PLUS:
|
|
46
|
-
from airflow.sdk import timezone
|
|
47
|
-
else:
|
|
48
|
-
from airflow.utils import timezone # type: ignore[attr-defined,no-redef]
|
|
43
|
+
from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS, timezone
|
|
49
44
|
|
|
50
45
|
DEFAULT_DATE = timezone.datetime(2015, 1, 1)
|
|
51
46
|
DEFAULT_DATE_ISO = DEFAULT_DATE.isoformat()
|
|
File without changes
|
|
File without changes
|
{apache_airflow_providers_snowflake-6.5.4 → apache_airflow_providers_snowflake-6.6.0}/docs/conf.py
RENAMED
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|