apache-airflow-providers-snowflake 5.5.2rc1__tar.gz → 5.6.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-snowflake might be problematic. Click here for more details.
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/PKG-INFO +6 -6
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/README.rst +3 -3
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/__init__.py +1 -1
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/get_provider_info.py +2 -1
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/hooks/snowflake.py +17 -5
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/transfers/copy_into_snowflake.py +2 -1
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/utils/openlineage.py +2 -1
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/pyproject.toml +3 -3
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/LICENSE +0 -0
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/hooks/__init__.py +0 -0
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/hooks/snowflake_sql_api.py +0 -0
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/operators/__init__.py +0 -0
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/operators/snowflake.py +0 -0
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/transfers/__init__.py +0 -0
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/triggers/__init__.py +0 -0
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/triggers/snowflake_trigger.py +0 -0
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/utils/__init__.py +0 -0
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/utils/common.py +0 -0
- {apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/airflow/providers/snowflake/utils/sql_api_generate_jwt.py +0 -0
{apache_airflow_providers_snowflake-5.5.2rc1 → apache_airflow_providers_snowflake-5.6.0rc1}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: apache-airflow-providers-snowflake
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.6.0rc1
|
|
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>
|
|
@@ -31,8 +31,8 @@ Requires-Dist: snowflake-sqlalchemy>=1.4.0
|
|
|
31
31
|
Requires-Dist: apache-airflow-providers-common-sql ; extra == "common.sql"
|
|
32
32
|
Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
|
|
33
33
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
34
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.
|
|
35
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.
|
|
34
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.6.0/changelog.html
|
|
35
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.6.0
|
|
36
36
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
37
37
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
38
38
|
Project-URL: Twitter, https://twitter.com/ApacheAirflow
|
|
@@ -84,7 +84,7 @@ Provides-Extra: openlineage
|
|
|
84
84
|
|
|
85
85
|
Package ``apache-airflow-providers-snowflake``
|
|
86
86
|
|
|
87
|
-
Release: ``5.
|
|
87
|
+
Release: ``5.6.0.rc1``
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
`Snowflake <https://www.snowflake.com/>`__
|
|
@@ -97,7 +97,7 @@ This is a provider package for ``snowflake`` provider. All classes for this prov
|
|
|
97
97
|
are in ``airflow.providers.snowflake`` python package.
|
|
98
98
|
|
|
99
99
|
You can find package information and changelog for the provider
|
|
100
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.
|
|
100
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.6.0/>`_.
|
|
101
101
|
|
|
102
102
|
Installation
|
|
103
103
|
------------
|
|
@@ -144,4 +144,4 @@ Dependent package
|
|
|
144
144
|
============================================================================================================== ===============
|
|
145
145
|
|
|
146
146
|
The changelog for the provider package can be found in the
|
|
147
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.
|
|
147
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.6.0/changelog.html>`_.
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
Package ``apache-airflow-providers-snowflake``
|
|
44
44
|
|
|
45
|
-
Release: ``5.
|
|
45
|
+
Release: ``5.6.0.rc1``
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
`Snowflake <https://www.snowflake.com/>`__
|
|
@@ -55,7 +55,7 @@ This is a provider package for ``snowflake`` provider. All classes for this prov
|
|
|
55
55
|
are in ``airflow.providers.snowflake`` python package.
|
|
56
56
|
|
|
57
57
|
You can find package information and changelog for the provider
|
|
58
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.
|
|
58
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.6.0/>`_.
|
|
59
59
|
|
|
60
60
|
Installation
|
|
61
61
|
------------
|
|
@@ -102,4 +102,4 @@ Dependent package
|
|
|
102
102
|
============================================================================================================== ===============
|
|
103
103
|
|
|
104
104
|
The changelog for the provider package can be found in the
|
|
105
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.
|
|
105
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.6.0/changelog.html>`_.
|
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "5.
|
|
32
|
+
__version__ = "5.6.0"
|
|
33
33
|
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
35
35
|
"2.7.0"
|
|
@@ -28,8 +28,9 @@ def get_provider_info():
|
|
|
28
28
|
"name": "Snowflake",
|
|
29
29
|
"description": "`Snowflake <https://www.snowflake.com/>`__\n",
|
|
30
30
|
"state": "ready",
|
|
31
|
-
"source-date-epoch":
|
|
31
|
+
"source-date-epoch": 1720423840,
|
|
32
32
|
"versions": [
|
|
33
|
+
"5.6.0",
|
|
33
34
|
"5.5.2",
|
|
34
35
|
"5.5.1",
|
|
35
36
|
"5.5.0",
|
|
@@ -50,7 +50,8 @@ def _try_to_boolean(value: Any):
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
class SnowflakeHook(DbApiHook):
|
|
53
|
-
"""
|
|
53
|
+
"""
|
|
54
|
+
A client to interact with Snowflake.
|
|
54
55
|
|
|
55
56
|
This hook requires the snowflake_conn_id connection. The snowflake account, login,
|
|
56
57
|
and, password field must be setup in the connection. Other inputs can be defined
|
|
@@ -128,6 +129,7 @@ class SnowflakeHook(DbApiHook):
|
|
|
128
129
|
"authenticator": "snowflake oauth",
|
|
129
130
|
"private_key_file": "private key",
|
|
130
131
|
"session_parameters": "session parameters",
|
|
132
|
+
"client_request_mfa_token": "client request mfa token",
|
|
131
133
|
},
|
|
132
134
|
indent=1,
|
|
133
135
|
),
|
|
@@ -155,6 +157,7 @@ class SnowflakeHook(DbApiHook):
|
|
|
155
157
|
self.schema = kwargs.pop("schema", None)
|
|
156
158
|
self.authenticator = kwargs.pop("authenticator", None)
|
|
157
159
|
self.session_parameters = kwargs.pop("session_parameters", None)
|
|
160
|
+
self.client_request_mfa_token = kwargs.pop("client_request_mfa_token", None)
|
|
158
161
|
self.query_ids: list[str] = []
|
|
159
162
|
|
|
160
163
|
def _get_field(self, extra_dict, field_name):
|
|
@@ -181,7 +184,8 @@ class SnowflakeHook(DbApiHook):
|
|
|
181
184
|
|
|
182
185
|
@cached_property
|
|
183
186
|
def _get_conn_params(self) -> dict[str, str | None]:
|
|
184
|
-
"""
|
|
187
|
+
"""
|
|
188
|
+
Fetch connection params as a dict.
|
|
185
189
|
|
|
186
190
|
This is used in ``get_uri()`` and ``get_connection()``.
|
|
187
191
|
"""
|
|
@@ -194,6 +198,7 @@ class SnowflakeHook(DbApiHook):
|
|
|
194
198
|
role = self._get_field(extra_dict, "role") or ""
|
|
195
199
|
insecure_mode = _try_to_boolean(self._get_field(extra_dict, "insecure_mode"))
|
|
196
200
|
schema = conn.schema or ""
|
|
201
|
+
client_request_mfa_token = _try_to_boolean(self._get_field(extra_dict, "client_request_mfa_token"))
|
|
197
202
|
|
|
198
203
|
# authenticator and session_parameters never supported long name so we don't use _get_field
|
|
199
204
|
authenticator = extra_dict.get("authenticator", "snowflake")
|
|
@@ -216,6 +221,9 @@ class SnowflakeHook(DbApiHook):
|
|
|
216
221
|
if insecure_mode:
|
|
217
222
|
conn_config["insecure_mode"] = insecure_mode
|
|
218
223
|
|
|
224
|
+
if client_request_mfa_token:
|
|
225
|
+
conn_config["client_request_mfa_token"] = client_request_mfa_token
|
|
226
|
+
|
|
219
227
|
# If private_key_file is specified in the extra json, load the contents of the file as a private key.
|
|
220
228
|
# If private_key_content is specified in the extra json, use it as a private key.
|
|
221
229
|
# As a next step, specify this private key in the connection configuration.
|
|
@@ -280,7 +288,9 @@ class SnowflakeHook(DbApiHook):
|
|
|
280
288
|
**{
|
|
281
289
|
k: v
|
|
282
290
|
for k, v in conn_params.items()
|
|
283
|
-
if v
|
|
291
|
+
if v
|
|
292
|
+
and k
|
|
293
|
+
not in ["session_parameters", "insecure_mode", "private_key", "client_request_mfa_token"]
|
|
284
294
|
}
|
|
285
295
|
)
|
|
286
296
|
|
|
@@ -291,7 +301,8 @@ class SnowflakeHook(DbApiHook):
|
|
|
291
301
|
return conn
|
|
292
302
|
|
|
293
303
|
def get_sqlalchemy_engine(self, engine_kwargs=None):
|
|
294
|
-
"""
|
|
304
|
+
"""
|
|
305
|
+
Get an sqlalchemy_engine object.
|
|
295
306
|
|
|
296
307
|
:param engine_kwargs: Kwargs used in :func:`~sqlalchemy.create_engine`.
|
|
297
308
|
:return: the created engine.
|
|
@@ -348,7 +359,8 @@ class SnowflakeHook(DbApiHook):
|
|
|
348
359
|
return_last: bool = True,
|
|
349
360
|
return_dictionaries: bool = False,
|
|
350
361
|
) -> tuple | list[tuple] | list[list[tuple] | tuple] | None:
|
|
351
|
-
"""
|
|
362
|
+
"""
|
|
363
|
+
Run a command or list of commands.
|
|
352
364
|
|
|
353
365
|
Pass a list of SQL statements to the SQL parameter to get them to
|
|
354
366
|
execute sequentially. The result of the queries is returned if the
|
|
@@ -152,7 +152,8 @@ class CopyFromExternalStageToSnowflakeOperator(BaseOperator):
|
|
|
152
152
|
def _extract_openlineage_unique_dataset_paths(
|
|
153
153
|
query_result: list[dict[str, Any]],
|
|
154
154
|
) -> tuple[list[tuple[str, str]], list[str]]:
|
|
155
|
-
"""
|
|
155
|
+
"""
|
|
156
|
+
Extract and return unique OpenLineage dataset paths and file paths that failed to be parsed.
|
|
156
157
|
|
|
157
158
|
Each row in the results is expected to have a 'file' field, which is a URI.
|
|
158
159
|
The function parses these URIs and constructs a set of unique OpenLineage (namespace, name) tuples.
|
|
@@ -34,7 +34,8 @@ def fix_account_name(name: str) -> str:
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
def fix_snowflake_sqlalchemy_uri(uri: str) -> str:
|
|
37
|
-
"""
|
|
37
|
+
"""
|
|
38
|
+
Fix snowflake sqlalchemy connection URI to OpenLineage structure.
|
|
38
39
|
|
|
39
40
|
Snowflake sqlalchemy connection URI has following structure:
|
|
40
41
|
'snowflake://<user_login_name>:<password>@<account_identifier>/<database_name>/<schema_name>?warehouse=<warehouse_name>&role=<role_name>'
|
|
@@ -28,7 +28,7 @@ build-backend = "flit_core.buildapi"
|
|
|
28
28
|
|
|
29
29
|
[project]
|
|
30
30
|
name = "apache-airflow-providers-snowflake"
|
|
31
|
-
version = "5.
|
|
31
|
+
version = "5.6.0.rc1"
|
|
32
32
|
description = "Provider package apache-airflow-providers-snowflake for Apache Airflow"
|
|
33
33
|
readme = "README.rst"
|
|
34
34
|
authors = [
|
|
@@ -66,8 +66,8 @@ dependencies = [
|
|
|
66
66
|
]
|
|
67
67
|
|
|
68
68
|
[project.urls]
|
|
69
|
-
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.
|
|
70
|
-
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.
|
|
69
|
+
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.6.0"
|
|
70
|
+
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-snowflake/5.6.0/changelog.html"
|
|
71
71
|
"Bug Tracker" = "https://github.com/apache/airflow/issues"
|
|
72
72
|
"Source Code" = "https://github.com/apache/airflow"
|
|
73
73
|
"Slack Chat" = "https://s.apache.org/airflow-slack"
|
|
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
|