apache-airflow-providers-snowflake 6.3.0rc1__tar.gz → 6.3.1__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.

Files changed (71) hide show
  1. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/PKG-INFO +10 -10
  2. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/README.rst +3 -3
  3. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/changelog.rst +29 -1
  4. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/index.rst +3 -3
  5. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/operators/snowflake.rst +2 -5
  6. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/provider.yaml +6 -2
  7. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/pyproject.toml +7 -7
  8. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/__init__.py +1 -1
  9. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/hooks/snowflake.py +2 -2
  10. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/utils/openlineage.py +49 -21
  11. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/hooks/test_snowflake.py +2 -2
  12. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/hooks/test_snowflake_sql_api.py +1 -1
  13. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/utils/test_openlineage.py +43 -25
  14. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/.latest-doc-only-change.txt +0 -0
  15. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/commits.rst +0 -0
  16. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/conf.py +0 -0
  17. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/connections/snowflake.rst +0 -0
  18. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/decorators/index.rst +0 -0
  19. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/decorators/snowpark.rst +0 -0
  20. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/installing-providers-from-sources.rst +0 -0
  21. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/integration-logos/Snowflake.png +0 -0
  22. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/operators/copy_into_snowflake.rst +0 -0
  23. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/operators/index.rst +0 -0
  24. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/operators/snowpark.rst +0 -0
  25. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/docs/security.rst +0 -0
  26. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/__init__.py +0 -0
  27. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/__init__.py +0 -0
  28. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/LICENSE +0 -0
  29. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/decorators/__init__.py +0 -0
  30. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/decorators/snowpark.py +0 -0
  31. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/get_provider_info.py +0 -0
  32. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/hooks/__init__.py +0 -0
  33. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/hooks/snowflake_sql_api.py +0 -0
  34. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/operators/__init__.py +0 -0
  35. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/operators/snowflake.py +0 -0
  36. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/operators/snowpark.py +0 -0
  37. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/transfers/__init__.py +0 -0
  38. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/transfers/copy_into_snowflake.py +0 -0
  39. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/triggers/__init__.py +0 -0
  40. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/triggers/snowflake_trigger.py +0 -0
  41. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/utils/__init__.py +0 -0
  42. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/utils/common.py +0 -0
  43. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/utils/snowpark.py +0 -0
  44. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/utils/sql_api_generate_jwt.py +0 -0
  45. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/src/airflow/providers/snowflake/version_compat.py +0 -0
  46. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/conftest.py +0 -0
  47. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/system/__init__.py +0 -0
  48. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/system/snowflake/__init__.py +0 -0
  49. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/system/snowflake/example_copy_into_snowflake.py +0 -0
  50. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/system/snowflake/example_snowflake.py +0 -0
  51. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/system/snowflake/example_snowflake_snowflake_op_template_file.sql +0 -0
  52. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/system/snowflake/example_snowpark_decorator.py +0 -0
  53. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/system/snowflake/example_snowpark_operator.py +0 -0
  54. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/__init__.py +0 -0
  55. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/__init__.py +0 -0
  56. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/decorators/__init__.py +0 -0
  57. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/decorators/test_snowpark.py +0 -0
  58. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/hooks/__init__.py +0 -0
  59. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/hooks/test_sql.py +0 -0
  60. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/operators/__init__.py +0 -0
  61. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/operators/test_snowflake.py +0 -0
  62. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/operators/test_snowflake_sql.py +0 -0
  63. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/operators/test_snowpark.py +0 -0
  64. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/transfers/__init__.py +0 -0
  65. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/transfers/test_copy_into_snowflake.py +0 -0
  66. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/triggers/__init__.py +0 -0
  67. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/triggers/test_snowflake.py +0 -0
  68. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/utils/__init__.py +0 -0
  69. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/utils/test_common.py +0 -0
  70. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/utils/test_snowpark.py +0 -0
  71. {apache_airflow_providers_snowflake-6.3.0rc1 → apache_airflow_providers_snowflake-6.3.1}/tests/unit/snowflake/utils/test_sql_api_generate_jwt.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-snowflake
3
- Version: 6.3.0rc1
3
+ Version: 6.3.1
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>
@@ -20,18 +20,18 @@ 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.10.0rc1
24
- Requires-Dist: apache-airflow-providers-common-compat>=1.6.0rc1
25
- Requires-Dist: apache-airflow-providers-common-sql>=1.21.0rc1
23
+ Requires-Dist: apache-airflow>=2.10.0
24
+ Requires-Dist: apache-airflow-providers-common-compat>=1.6.0
25
+ Requires-Dist: apache-airflow-providers-common-sql>=1.21.0
26
26
  Requires-Dist: pandas>=2.1.2,<2.2
