apache-airflow-providers-common-compat 1.3.0rc1__tar.gz → 1.5.0rc1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of apache-airflow-providers-common-compat might be problematic. Click here for more details.
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1}/PKG-INFO +8 -25
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1}/README.rst +4 -22
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1}/pyproject.toml +21 -14
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/LICENSE +0 -52
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/__init__.py +1 -1
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/get_provider_info.py +7 -4
- apache_airflow_providers_common_compat-1.5.0rc1/src/airflow/providers/common/compat/lineage/entities.py +102 -0
- apache_airflow_providers_common_compat-1.5.0rc1/src/airflow/providers/common/compat/openlineage/utils/spark.py +130 -0
- apache_airflow_providers_common_compat-1.5.0rc1/src/airflow/providers/common/compat/openlineage/utils/sql.py +90 -0
- apache_airflow_providers_common_compat-1.3.0rc1/airflow/providers/common/compat/openlineage/utils/spark.py +0 -68
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/assets/__init__.py +0 -0
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/lineage/__init__.py +0 -0
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/lineage/hook.py +0 -0
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/openlineage/__init__.py +0 -0
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/openlineage/facet.py +0 -0
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/openlineage/utils/__init__.py +0 -0
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/openlineage/utils/utils.py +0 -0
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/security/__init__.py +0 -0
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/security/permissions.py +0 -0
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/standard/__init__.py +0 -0
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/standard/operators.py +0 -0
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/standard/triggers.py +0 -0
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/standard/utils.py +0 -0
- {apache_airflow_providers_common_compat-1.3.0rc1 → apache_airflow_providers_common_compat-1.5.0rc1/src}/airflow/providers/common/compat/version_compat.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: apache-airflow-providers-common-compat
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0rc1
|
|
4
4
|
Summary: Provider package apache-airflow-providers-common-compat for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,common.compat,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
@@ -24,8 +24,8 @@ Requires-Dist: apache-airflow>=2.9.0rc0
|
|
|
24
24
|
Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
|
|
25
25
|
Requires-Dist: apache-airflow-providers-standard ; extra == "standard"
|
|
26
26
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
27
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.
|
|
28
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.
|
|
27
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.5.0/changelog.html
|
|
28
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.5.0
|
|
29
29
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
30
30
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
31
31
|
Project-URL: Twitter, https://x.com/ApacheAirflow
|
|
@@ -34,23 +34,6 @@ Provides-Extra: openlineage
|
|
|
34
34
|
Provides-Extra: standard
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
38
|
-
or more contributor license agreements. See the NOTICE file
|
|
39
|
-
distributed with this work for additional information
|
|
40
|
-
regarding copyright ownership. The ASF licenses this file
|
|
41
|
-
to you under the Apache License, Version 2.0 (the
|
|
42
|
-
"License"); you may not use this file except in compliance
|
|
43
|
-
with the License. You may obtain a copy of the License at
|
|
44
|
-
|
|
45
|
-
.. http://www.apache.org/licenses/LICENSE-2.0
|
|
46
|
-
|
|
47
|
-
.. Unless required by applicable law or agreed to in writing,
|
|
48
|
-
software distributed under the License is distributed on an
|
|
49
|
-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
50
|
-
KIND, either express or implied. See the License for the
|
|
51
|
-
specific language governing permissions and limitations
|
|
52
|
-
under the License.
|
|
53
|
-
|
|
54
37
|
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
55
38
|
or more contributor license agreements. See the NOTICE file
|
|
56
39
|
distributed with this work for additional information
|
|
@@ -68,8 +51,7 @@ Provides-Extra: standard
|
|
|
68
51
|
specific language governing permissions and limitations
|
|
69
52
|
under the License.
|
|
70
53
|
|
|
71
|
-
.. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE
|
|
72
|
-
OVERWRITTEN WHEN PREPARING PACKAGES.
|
|
54
|
+
.. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
|
|
73
55
|
|
|
74
56
|
.. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
|
|
75
57
|
`PROVIDER_README_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
|
|
@@ -77,7 +59,7 @@ Provides-Extra: standard
|
|
|
77
59
|
|
|
78
60
|
Package ``apache-airflow-providers-common-compat``
|
|
79
61
|
|
|
80
|
-
Release: ``1.
|
|
62
|
+
Release: ``1.5.0``
|
|
81
63
|
|
|
82
64
|
|
|
83
65
|
``Common Compatibility Provider - providing compatibility code for previous Airflow versions.``
|
|
@@ -90,7 +72,7 @@ This is a provider package for ``common.compat`` provider. All classes for this
|
|
|
90
72
|
are in ``airflow.providers.common.compat`` python package.
|
|
91
73
|
|
|
92
74
|
You can find package information and changelog for the provider
|
|
93
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.
|
|
75
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.5.0/>`_.
|
|
94
76
|
|
|
95
77
|
Installation
|
|
96
78
|
------------
|
|
@@ -131,4 +113,5 @@ Dependent package
|
|
|
131
113
|
============================================================================================================== ===============
|
|
132
114
|
|
|
133
115
|
The changelog for the provider package can be found in the
|
|
134
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.
|
|
116
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.5.0/changelog.html>`_.
|
|
117
|
+
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
-
or more contributor license agreements. See the NOTICE file
|
|
4
|
-
distributed with this work for additional information
|
|
5
|
-
regarding copyright ownership. The ASF licenses this file
|
|
6
|
-
to you under the Apache License, Version 2.0 (the
|
|
7
|
-
"License"); you may not use this file except in compliance
|
|
8
|
-
with the License. You may obtain a copy of the License at
|
|
9
|
-
|
|
10
|
-
.. http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
|
|
12
|
-
.. Unless required by applicable law or agreed to in writing,
|
|
13
|
-
software distributed under the License is distributed on an
|
|
14
|
-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
-
KIND, either express or implied. See the License for the
|
|
16
|
-
specific language governing permissions and limitations
|
|
17
|
-
under the License.
|
|
18
|
-
|
|
19
2
|
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
20
3
|
or more contributor license agreements. See the NOTICE file
|
|
21
4
|
distributed with this work for additional information
|
|
@@ -33,8 +16,7 @@
|
|
|
33
16
|
specific language governing permissions and limitations
|
|
34
17
|
under the License.
|
|
35
18
|
|
|
36
|
-
.. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE
|
|
37
|
-
OVERWRITTEN WHEN PREPARING PACKAGES.
|
|
19
|
+
.. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
|
|
38
20
|
|
|
39
21
|
.. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
|
|
40
22
|
`PROVIDER_README_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
|
|
@@ -42,7 +24,7 @@
|
|
|
42
24
|
|
|
43
25
|
Package ``apache-airflow-providers-common-compat``
|
|
44
26
|
|
|
45
|
-
Release: ``1.
|
|
27
|
+
Release: ``1.5.0``
|
|
46
28
|
|
|
47
29
|
|
|
48
30
|
``Common Compatibility Provider - providing compatibility code for previous Airflow versions.``
|
|
@@ -55,7 +37,7 @@ This is a provider package for ``common.compat`` provider. All classes for this
|
|
|
55
37
|
are in ``airflow.providers.common.compat`` python package.
|
|
56
38
|
|
|
57
39
|
You can find package information and changelog for the provider
|
|
58
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.
|
|
40
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.5.0/>`_.
|
|
59
41
|
|
|
60
42
|
Installation
|
|
61
43
|
------------
|
|
@@ -96,4 +78,4 @@ Dependent package
|
|
|
96
78
|
============================================================================================================== ===============
|
|
97
79
|
|
|
98
80
|
The changelog for the provider package can be found in the
|
|
99
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.
|
|
81
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.5.0/changelog.html>`_.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
# Licensed to the Apache Software Foundation (ASF) under one
|
|
3
2
|
# or more contributor license agreements. See the NOTICE file
|
|
4
3
|
# distributed with this work for additional information
|
|
@@ -16,10 +15,9 @@
|
|
|
16
15
|
# specific language governing permissions and limitations
|
|
17
16
|
# under the License.
|
|
18
17
|
|
|
19
|
-
# NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE
|
|
20
|
-
# OVERWRITTEN WHEN PREPARING PACKAGES.
|
|
18
|
+
# NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
|
|
21
19
|
|
|
22
|
-
# IF YOU WANT TO MODIFY THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
|
|
20
|
+
# IF YOU WANT TO MODIFY THIS FILE EXCEPT DEPENDENCIES, YOU SHOULD MODIFY THE TEMPLATE
|
|
23
21
|
# `pyproject_TEMPLATE.toml.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
|
|
24
22
|
[build-system]
|
|
25
23
|
requires = ["flit_core==3.10.1"]
|
|
@@ -27,7 +25,7 @@ build-backend = "flit_core.buildapi"
|
|
|
27
25
|
|
|
28
26
|
[project]
|
|
29
27
|
name = "apache-airflow-providers-common-compat"
|
|
30
|
-
version = "1.
|
|
28
|
+
version = "1.5.0.rc1"
|
|
31
29
|
description = "Provider package apache-airflow-providers-common-compat for Apache Airflow"
|
|
32
30
|
readme = "README.rst"
|
|
33
31
|
authors = [
|
|
@@ -53,13 +51,26 @@ classifiers = [
|
|
|
53
51
|
"Topic :: System :: Monitoring",
|
|
54
52
|
]
|
|
55
53
|
requires-python = "~=3.9"
|
|
54
|
+
|
|
55
|
+
# The dependencies should be modified in place in the generated file
|
|
56
|
+
# Any change in the dependencies is preserved when the file is regenerated
|
|
56
57
|
dependencies = [
|
|
57
58
|
"apache-airflow>=2.9.0rc0",
|
|
58
59
|
]
|
|
59
60
|
|
|
61
|
+
# The optional dependencies should be modified in place in the generated file
|
|
62
|
+
# Any change in the dependencies is preserved when the file is regenerated
|
|
63
|
+
[project.optional-dependencies]
|
|
64
|
+
"openlineage" = [
|
|
65
|
+
"apache-airflow-providers-openlineage"
|
|
66
|
+
]
|
|
67
|
+
"standard" = [
|
|
68
|
+
"apache-airflow-providers-standard"
|
|
69
|
+
]
|
|
70
|
+
|
|
60
71
|
[project.urls]
|
|
61
|
-
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.
|
|
62
|
-
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.
|
|
72
|
+
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.5.0"
|
|
73
|
+
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-common-compat/1.5.0/changelog.html"
|
|
63
74
|
"Bug Tracker" = "https://github.com/apache/airflow/issues"
|
|
64
75
|
"Source Code" = "https://github.com/apache/airflow"
|
|
65
76
|
"Slack Chat" = "https://s.apache.org/airflow-slack"
|
|
@@ -68,13 +79,9 @@ dependencies = [
|
|
|
68
79
|
|
|
69
80
|
[project.entry-points."apache_airflow_provider"]
|
|
70
81
|
provider_info = "airflow.providers.common.compat.get_provider_info:get_provider_info"
|
|
71
|
-
[project.optional-dependencies]
|
|
72
|
-
"openlineage" = [
|
|
73
|
-
"apache-airflow-providers-openlineage",
|
|
74
|
-
]
|
|
75
|
-
"standard" = [
|
|
76
|
-
"apache-airflow-providers-standard",
|
|
77
|
-
]
|
|
78
82
|
|
|
79
83
|
[tool.flit.module]
|
|
80
84
|
name = "airflow.providers.common.compat"
|
|
85
|
+
|
|
86
|
+
[tool.pytest.ini_options]
|
|
87
|
+
ignore = "tests/system/"
|
|
@@ -199,55 +199,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
199
199
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
200
|
See the License for the specific language governing permissions and
|
|
201
201
|
limitations under the License.
|
|
202
|
-
|
|
203
|
-
============================================================================
|
|
204
|
-
APACHE AIRFLOW SUBCOMPONENTS:
|
|
205
|
-
|
|
206
|
-
The Apache Airflow project contains subcomponents with separate copyright
|
|
207
|
-
notices and license terms. Your use of the source code for the these
|
|
208
|
-
subcomponents is subject to the terms and conditions of the following
|
|
209
|
-
licenses.
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
========================================================================
|
|
213
|
-
Third party Apache 2.0 licenses
|
|
214
|
-
========================================================================
|
|
215
|
-
|
|
216
|
-
The following components are provided under the Apache 2.0 License.
|
|
217
|
-
See project link for details. The text of each license is also included
|
|
218
|
-
at 3rd-party-licenses/LICENSE-[project].txt.
|
|
219
|
-
|
|
220
|
-
(ALv2 License) hue v4.3.0 (https://github.com/cloudera/hue/)
|
|
221
|
-
(ALv2 License) jqclock v2.3.0 (https://github.com/JohnRDOrazio/jQuery-Clock-Plugin)
|
|
222
|
-
(ALv2 License) bootstrap3-typeahead v4.0.2 (https://github.com/bassjobsen/Bootstrap-3-Typeahead)
|
|
223
|
-
(ALv2 License) connexion v2.7.0 (https://github.com/zalando/connexion)
|
|
224
|
-
|
|
225
|
-
========================================================================
|
|
226
|
-
MIT licenses
|
|
227
|
-
========================================================================
|
|
228
|
-
|
|
229
|
-
The following components are provided under the MIT License. See project link for details.
|
|
230
|
-
The text of each license is also included at 3rd-party-licenses/LICENSE-[project].txt.
|
|
231
|
-
|
|
232
|
-
(MIT License) jquery v3.5.1 (https://jquery.org/license/)
|
|
233
|
-
(MIT License) dagre-d3 v0.6.4 (https://github.com/cpettitt/dagre-d3)
|
|
234
|
-
(MIT License) bootstrap v3.4.1 (https://github.com/twbs/bootstrap/)
|
|
235
|
-
(MIT License) d3-tip v0.9.1 (https://github.com/Caged/d3-tip)
|
|
236
|
-
(MIT License) dataTables v1.10.25 (https://datatables.net)
|
|
237
|
-
(MIT License) normalize.css v3.0.2 (http://necolas.github.io/normalize.css/)
|
|
238
|
-
(MIT License) ElasticMock v1.3.2 (https://github.com/vrcmarcos/elasticmock)
|
|
239
|
-
(MIT License) MomentJS v2.24.0 (http://momentjs.com/)
|
|
240
|
-
(MIT License) eonasdan-bootstrap-datetimepicker v4.17.49 (https://github.com/eonasdan/bootstrap-datetimepicker/)
|
|
241
|
-
|
|
242
|
-
========================================================================
|
|
243
|
-
BSD 3-Clause licenses
|
|
244
|
-
========================================================================
|
|
245
|
-
The following components are provided under the BSD 3-Clause license. See project links for details.
|
|
246
|
-
The text of each license is also included at 3rd-party-licenses/LICENSE-[project].txt.
|
|
247
|
-
|
|
248
|
-
(BSD 3 License) d3 v5.16.0 (https://d3js.org)
|
|
249
|
-
(BSD 3 License) d3-shape v2.1.0 (https://github.com/d3/d3-shape)
|
|
250
|
-
(BSD 3 License) cgroupspy 0.2.1 (https://github.com/cloudsigma/cgroupspy)
|
|
251
|
-
|
|
252
|
-
========================================================================
|
|
253
|
-
See 3rd-party-licenses/LICENSES-ui.txt for packages used in `/airflow/www`
|
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "1.
|
|
32
|
+
__version__ = "1.5.0"
|
|
33
33
|
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
35
35
|
"2.9.0"
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
# specific language governing permissions and limitations
|
|
16
16
|
# under the License.
|
|
17
17
|
|
|
18
|
-
# NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE
|
|
19
|
-
# OVERWRITTEN WHEN PREPARING PACKAGES.
|
|
18
|
+
# NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
|
|
20
19
|
#
|
|
21
20
|
# IF YOU WANT TO MODIFY THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
|
|
22
21
|
# `get_provider_info_TEMPLATE.py.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
|
|
@@ -29,8 +28,7 @@ def get_provider_info():
|
|
|
29
28
|
"description": "``Common Compatibility Provider - providing compatibility code for previous Airflow versions.``\n",
|
|
30
29
|
"state": "ready",
|
|
31
30
|
"source-date-epoch": 1731569875,
|
|
32
|
-
"versions": ["1.3.0", "1.2.2", "1.2.1", "1.2.0", "1.1.0", "1.0.0"],
|
|
33
|
-
"dependencies": ["apache-airflow>=2.9.0"],
|
|
31
|
+
"versions": ["1.5.0", "1.3.0", "1.2.2", "1.2.1", "1.2.0", "1.1.0", "1.0.0"],
|
|
34
32
|
"integrations": [
|
|
35
33
|
{
|
|
36
34
|
"integration-name": "Common Compat",
|
|
@@ -38,4 +36,9 @@ def get_provider_info():
|
|
|
38
36
|
"tags": ["software"],
|
|
39
37
|
}
|
|
40
38
|
],
|
|
39
|
+
"dependencies": ["apache-airflow>=2.9.0"],
|
|
40
|
+
"optional-dependencies": {
|
|
41
|
+
"openlineage": ["apache-airflow-providers-openlineage"],
|
|
42
|
+
"standard": ["apache-airflow-providers-standard"],
|
|
43
|
+
},
|
|
41
44
|
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
# or more contributor license agreements. See the NOTICE file
|
|
4
|
+
# distributed with this work for additional information
|
|
5
|
+
# regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
# to you under the Apache License, Version 2.0 (the
|
|
7
|
+
# "License"); you may not use this file except in compliance
|
|
8
|
+
# with the License. You may obtain a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing,
|
|
13
|
+
# software distributed under the License is distributed on an
|
|
14
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
# KIND, either express or implied. See the License for the
|
|
16
|
+
# specific language governing permissions and limitations
|
|
17
|
+
# under the License.
|
|
18
|
+
"""Defines base entities used for providing lineage information."""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
from typing import Any, ClassVar
|
|
23
|
+
|
|
24
|
+
import attr
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@attr.s(auto_attribs=True)
|
|
28
|
+
class File:
|
|
29
|
+
"""File entity. Refers to a file."""
|
|
30
|
+
|
|
31
|
+
template_fields: ClassVar = ("url",)
|
|
32
|
+
|
|
33
|
+
url: str = attr.ib()
|
|
34
|
+
type_hint: str | None = None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@attr.s(auto_attribs=True, kw_only=True)
|
|
38
|
+
class User:
|
|
39
|
+
"""User entity. Identifies a user."""
|
|
40
|
+
|
|
41
|
+
email: str = attr.ib()
|
|
42
|
+
first_name: str | None = None
|
|
43
|
+
last_name: str | None = None
|
|
44
|
+
|
|
45
|
+
template_fields: ClassVar = ("email", "first_name", "last_name")
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@attr.s(auto_attribs=True, kw_only=True)
|
|
49
|
+
class Tag:
|
|
50
|
+
"""Tag or classification entity."""
|
|
51
|
+
|
|
52
|
+
tag_name: str = attr.ib()
|
|
53
|
+
|
|
54
|
+
template_fields: ClassVar = ("tag_name",)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@attr.s(auto_attribs=True, kw_only=True)
|
|
58
|
+
class Column:
|
|
59
|
+
"""Column of a Table."""
|
|
60
|
+
|
|
61
|
+
name: str = attr.ib()
|
|
62
|
+
description: str | None = None
|
|
63
|
+
data_type: str = attr.ib()
|
|
64
|
+
tags: list[Tag] = []
|
|
65
|
+
|
|
66
|
+
template_fields: ClassVar = ("name", "description", "data_type", "tags")
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
# this is a temporary hack to satisfy mypy. Once
|
|
70
|
+
# https://github.com/python/mypy/issues/6136 is resolved, use
|
|
71
|
+
# `attr.converters.default_if_none(default=False)`
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def default_if_none(arg: bool | None) -> bool:
|
|
75
|
+
"""Get default value when None."""
|
|
76
|
+
return arg or False
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
@attr.s(auto_attribs=True, kw_only=True)
|
|
80
|
+
class Table:
|
|
81
|
+
"""Table entity."""
|
|
82
|
+
|
|
83
|
+
database: str = attr.ib()
|
|
84
|
+
cluster: str = attr.ib()
|
|
85
|
+
name: str = attr.ib()
|
|
86
|
+
tags: list[Tag] = []
|
|
87
|
+
description: str | None = None
|
|
88
|
+
columns: list[Column] = []
|
|
89
|
+
owners: list[User] = []
|
|
90
|
+
extra: dict[str, Any] = {}
|
|
91
|
+
type_hint: str | None = None
|
|
92
|
+
|
|
93
|
+
template_fields: ClassVar = (
|
|
94
|
+
"database",
|
|
95
|
+
"cluster",
|
|
96
|
+
"name",
|
|
97
|
+
"tags",
|
|
98
|
+
"description",
|
|
99
|
+
"columns",
|
|
100
|
+
"owners",
|
|
101
|
+
"extra",
|
|
102
|
+
)
|
|
@@ -0,0 +1,130 @@
|
|
|
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
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import logging
|
|
21
|
+
from typing import TYPE_CHECKING
|
|
22
|
+
|
|
23
|
+
log = logging.getLogger(__name__)
|
|
24
|
+
|
|
25
|
+
if TYPE_CHECKING:
|
|
26
|
+
from airflow.providers.openlineage.utils.spark import (
|
|
27
|
+
inject_parent_job_information_into_spark_properties,
|
|
28
|
+
inject_transport_information_into_spark_properties,
|
|
29
|
+
)
|
|
30
|
+
else:
|
|
31
|
+
try:
|
|
32
|
+
from airflow.providers.openlineage.utils.spark import (
|
|
33
|
+
inject_parent_job_information_into_spark_properties,
|
|
34
|
+
inject_transport_information_into_spark_properties,
|
|
35
|
+
)
|
|
36
|
+
except ImportError:
|
|
37
|
+
try:
|
|
38
|
+
from airflow.providers.openlineage.plugins.macros import (
|
|
39
|
+
lineage_job_name,
|
|
40
|
+
lineage_job_namespace,
|
|
41
|
+
lineage_run_id,
|
|
42
|
+
)
|
|
43
|
+
except ImportError:
|
|
44
|
+
|
|
45
|
+
def inject_parent_job_information_into_spark_properties(properties: dict, context) -> dict:
|
|
46
|
+
log.warning(
|
|
47
|
+
"Could not import `airflow.providers.openlineage.plugins.macros`."
|
|
48
|
+
"Skipping the injection of OpenLineage parent job information into Spark properties."
|
|
49
|
+
)
|
|
50
|
+
return properties
|
|
51
|
+
|
|
52
|
+
else:
|
|
53
|
+
|
|
54
|
+
def inject_parent_job_information_into_spark_properties(properties: dict, context) -> dict:
|
|
55
|
+
if any(str(key).startswith("spark.openlineage.parent") for key in properties):
|
|
56
|
+
log.info(
|
|
57
|
+
"Some OpenLineage properties with parent job information are already present "
|
|
58
|
+
"in Spark properties. Skipping the injection of OpenLineage "
|
|
59
|
+
"parent job information into Spark properties."
|
|
60
|
+
)
|
|
61
|
+
return properties
|
|
62
|
+
|
|
63
|
+
ti = context["ti"]
|
|
64
|
+
ol_parent_job_properties = {
|
|
65
|
+
"spark.openlineage.parentJobNamespace": lineage_job_namespace(),
|
|
66
|
+
"spark.openlineage.parentJobName": lineage_job_name(ti),
|
|
67
|
+
"spark.openlineage.parentRunId": lineage_run_id(ti),
|
|
68
|
+
}
|
|
69
|
+
return {**properties, **ol_parent_job_properties}
|
|
70
|
+
|
|
71
|
+
try:
|
|
72
|
+
from airflow.providers.openlineage.plugins.listener import get_openlineage_listener
|
|
73
|
+
except ImportError:
|
|
74
|
+
|
|
75
|
+
def inject_transport_information_into_spark_properties(properties: dict, context) -> dict:
|
|
76
|
+
log.warning(
|
|
77
|
+
"Could not import `airflow.providers.openlineage.plugins.listener`."
|
|
78
|
+
"Skipping the injection of OpenLineage transport information into Spark properties."
|
|
79
|
+
)
|
|
80
|
+
return properties
|
|
81
|
+
|
|
82
|
+
else:
|
|
83
|
+
|
|
84
|
+
def inject_transport_information_into_spark_properties(properties: dict, context) -> dict:
|
|
85
|
+
if any(str(key).startswith("spark.openlineage.transport") for key in properties):
|
|
86
|
+
log.info(
|
|
87
|
+
"Some OpenLineage properties with transport information are already present "
|
|
88
|
+
"in Spark properties. Skipping the injection of OpenLineage "
|
|
89
|
+
"transport information into Spark properties."
|
|
90
|
+
)
|
|
91
|
+
return properties
|
|
92
|
+
|
|
93
|
+
transport = get_openlineage_listener().adapter.get_or_create_openlineage_client().transport
|
|
94
|
+
if transport.kind != "http":
|
|
95
|
+
log.info(
|
|
96
|
+
"OpenLineage transport type `%s` does not support automatic "
|
|
97
|
+
"injection of OpenLineage transport information into Spark properties.",
|
|
98
|
+
transport.kind,
|
|
99
|
+
)
|
|
100
|
+
return {}
|
|
101
|
+
|
|
102
|
+
transport_properties = {
|
|
103
|
+
"spark.openlineage.transport.type": "http",
|
|
104
|
+
"spark.openlineage.transport.url": transport.url,
|
|
105
|
+
"spark.openlineage.transport.endpoint": transport.endpoint,
|
|
106
|
+
# Timeout is converted to milliseconds, as required by Spark integration,
|
|
107
|
+
"spark.openlineage.transport.timeoutInMillis": str(int(transport.timeout * 1000)),
|
|
108
|
+
}
|
|
109
|
+
if transport.compression:
|
|
110
|
+
transport_properties["spark.openlineage.transport.compression"] = str(
|
|
111
|
+
transport.compression
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
if hasattr(transport.config.auth, "api_key") and transport.config.auth.get_bearer():
|
|
115
|
+
transport_properties["spark.openlineage.transport.auth.type"] = "api_key"
|
|
116
|
+
transport_properties["spark.openlineage.transport.auth.apiKey"] = (
|
|
117
|
+
transport.config.auth.get_bearer()
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
if hasattr(transport.config, "custom_headers") and transport.config.custom_headers:
|
|
121
|
+
for key, value in transport.config.custom_headers.items():
|
|
122
|
+
transport_properties[f"spark.openlineage.transport.headers.{key}"] = value
|
|
123
|
+
|
|
124
|
+
return {**properties, **transport_properties}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
__all__ = [
|
|
128
|
+
"inject_parent_job_information_into_spark_properties",
|
|
129
|
+
"inject_transport_information_into_spark_properties",
|
|
130
|
+
]
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import logging
|
|
21
|
+
from typing import TYPE_CHECKING
|
|
22
|
+
|
|
23
|
+
log = logging.getLogger(__name__)
|
|
24
|
+
|
|
25
|
+
if TYPE_CHECKING:
|
|
26
|
+
from airflow.providers.openlineage.sqlparser import get_openlineage_facets_with_sql
|
|
27
|
+
|
|
28
|
+
else:
|
|
29
|
+
try:
|
|
30
|
+
from airflow.providers.openlineage.sqlparser import get_openlineage_facets_with_sql
|
|
31
|
+
except ImportError:
|
|
32
|
+
|
|
33
|
+
def get_openlineage_facets_with_sql(
|
|
34
|
+
hook,
|
|
35
|
+
sql: str | list[str],
|
|
36
|
+
conn_id: str,
|
|
37
|
+
database: str | None,
|
|
38
|
+
):
|
|
39
|
+
try:
|
|
40
|
+
from airflow.providers.openlineage.sqlparser import SQLParser
|
|
41
|
+
except ImportError:
|
|
42
|
+
log.debug("SQLParser could not be imported from OpenLineage provider.")
|
|
43
|
+
return None
|
|
44
|
+
|
|
45
|
+
try:
|
|
46
|
+
from airflow.providers.openlineage.utils.utils import should_use_external_connection
|
|
47
|
+
|
|
48
|
+
use_external_connection = should_use_external_connection(hook)
|
|
49
|
+
except ImportError:
|
|
50
|
+
# OpenLineage provider release < 1.8.0 - we always use connection
|
|
51
|
+
use_external_connection = True
|
|
52
|
+
|
|
53
|
+
connection = hook.get_connection(conn_id)
|
|
54
|
+
try:
|
|
55
|
+
database_info = hook.get_openlineage_database_info(connection)
|
|
56
|
+
except AttributeError:
|
|
57
|
+
log.debug("%s has no database info provided", hook)
|
|
58
|
+
database_info = None
|
|
59
|
+
|
|
60
|
+
if database_info is None:
|
|
61
|
+
return None
|
|
62
|
+
|
|
63
|
+
try:
|
|
64
|
+
sql_parser = SQLParser(
|
|
65
|
+
dialect=hook.get_openlineage_database_dialect(connection),
|
|
66
|
+
default_schema=hook.get_openlineage_default_schema(),
|
|
67
|
+
)
|
|
68
|
+
except AttributeError:
|
|
69
|
+
log.debug("%s failed to get database dialect", hook)
|
|
70
|
+
return None
|
|
71
|
+
|
|
72
|
+
try:
|
|
73
|
+
sqlalchemy_engine = hook.get_sqlalchemy_engine()
|
|
74
|
+
except Exception as e:
|
|
75
|
+
log.debug("Failed to get sql alchemy engine: %s", e)
|
|
76
|
+
sqlalchemy_engine = None
|
|
77
|
+
|
|
78
|
+
operator_lineage = sql_parser.generate_openlineage_metadata_from_sql(
|
|
79
|
+
sql=sql,
|
|
80
|
+
hook=hook,
|
|
81
|
+
database_info=database_info,
|
|
82
|
+
database=database,
|
|
83
|
+
sqlalchemy_engine=sqlalchemy_engine,
|
|
84
|
+
use_connection=use_external_connection,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
return operator_lineage
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
__all__ = ["get_openlineage_facets_with_sql"]
|
|
@@ -1,68 +0,0 @@
|
|
|
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
|
-
from __future__ import annotations
|
|
19
|
-
|
|
20
|
-
import logging
|
|
21
|
-
from typing import TYPE_CHECKING
|
|
22
|
-
|
|
23
|
-
log = logging.getLogger(__name__)
|
|
24
|
-
|
|
25
|
-
if TYPE_CHECKING:
|
|
26
|
-
from airflow.providers.openlineage.utils.spark import inject_parent_job_information_into_spark_properties
|
|
27
|
-
else:
|
|
28
|
-
try:
|
|
29
|
-
from airflow.providers.openlineage.utils.spark import (
|
|
30
|
-
inject_parent_job_information_into_spark_properties,
|
|
31
|
-
)
|
|
32
|
-
except ImportError:
|
|
33
|
-
try:
|
|
34
|
-
from airflow.providers.openlineage.plugins.macros import (
|
|
35
|
-
lineage_job_name,
|
|
36
|
-
lineage_job_namespace,
|
|
37
|
-
lineage_run_id,
|
|
38
|
-
)
|
|
39
|
-
except ImportError:
|
|
40
|
-
|
|
41
|
-
def inject_parent_job_information_into_spark_properties(properties: dict, context) -> dict:
|
|
42
|
-
log.warning(
|
|
43
|
-
"Could not import `airflow.providers.openlineage.plugins.macros`."
|
|
44
|
-
"Skipping the injection of OpenLineage parent job information into Spark properties."
|
|
45
|
-
)
|
|
46
|
-
return properties
|
|
47
|
-
|
|
48
|
-
else:
|
|
49
|
-
|
|
50
|
-
def inject_parent_job_information_into_spark_properties(properties: dict, context) -> dict:
|
|
51
|
-
if any(str(key).startswith("spark.openlineage.parent") for key in properties):
|
|
52
|
-
log.info(
|
|
53
|
-
"Some OpenLineage properties with parent job information are already present "
|
|
54
|
-
"in Spark properties. Skipping the injection of OpenLineage "
|
|
55
|
-
"parent job information into Spark properties."
|
|
56
|
-
)
|
|
57
|
-
return properties
|
|
58
|
-
|
|
59
|
-
ti = context["ti"]
|
|
60
|
-
ol_parent_job_properties = {
|
|
61
|
-
"spark.openlineage.parentJobNamespace": lineage_job_namespace(),
|
|
62
|
-
"spark.openlineage.parentJobName": lineage_job_name(ti),
|
|
63
|
-
"spark.openlineage.parentRunId": lineage_run_id(ti),
|
|
64
|
-
}
|
|
65
|
-
return {**properties, **ol_parent_job_properties}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
__all__ = ["inject_parent_job_information_into_spark_properties"]
|
|
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
|