27
27
  Requires-Dist: pyarrow>=14.0.1
28
28
  Requires-Dist: snowflake-connector-python>=3.7.1
29
29
  Requires-Dist: snowflake-sqlalchemy>=1.4.0
30
30
  Requires-Dist: snowflake-snowpark-python>=1.17.0;python_version<'3.12'
31
- Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
31
+ Requires-Dist: apache-airflow-providers-openlineage>=2.3.0 ; extra == "openlineage"
32
32
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
33
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.3.0/changelog.html
34
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.3.0
33
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.3.1/changelog.html
34
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.3.1
35
35
  Project-URL: Mastodon, https://fosstodon.org/@airflow
36
36
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
37
37
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -63,7 +63,7 @@ Provides-Extra: openlineage
63
63
 
64
64
  Package ``apache-airflow-providers-snowflake``
65
65
 
66
- Release: ``6.3.0``
66
+ Release: ``6.3.1``
67
67
 
68
68
 
69
69
  `Snowflake <https://www.snowflake.com/>`__
@@ -76,7 +76,7 @@ This is a provider package for ``snowflake`` provider. All classes for this prov
76
76
  are in ``airflow.providers.snowflake`` 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-snowflake/6.3.0/>`_.
79
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.3.1/>`_.
80
80
 
81
81
  Installation
82
82
  ------------
@@ -125,5 +125,5 @@ Dependent package
125
125
  ================================================================================================================== =================
126
126
 
127
127
  The changelog for the provider package can be found in the
128
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.3.0/changelog.html>`_.
128
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.3.1/changelog.html>`_.
129
129
 
@@ -23,7 +23,7 @@
23
23
 
24
24
  Package ``apache-airflow-providers-snowflake``
25
25
 
26
- Release: ``6.3.0``
26
+ Release: ``6.3.1``
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.3.0/>`_.
39
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.3.1/>`_.
40
40
 
41
41
  Installation
42
42
  ------------
@@ -85,4 +85,4 @@ Dependent package
85
85
  ================================================================================================================== =================
86
86
 
87
87
  The changelog for the provider package can be found in the
88
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.3.0/changelog.html>`_.
88
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.3.1/changelog.html>`_.
@@ -27,6 +27,29 @@
27
27
  Changelog
28
28
  ---------
29
29
 
30
+ 6.3.1
31
+ .....
32
+
33
+ Bug Fixes
34
+ ~~~~~~~~~
35
+
36
+ * ``fix: Adjust OpenLineage task state check for Airflow 3 (#50380)``
37
+
38
+ Misc
39
+ ~~~~
40
+
41
+ * ``nit: Switch to emitting OL events with adapter and not client directly (#50398)``
42
+
43
+ Doc-only
44
+ ~~~~~~~~
45
+
46
+ * ``docs: remove stale warning about SnowflakeOperator (#50450)``
47
+
48
+ .. Below changes are excluded from the changelog. Move them to
49
+ appropriate section above if needed. Do not delete the lines(!):
50
+ * ``Fix Breeze unit test (#50395)``
51
+ * ``Use non-deprecated context in tests for Airflow 3 (#50391)``
52
+
30
53
  6.3.0
31
54
  .....
32
55
 
@@ -53,9 +76,11 @@ Features
53
76
  Bug Fixes
54
77
  ~~~~~~~~~
55
78
 
56
- * ``Fix SnowflakeSqlApiHook backwards compatibility for get_oauth_token method (#49482)``
57
79
  * ``make 'private_key_content' in snowflake connection to be a base64 encoded string (#49467)``
80
+ * ``Fix SnowflakeSqlApiHook backwards compatibility for get_oauth_token method (#49482)``
58
81
  * ``Fix mypy for get_oauth_token signature in SnowflakeSqlApiHook (#49449)``
82
+ * ``Fix infinite recursive call of _get_conn_params while getting oauth token from snowflake (#50344)``
83
+ * ``Fix: adjust dag_run extraction for Airflow 3 in OL utils (#50346)``
59
84
 
60
85
  Misc
61
86
  ~~~~
@@ -64,10 +89,13 @@ Misc
64
89
  * ``Bump min Airflow version in providers to 2.10 (#49843)``
65
90
  * ``enhance: logs SQL before execution in 'snowflake' and 'databricks_sql' (#48942)``
66
91
  * ``chore: import paths use the stable functions (#49460)``
92
+ * ``add root parent information to OpenLineage events (#49237)``
67
93
 
68
94
  .. Below changes are excluded from the changelog. Move them to
69
95
  appropriate section above if needed. Do not delete the lines(!):
70
96
  * ``Avoid committing history for providers (#49907)``
97
+ * ``Update description of provider.yaml dependencies (#50231)``
98
+ * ``Prepare ad hoc release for providers May 2025 (#50166)``
71
99
 
72
100
  6.2.2
73
101
  .....
@@ -78,7 +78,7 @@ apache-airflow-providers-snowflake package
78
78
  `Snowflake <https://www.snowflake.com/>`__
79
79
 
80
80
 
81
- Release: 6.3.0
81
+ Release: 6.3.1
82
82
 
83
83
  Provider package
84
84
  ----------------
@@ -138,5 +138,5 @@ Downloading official packages
138
138
  You can download officially released packages and verify their checksums and signatures from the
139
139
  `Official Apache Download site <https://downloads.apache.org/airflow/providers/>`_
140
140
 
141
- * `The apache-airflow-providers-snowflake 6.3.0 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.3.0.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.3.0.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.3.0.tar.gz.sha512>`__)
142
- * `The apache-airflow-providers-snowflake 6.3.0 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.3.0-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.3.0-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.3.0-py3-none-any.whl.sha512>`__)
141
+ * `The apache-airflow-providers-snowflake 6.3.1 sdist package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.3.1.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.3.1.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.3.1.tar.gz.sha512>`__)
142
+ * `The apache-airflow-providers-snowflake 6.3.1 wheel package <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.3.1-py3-none-any.whl>`_ (`asc <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.3.1-py3-none-any.whl.asc>`__, `sha512 <https://downloads.apache.org/airflow/providers/apache_airflow_providers_snowflake-6.3.1-py3-none-any.whl.sha512>`__)
@@ -17,15 +17,12 @@
17
17
 
18
18
  .. _howto/operator:SnowflakeOperator:
19
19
 
20
- SQLExecuteQueryOperator to connect to Snowflake
21
- ===============================================
20
+ SQLExecuteQueryOperator for Snowflake
21
+ =====================================
22
22
 
23
23
  Use the :class:`SQLExecuteQueryOperator <airflow.providers.common.sql.operators.sql>` to execute
24
24
  SQL commands in a `Snowflake <https://docs.snowflake.com/en/>`__ database.
25
25
 
26
- .. warning::
27
- Previously, SnowflakeOperator was used to perform this kind of operation. But at the moment SnowflakeOperator is deprecated and will be removed in future versions of the provider. Please consider to switch to SQLExecuteQueryOperator as soon as possible.
28
-
29
26
 
30
27
  Using the Operator
31
28
  ^^^^^^^^^^^^^^^^^^
@@ -22,9 +22,13 @@ description: |
22
22
  `Snowflake <https://www.snowflake.com/>`__
23
23
 
24
24
  state: ready
25
- source-date-epoch: 1746344752
26
- # note that those versions are maintained by release manager - do not update them manually
25
+ source-date-epoch: 1747133792
26
+ # Note that those versions are maintained by release manager - do not update them manually
27
+ # with the exception of case where other provider in sources has >= new provider version.
28
+ # In such case adding >= NEW_VERSION and bumping to NEW_VERSION in a provider have
29
+ # to be done in the same PR
27
30
  versions:
31
+ - 6.3.1
28
32
  - 6.3.0
29
33
  - 6.2.2
30
34
  - 6.2.1
@@ -25,7 +25,7 @@ build-backend = "flit_core.buildapi"
25
25
 
26
26
  [project]
27
27
  name = "apache-airflow-providers-snowflake"
28
- version = "6.3.0rc1"
28
+ version = "6.3.1"
29
29
  description = "Provider package apache-airflow-providers-snowflake for Apache Airflow"
30
30
  readme = "README.rst"
31
31
  authors = [
@@ -57,9 +57,9 @@ 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.10.0rc1",
61
- "apache-airflow-providers-common-compat>=1.6.0rc1",
62
- "apache-airflow-providers-common-sql>=1.21.0rc1",
60
+ "apache-airflow>=2.10.0",
61
+ "apache-airflow-providers-common-compat>=1.6.0",
62
+ "apache-airflow-providers-common-sql>=1.21.0",
63
63
  # In pandas 2.2 minimal version of the sqlalchemy is 2.0
64
64
  # https://pandas.pydata.org/docs/whatsnew/v2.2.0.html#increased-minimum-versions-for-dependencies
65
65
  # However Airflow not fully supports it yet: https://github.com/apache/airflow/issues/28723
@@ -75,7 +75,7 @@ dependencies = [
75
75
  # Any change in the dependencies is preserved when the file is regenerated
76
76
  [project.optional-dependencies]
77
77
  "openlineage" = [
78
- "apache-airflow-providers-openlineage"
78
+ "apache-airflow-providers-openlineage>=2.3.0"
79
79
  ]
80
80
 
81
81
  [dependency-groups]
@@ -116,8 +116,8 @@ apache-airflow-providers-common-sql = {workspace = true}
116
116
  apache-airflow-providers-standard = {workspace = true}
117
117
 
118
118
  [project.urls]
119
- "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.3.0"
120
- "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.3.0/changelog.html"
119
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.3.1"
120
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-snowflake/6.3.1/changelog.html"
121
121
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
122
122
  "Source Code" = "https://github.com/apache/airflow"
123
123
  "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.3.0"
32
+ __version__ = "6.3.1"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
35
  "2.10.0"
@@ -191,7 +191,7 @@ class SnowflakeHook(DbApiHook):
191
191
 
192
192
  @property
193
193
  def account_identifier(self) -> str:
194
- """Returns snowflake account identifier."""
194
+ """Get snowflake account identifier."""
195
195
  conn_config = self._get_conn_params
196
196
  account_identifier = f"https://{conn_config['account']}"
197
197
 
@@ -205,7 +205,7 @@ class SnowflakeHook(DbApiHook):
205
205
  if conn_config is None:
206
206
  conn_config = self._get_conn_params
207
207
 
208
- url = f"{self.account_identifier}.snowflakecomputing.com/oauth/token-request"
208
+ url = f"https://{conn_config['account']}.snowflakecomputing.com/oauth/token-request"
209
209
 
210
210
  data = {
211
211
  "grant_type": "refresh_token",
@@ -97,6 +97,28 @@ def fix_snowflake_sqlalchemy_uri(uri: str) -> str:
97
97
  return urlunparse((parts.scheme, hostname, parts.path, parts.params, parts.query, parts.fragment))
98
98
 
99
99
 
100
+ def _get_logical_date(task_instance):
101
+ # todo: remove when min airflow version >= 3.0
102
+ if AIRFLOW_V_3_0_PLUS:
103
+ dagrun = task_instance.get_template_context()["dag_run"]
104
+ return dagrun.logical_date or dagrun.run_after
105
+
106
+ if hasattr(task_instance, "logical_date"):
107
+ date = task_instance.logical_date
108
+ else:
109
+ date = task_instance.execution_date
110
+
111
+ return date
112
+
113
+
114
+ def _get_dag_run_clear_number(task_instance):
115
+ # todo: remove when min airflow version >= 3.0
116
+ if AIRFLOW_V_3_0_PLUS:
117
+ dagrun = task_instance.get_template_context()["dag_run"]
118
+ return dagrun.clear_number
119
+ return task_instance.dag_run.clear_number
120
+
121
+
100
122
  # todo: move this run_id logic into OpenLineage's listener to avoid differences
101
123
  def _get_ol_run_id(task_instance) -> str:
102
124
  """
@@ -108,29 +130,27 @@ def _get_ol_run_id(task_instance) -> str:
108
130
  """
109
131
  from airflow.providers.openlineage.plugins.adapter import OpenLineageAdapter
110
132
 
111
- def _get_logical_date():
112
- # todo: remove when min airflow version >= 3.0
113
- if AIRFLOW_V_3_0_PLUS:
114
- dagrun = task_instance.get_template_context()["dag_run"]
115
- return dagrun.logical_date or dagrun.run_after
116
-
117
- if hasattr(task_instance, "logical_date"):
118
- date = task_instance.logical_date
119
- else:
120
- date = task_instance.execution_date
121
-
122
- return date
123
-
124
133
  # Generate same OL run id as is generated for current task instance
125
134
  return OpenLineageAdapter.build_task_instance_run_id(
126
135
  dag_id=task_instance.dag_id,
127
136
  task_id=task_instance.task_id,
128
- logical_date=_get_logical_date(),
137
+ logical_date=_get_logical_date(task_instance),
129
138
  try_number=task_instance.try_number,
130
139
  map_index=task_instance.map_index,
131
140
  )
132
141
 
133
142
 
143
+ # todo: move this run_id logic into OpenLineage's listener to avoid differences
144
+ def _get_ol_dag_run_id(task_instance) -> str:
145
+ from airflow.providers.openlineage.plugins.adapter import OpenLineageAdapter
146
+
147
+ return OpenLineageAdapter.build_dag_run_id(
148
+ dag_id=task_instance.dag_id,
149
+ logical_date=_get_logical_date(task_instance),
150
+ clear_number=_get_dag_run_clear_number(task_instance),
151
+ )
152
+
153
+
134
154
  def _get_parent_run_facet(task_instance):
135
155
  """
136
156
  Retrieve the ParentRunFacet associated with a specific Airflow task instance.
@@ -144,6 +164,7 @@ def _get_parent_run_facet(task_instance):
144
164
  from airflow.providers.openlineage.conf import namespace
145
165
 
146
166
  parent_run_id = _get_ol_run_id(task_instance)
167
+ root_parent_run_id = _get_ol_dag_run_id(task_instance)
147
168
 
148
169
  return parent_run.ParentRunFacet(
149
170
  run=parent_run.Run(runId=parent_run_id),
@@ -151,6 +172,13 @@ def _get_parent_run_facet(task_instance):
151
172
  namespace=namespace(),
152
173
  name=f"{task_instance.dag_id}.{task_instance.task_id}",
153
174
  ),
175
+ root=parent_run.Root(
176
+ run=parent_run.RootRun(runId=root_parent_run_id),
177
+ job=parent_run.RootJob(
178
+ name=task_instance.dag_id,
179
+ namespace=namespace(),
180
+ ),
181
+ ),
154
182
  )
155
183
 
156
184
 
@@ -218,7 +246,7 @@ def _create_snowflake_event_pair(
218
246
  return start, end
219
247
 
220
248
 
221
- @require_openlineage_version(provider_min_version="2.0.0")
249
+ @require_openlineage_version(provider_min_version="2.3.0")
222
250
  def emit_openlineage_events_for_snowflake_queries(
223
251
  query_ids: list[str],
224
252
  query_source_namespace: str,
@@ -252,6 +280,7 @@ def emit_openlineage_events_for_snowflake_queries(
252
280
  from airflow.providers.common.compat.openlineage.facet import (
253
281
  ErrorMessageRunFacet,
254
282
  ExternalQueryRunFacet,
283
+ RunFacet,
255
284
  SQLJobFacet,
256
285
  )
257
286
  from airflow.providers.openlineage.conf import namespace
@@ -273,7 +302,7 @@ def emit_openlineage_events_for_snowflake_queries(
273
302
  # If real metadata is unavailable, we send events with eventTime=now
274
303
  default_event_time = timezone.utcnow()
275
304
  # If no query metadata is provided, we use task_instance's state when checking for success
276
- default_state = str(task_instance.state) if hasattr(task_instance, "state") else ""
305
+ default_state = task_instance.state.value if hasattr(task_instance, "state") else ""
277
306
 
278
307
  common_run_facets = {"parent": _get_parent_run_facet(task_instance)}
279
308
  common_job_facets: dict[str, JobFacet] = {
@@ -296,12 +325,11 @@ def emit_openlineage_events_for_snowflake_queries(
296
325
  query_metadata if query_metadata else "not found",
297
326
  )
298
327
 
299
- # TODO(potiuk): likely typing here needs to be fixed
300
- query_specific_run_facets = { # type : ignore[assignment]
328
+ query_specific_run_facets: dict[str, RunFacet] = {
301
329
  "externalQuery": ExternalQueryRunFacet(externalQueryId=query_id, source=query_source_namespace)
302
330
  }
303
331
  if query_metadata.get("ERROR_MESSAGE"):
304
- query_specific_run_facets["error"] = ErrorMessageRunFacet( # type: ignore[assignment]
332
+ query_specific_run_facets["error"] = ErrorMessageRunFacet(
305
333
  message=f"{query_metadata.get('ERROR_CODE')} : {query_metadata['ERROR_MESSAGE']}",
306
334
  programmingLanguage="SQL",
307
335
  )
@@ -324,9 +352,9 @@ def emit_openlineage_events_for_snowflake_queries(
324
352
  events.extend(event_batch)
325
353
 
326
354
  log.debug("Generated %s OpenLineage events; emitting now.", len(events))
327
- client = get_openlineage_listener().adapter.get_or_create_openlineage_client()
355
+ adapter = get_openlineage_listener().adapter
328
356
  for event in events:
329
- client.emit(event)
357
+ adapter.emit(event)
330
358
 
331
359
  log.info("OpenLineage has successfully finished processing information about Snowflake queries.")
332
360
  return
@@ -860,7 +860,7 @@ class TestPytestSnowflakeHook:
860
860
  hook.get_openlineage_database_info = lambda x: mock.MagicMock(authority="auth", scheme="scheme")
861
861
 
862
862
  expected_err = (
863
- "OpenLineage provider version `1.99.0` is lower than required `2.0.0`, "
863
+ "OpenLineage provider version `1.99.0` is lower than required `2.3.0`, "
864
864
  "skipping function `emit_openlineage_events_for_snowflake_queries` execution"
865
865
  )
866
866
  with pytest.raises(AirflowOptionalProviderFeatureException, match=expected_err):
@@ -908,7 +908,7 @@ class TestPytestSnowflakeHook:
908
908
  hook = SnowflakeHook(snowflake_conn_id="mock_conn_id")
909
909
  hook.get_oauth_token(conn_config=CONN_PARAMS_OAUTH)
910
910
  requests_post.assert_called_once_with(
911
- f"https://{CONN_PARAMS_OAUTH['account']}.{CONN_PARAMS_OAUTH['region']}.snowflakecomputing.com/oauth/token-request",
911
+ f"https://{CONN_PARAMS_OAUTH['account']}.snowflakecomputing.com/oauth/token-request",
912
912
  data={
913
913
  "grant_type": "refresh_token",
914
914
  "refresh_token": CONN_PARAMS_OAUTH["refresh_token"],
@@ -368,7 +368,7 @@ class TestSnowflakeSqlApiHook:
368
368
  with pytest.warns(expected_warning=AirflowProviderDeprecationWarning):
369
369
  hook.get_oauth_token(CONN_PARAMS_OAUTH)
370
370
  requests_post.assert_called_once_with(
371
- f"https://{CONN_PARAMS_OAUTH['account']}.{CONN_PARAMS_OAUTH['region']}.snowflakecomputing.com/oauth/token-request",
371
+ f"https://{CONN_PARAMS_OAUTH['account']}.snowflakecomputing.com/oauth/token-request",
372
372
  data={
373
373
  "grant_type": "refresh_token",
374
374
  "refresh_token": CONN_PARAMS_OAUTH["refresh_token"],
@@ -304,9 +304,10 @@ def test_create_snowflake_event_pair_success(mock_generate_uuid, is_successful):
304
304
  assert start_event.job == end_event.job
305
305
 
306
306
 
307
+ @mock.patch("importlib.metadata.version", return_value="2.3.0")
307
308
  @mock.patch("openlineage.client.uuid.generate_new_uuid")
308
309
  @mock.patch("airflow.utils.timezone.utcnow")
309
- def test_emit_openlineage_events_for_snowflake_queries_with_hook(mock_now, mock_generate_uuid):
310
+ def test_emit_openlineage_events_for_snowflake_queries_with_hook(mock_now, mock_generate_uuid, mock_version):
310
311
  fake_uuid = "01958e68-03a2-79e3-9ae9-26865cc40e2f"
311
312
  mock_generate_uuid.return_value = fake_uuid
312
313
 
@@ -316,6 +317,7 @@ def test_emit_openlineage_events_for_snowflake_queries_with_hook(mock_now, mock_
316
317
  query_ids = ["query1", "query2", "query3"]
317
318
  original_query_ids = copy.deepcopy(query_ids)
318
319
  logical_date = timezone.datetime(2025, 1, 1)
320
+ mock_dagrun = mock.MagicMock(logical_date=logical_date, clear_number=0)
319
321
  mock_ti = mock.MagicMock(
320
322
  dag_id="dag_id",
321
323
  task_id="task_id",
@@ -323,8 +325,9 @@ def test_emit_openlineage_events_for_snowflake_queries_with_hook(mock_now, mock_
323
325
  try_number=1,
324
326
  logical_date=logical_date,
325
327
  state=TaskInstanceState.FAILED, # This will be query default state if no metadata found
328
+ dag_run=mock_dagrun,
326
329
  )
327
- mock_ti.get_template_context.return_value = {"dag_run": mock.MagicMock(logical_date=logical_date)}
330
+ mock_ti.get_template_context.return_value = {"dag_run": mock_dagrun}
328
331
 
329
332
  fake_metadata = {
330
333
  "query1": {
@@ -348,10 +351,10 @@ def test_emit_openlineage_events_for_snowflake_queries_with_hook(mock_now, mock_
348
351
  additional_run_facets = {"custom_run": "value_run"}
349
352
  additional_job_facets = {"custom_job": "value_job"}
350
353
 
351
- fake_client = mock.MagicMock()
352
- fake_client.emit = mock.MagicMock()
354
+ fake_adapter = mock.MagicMock()
355
+ fake_adapter.emit = mock.MagicMock()
353
356
  fake_listener = mock.MagicMock()
354
- fake_listener.adapter.get_or_create_openlineage_client.return_value = fake_client
357
+ fake_listener.adapter = fake_adapter
355
358
 
356
359
  with (
357
360
  mock.patch(
@@ -373,7 +376,7 @@ def test_emit_openlineage_events_for_snowflake_queries_with_hook(mock_now, mock_
373
376
  )
374
377
 
375
378
  assert query_ids == original_query_ids # Verify that the input query_ids list is unchanged.
376
- assert fake_client.emit.call_count == 6 # Expect two events per query.
379
+ assert fake_adapter.emit.call_count == 6 # Expect two events per query.
377
380
 
378
381
  expected_common_job_facets = {
379
382
  "jobType": job_type_job.JobTypeJobFacet(
@@ -387,6 +390,10 @@ def test_emit_openlineage_events_for_snowflake_queries_with_hook(mock_now, mock_
387
390
  "parent": parent_run.ParentRunFacet(
388
391
  run=parent_run.Run(runId="01941f29-7c00-7087-8906-40e512c257bd"),
389
392
  job=parent_run.Job(namespace=namespace(), name="dag_id.task_id"),
393
+ root=parent_run.Root(
394
+ run=parent_run.RootRun(runId="01941f29-7c00-743e-b109-28b18d0a19c5"),
395
+ job=parent_run.RootJob(namespace=namespace(), name="dag_id"),
396
+ ),
390
397
  ),
391
398
  "custom_run": "value_run",
392
399
  }
@@ -532,12 +539,15 @@ def test_emit_openlineage_events_for_snowflake_queries_with_hook(mock_now, mock_
532
539
  ),
533
540
  ]
534
541
 
535
- assert fake_client.emit.call_args_list == expected_calls
542
+ assert fake_adapter.emit.call_args_list == expected_calls
536
543
 
537
544
 
545
+ @mock.patch("importlib.metadata.version", return_value="2.3.0")
538
546
  @mock.patch("openlineage.client.uuid.generate_new_uuid")
539
547
  @mock.patch("airflow.utils.timezone.utcnow")
540
- def test_emit_openlineage_events_for_snowflake_queries_without_hook(mock_now, mock_generate_uuid):
548
+ def test_emit_openlineage_events_for_snowflake_queries_without_hook(
549
+ mock_now, mock_generate_uuid, mock_version
550
+ ):
541
551
  fake_uuid = "01958e68-03a2-79e3-9ae9-26865cc40e2f"
542
552
  mock_generate_uuid.return_value = fake_uuid
543
553
 
@@ -554,16 +564,19 @@ def test_emit_openlineage_events_for_snowflake_queries_without_hook(mock_now, mo
554
564
  try_number=1,
555
565
  logical_date=logical_date,
556
566
  state=TaskInstanceState.SUCCESS, # This will be query default state if no metadata found
567
+ dag_run=mock.MagicMock(logical_date=logical_date, clear_number=0),
557
568
  )
558
- mock_ti.get_template_context.return_value = {"dag_run": mock.MagicMock(logical_date=logical_date)}
569
+ mock_ti.get_template_context.return_value = {
570
+ "dag_run": mock.MagicMock(logical_date=logical_date, clear_number=0)
571
+ }
559
572
 
560
573
  additional_run_facets = {"custom_run": "value_run"}
561
574
  additional_job_facets = {"custom_job": "value_job"}
562
575
 
563
- fake_client = mock.MagicMock()
564
- fake_client.emit = mock.MagicMock()
576
+ fake_adapter = mock.MagicMock()
577
+ fake_adapter.emit = mock.MagicMock()
565
578
  fake_listener = mock.MagicMock()
566
- fake_listener.adapter.get_or_create_openlineage_client.return_value = fake_client
579
+ fake_listener.adapter = fake_adapter
567
580
 
568
581
  with mock.patch(
569
582
  "airflow.providers.openlineage.plugins.listener.get_openlineage_listener",
@@ -579,7 +592,7 @@ def test_emit_openlineage_events_for_snowflake_queries_without_hook(mock_now, mo
579
592
  )
580
593
 
581
594
  assert query_ids == original_query_ids # Verify that the input query_ids list is unchanged.
582
- assert fake_client.emit.call_count == 2 # Expect two events per query.
595
+ assert fake_adapter.emit.call_count == 2 # Expect two events per query.
583
596
 
584
597
  expected_common_job_facets = {
585
598
  "jobType": job_type_job.JobTypeJobFacet(
@@ -593,6 +606,10 @@ def test_emit_openlineage_events_for_snowflake_queries_without_hook(mock_now, mo
593
606
  "parent": parent_run.ParentRunFacet(
594
607
  run=parent_run.Run(runId="01941f29-7c00-7087-8906-40e512c257bd"),
595
608
  job=parent_run.Job(namespace=namespace(), name="dag_id.task_id"),
609
+ root=parent_run.Root(
610
+ run=parent_run.RootRun(runId="01941f29-7c00-743e-b109-28b18d0a19c5"),
611
+ job=parent_run.RootJob(namespace=namespace(), name="dag_id"),
612
+ ),
596
613
  ),
597
614
  "custom_run": "value_run",
598
615
  }
@@ -640,17 +657,18 @@ def test_emit_openlineage_events_for_snowflake_queries_without_hook(mock_now, mo
640
657
  ),
641
658
  ]
642
659
 
643
- assert fake_client.emit.call_args_list == expected_calls
660
+ assert fake_adapter.emit.call_args_list == expected_calls
644
661
 
645
662
 
646
- def test_emit_openlineage_events_for_snowflake_queries_without_query_ids():
663
+ @mock.patch("importlib.metadata.version", return_value="2.3.0")
664
+ def test_emit_openlineage_events_for_snowflake_queries_without_query_ids(mock_version):
647
665
  query_ids = []
648
666
  original_query_ids = copy.deepcopy(query_ids)
649
667
 
650
- fake_client = mock.MagicMock()
651
- fake_client.emit = mock.MagicMock()
668
+ fake_adapter = mock.MagicMock()
669
+ fake_adapter.emit = mock.MagicMock()
652
670
  fake_listener = mock.MagicMock()
653
- fake_listener.adapter.get_or_create_openlineage_client.return_value = fake_client
671
+ fake_listener.adapter = fake_adapter
654
672
 
655
673
  with mock.patch(
656
674
  "airflow.providers.openlineage.plugins.listener.get_openlineage_listener",
@@ -663,26 +681,26 @@ def test_emit_openlineage_events_for_snowflake_queries_without_query_ids():
663
681
  )
664
682
 
665
683
  assert query_ids == original_query_ids # Verify that the input query_ids list is unchanged.
666
- fake_client.emit.assert_not_called() # No events should be emitted
684
+ fake_adapter.emit.assert_not_called() # No events should be emitted
667
685
 
668
686
 
669
- # emit_openlineage_events_for_snowflake_queries requires OL provider 2.0.0
687
+ # emit_openlineage_events_for_snowflake_queries requires OL provider 2.3.0
670
688
  @mock.patch("importlib.metadata.version", return_value="1.99.0")
671
689
  def test_emit_openlineage_events_with_old_openlineage_provider(mock_version):
672
690
  query_ids = ["q1", "q2"]
673
691
  original_query_ids = copy.deepcopy(query_ids)
674
692
 
675
- fake_client = mock.MagicMock()
676
- fake_client.emit = mock.MagicMock()
693
+ fake_adapter = mock.MagicMock()
694
+ fake_adapter.emit = mock.MagicMock()
677
695
  fake_listener = mock.MagicMock()
678
- fake_listener.adapter.get_or_create_openlineage_client.return_value = fake_client
696
+ fake_listener.adapter = fake_adapter
679
697
 
680
698
  with mock.patch(
681
699
  "airflow.providers.openlineage.plugins.listener.get_openlineage_listener",
682
700
  return_value=fake_listener,
683
701
  ):
684
702
  expected_err = (
685
- "OpenLineage provider version `1.99.0` is lower than required `2.0.0`, "
703
+ "OpenLineage provider version `1.99.0` is lower than required `2.3.0`, "
686
704
  "skipping function `emit_openlineage_events_for_snowflake_queries` execution"
687
705
  )
688
706
 
@@ -693,4 +711,4 @@ def test_emit_openlineage_events_with_old_openlineage_provider(mock_version):
693
711
  task_instance=None,
694
712
  )
695
713
  assert query_ids == original_query_ids # Verify that the input query_ids list is unchanged.
696
- fake_client.emit.assert_not_called() # No events should be emitted
714
+ fake_adapter.emit.assert_not_called() # No events should be emitted