apache-airflow-providers-openlineage 2.1.0rc1__tar.gz → 2.1.1rc1__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-openlineage might be problematic. Click here for more details.
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/PKG-INFO +24 -27
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/README.rst +20 -22
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/pyproject.toml +27 -8
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/__init__.py +1 -1
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/extractors/bash.py +2 -1
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/extractors/manager.py +4 -2
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/extractors/python.py +2 -1
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/get_provider_info.py +6 -5
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/plugins/facets.py +0 -1
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/plugins/listener.py +2 -2
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/utils/sql.py +1 -2
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/utils/utils.py +32 -21
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/LICENSE +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/conf.py +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/extractors/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/extractors/base.py +2 -2
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/facets/AirflowDagRunFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/facets/AirflowDebugRunFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/facets/AirflowJobFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/facets/AirflowRunFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/facets/AirflowStateRunFacet.json +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/facets/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/plugins/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/plugins/adapter.py +10 -10
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/plugins/macros.py +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/plugins/openlineage.py +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/sqlparser.py +4 -4
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/utils/__init__.py +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/utils/selective_enable.py +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/utils/spark.py +0 -0
- {apache_airflow_providers_openlineage-2.1.0rc1 → apache_airflow_providers_openlineage-2.1.1rc1}/src/airflow/providers/openlineage/version_compat.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: apache-airflow-providers-openlineage
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.1rc1
|
|
4
4
|
Summary: Provider package apache-airflow-providers-openlineage for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,openlineage,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
@@ -26,42 +26,40 @@ Requires-Dist: apache-airflow-providers-common-compat>=1.4.0rc0
|
|
|
26
26
|
Requires-Dist: attrs>=22.2
|
|
27
27
|
Requires-Dist: openlineage-integration-common>=1.24.2
|
|
28
28
|
Requires-Dist: openlineage-python>=1.24.2
|
|
29
|
-
Requires-Dist: uuid6>=2024.7.10
|
|
30
29
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
31
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.
|
|
32
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.
|
|
30
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.1/changelog.html
|
|
31
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.1
|
|
33
32
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
34
33
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
35
34
|
Project-URL: Twitter, https://x.com/ApacheAirflow
|
|
36
35
|
Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
37
36
|
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
39
|
+
or more contributor license agreements. See the NOTICE file
|
|
40
|
+
distributed with this work for additional information
|
|
41
|
+
regarding copyright ownership. The ASF licenses this file
|
|
42
|
+
to you under the Apache License, Version 2.0 (the
|
|
43
|
+
"License"); you may not use this file except in compliance
|
|
44
|
+
with the License. You may obtain a copy of the License at
|
|
46
45
|
|
|
47
|
-
|
|
46
|
+
.. http://www.apache.org/licenses/LICENSE-2.0
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
.. Unless required by applicable law or agreed to in writing,
|
|
49
|
+
software distributed under the License is distributed on an
|
|
50
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
51
|
+
KIND, either express or implied. See the License for the
|
|
52
|
+
specific language governing permissions and limitations
|
|
53
|
+
under the License.
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
.. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
|
|
59
|
-
`PROVIDER_README_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
|
|
55
|
+
.. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
|
|
60
56
|
|
|
57
|
+
.. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
|
|
58
|
+
``PROVIDER_README_TEMPLATE.rst.jinja2`` IN the ``dev/breeze/src/airflow_breeze/templates`` DIRECTORY
|
|
61
59
|
|
|
62
60
|
Package ``apache-airflow-providers-openlineage``
|
|
63
61
|
|
|
64
|
-
Release: ``2.1.
|
|
62
|
+
Release: ``2.1.1``
|
|
65
63
|
|
|
66
64
|
|
|
67
65
|
`OpenLineage <https://openlineage.io/>`__
|
|
@@ -74,7 +72,7 @@ This is a provider package for ``openlineage`` provider. All classes for this pr
|
|
|
74
72
|
are in ``airflow.providers.openlineage`` python package.
|
|
75
73
|
|
|
76
74
|
You can find package information and changelog for the provider
|
|
77
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.
|
|
75
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.1/>`_.
|
|
78
76
|
|
|
79
77
|
Installation
|
|
80
78
|
------------
|
|
@@ -97,7 +95,6 @@ PIP package Version required
|
|
|
97
95
|
``attrs`` ``>=22.2``
|
|
98
96
|
``openlineage-integration-common`` ``>=1.24.2``
|
|
99
97
|
``openlineage-python`` ``>=1.24.2``
|
|
100
|
-
``uuid6`` ``>=2024.7.10``
|
|
101
98
|
========================================== ==================
|
|
102
99
|
|
|
103
100
|
Cross provider package dependencies
|
|
@@ -121,5 +118,5 @@ Dependent package
|
|
|
121
118
|
================================================================================================================== =================
|
|
122
119
|
|
|
123
120
|
The changelog for the provider package can be found in the
|
|
124
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.
|
|
121
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.1/changelog.html>`_.
|
|
125
122
|
|
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
9
|
|
|
10
|
-
|
|
10
|
+
.. http://www.apache.org/licenses/LICENSE-2.0
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
.. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
|
|
22
|
-
`PROVIDER_README_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
|
|
19
|
+
.. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
|
|
23
20
|
|
|
21
|
+
.. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
|
|
22
|
+
``PROVIDER_README_TEMPLATE.rst.jinja2`` IN the ``dev/breeze/src/airflow_breeze/templates`` DIRECTORY
|
|
24
23
|
|
|
25
24
|
Package ``apache-airflow-providers-openlineage``
|
|
26
25
|
|
|
27
|
-
Release: ``2.1.
|
|
26
|
+
Release: ``2.1.1``
|
|
28
27
|
|
|
29
28
|
|
|
30
29
|
`OpenLineage <https://openlineage.io/>`__
|
|
@@ -37,7 +36,7 @@ This is a provider package for ``openlineage`` provider. All classes for this pr
|
|
|
37
36
|
are in ``airflow.providers.openlineage`` python package.
|
|
38
37
|
|
|
39
38
|
You can find package information and changelog for the provider
|
|
40
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.
|
|
39
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.1/>`_.
|
|
41
40
|
|
|
42
41
|
Installation
|
|
43
42
|
------------
|
|
@@ -60,7 +59,6 @@ PIP package Version required
|
|
|
60
59
|
``attrs`` ``>=22.2``
|
|
61
60
|
``openlineage-integration-common`` ``>=1.24.2``
|
|
62
61
|
``openlineage-python`` ``>=1.24.2``
|
|
63
|
-
``uuid6`` ``>=2024.7.10``
|
|
64
62
|
========================================== ==================
|
|
65
63
|
|
|
66
64
|
Cross provider package dependencies
|
|
@@ -84,4 +82,4 @@ Dependent package
|
|
|
84
82
|
================================================================================================================== =================
|
|
85
83
|
|
|
86
84
|
The changelog for the provider package can be found in the
|
|
87
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.
|
|
85
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.1/changelog.html>`_.
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
# IF YOU WANT TO MODIFY THIS FILE EXCEPT DEPENDENCIES, YOU SHOULD MODIFY THE TEMPLATE
|
|
21
21
|
# `pyproject_TEMPLATE.toml.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
|
|
22
22
|
[build-system]
|
|
23
|
-
requires = ["flit_core==3.
|
|
23
|
+
requires = ["flit_core==3.11.0"]
|
|
24
24
|
build-backend = "flit_core.buildapi"
|
|
25
25
|
|
|
26
26
|
[project]
|
|
27
27
|
name = "apache-airflow-providers-openlineage"
|
|
28
|
-
version = "2.1.
|
|
28
|
+
version = "2.1.1.rc1"
|
|
29
29
|
description = "Provider package apache-airflow-providers-openlineage for Apache Airflow"
|
|
30
30
|
readme = "README.rst"
|
|
31
31
|
authors = [
|
|
@@ -52,8 +52,10 @@ classifiers = [
|
|
|
52
52
|
]
|
|
53
53
|
requires-python = "~=3.9"
|
|
54
54
|
|
|
55
|
-
# The dependencies should be modified in place in the generated file
|
|
55
|
+
# The dependencies should be modified in place in the generated file.
|
|
56
56
|
# Any change in the dependencies is preserved when the file is regenerated
|
|
57
|
+
# Make sure to run ``breeze static-checks --type update-providers-dependencies --all-files``
|
|
58
|
+
# After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
|
|
57
59
|
dependencies = [
|
|
58
60
|
"apache-airflow>=2.9.0rc0",
|
|
59
61
|
"apache-airflow-providers-common-sql>=1.20.0rc0",
|
|
@@ -61,12 +63,32 @@ dependencies = [
|
|
|
61
63
|
"attrs>=22.2",
|
|
62
64
|
"openlineage-integration-common>=1.24.2",
|
|
63
65
|
"openlineage-python>=1.24.2",
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
[dependency-groups]
|
|
69
|
+
dev = [
|
|
70
|
+
"apache-airflow",
|
|
71
|
+
"apache-airflow-task-sdk",
|
|
72
|
+
"apache-airflow-devel-common",
|
|
73
|
+
"apache-airflow-providers-common-compat",
|
|
74
|
+
"apache-airflow-providers-common-sql",
|
|
75
|
+
# Additional devel dependencies (do not remove this line and add extra development dependencies)
|
|
64
76
|
"uuid6>=2024.7.10",
|
|
65
77
|
]
|
|
66
78
|
|
|
79
|
+
[tool.uv.sources]
|
|
80
|
+
# These names must match the names as defined in the pyproject.toml of the workspace items,
|
|
81
|
+
# *not* the workspace folder paths
|
|
82
|
+
apache-airflow = {workspace = true}
|
|
83
|
+
apache-airflow-devel-common = {workspace = true}
|
|
84
|
+
apache-airflow-task-sdk = {workspace = true}
|
|
85
|
+
apache-airflow-providers-common-sql = {workspace = true}
|
|
86
|
+
apache-airflow-providers-fab = {workspace = true}
|
|
87
|
+
apache-airflow-providers-standard = {workspace = true}
|
|
88
|
+
|
|
67
89
|
[project.urls]
|
|
68
|
-
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.
|
|
69
|
-
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.
|
|
90
|
+
"Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.1"
|
|
91
|
+
"Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-openlineage/2.1.1/changelog.html"
|
|
70
92
|
"Bug Tracker" = "https://github.com/apache/airflow/issues"
|
|
71
93
|
"Source Code" = "https://github.com/apache/airflow"
|
|
72
94
|
"Slack Chat" = "https://s.apache.org/airflow-slack"
|
|
@@ -81,6 +103,3 @@ openlineage = "airflow.providers.openlineage.plugins.openlineage:OpenLineageProv
|
|
|
81
103
|
|
|
82
104
|
[tool.flit.module]
|
|
83
105
|
name = "airflow.providers.openlineage"
|
|
84
|
-
|
|
85
|
-
[tool.pytest.ini_options]
|
|
86
|
-
ignore = "tests/system/"
|
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "2.1.
|
|
32
|
+
__version__ = "2.1.1"
|
|
33
33
|
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
35
35
|
"2.9.0"
|
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
|
|
18
18
|
from __future__ import annotations
|
|
19
19
|
|
|
20
|
+
from openlineage.client.facet_v2 import source_code_job
|
|
21
|
+
|
|
20
22
|
from airflow.providers.openlineage import conf
|
|
21
23
|
from airflow.providers.openlineage.extractors.base import BaseExtractor, OperatorLineage
|
|
22
24
|
from airflow.providers.openlineage.utils.utils import get_unknown_source_attribute_run_facet
|
|
23
|
-
from openlineage.client.facet_v2 import source_code_job
|
|
24
25
|
|
|
25
26
|
"""
|
|
26
27
|
:meta private:
|
|
@@ -34,9 +34,10 @@ from airflow.providers.openlineage.utils.utils import (
|
|
|
34
34
|
from airflow.utils.log.logging_mixin import LoggingMixin
|
|
35
35
|
|
|
36
36
|
if TYPE_CHECKING:
|
|
37
|
+
from openlineage.client.event_v2 import Dataset
|
|
38
|
+
|
|
37
39
|
from airflow.models import Operator
|
|
38
40
|
from airflow.providers.common.compat.lineage.entities import Table
|
|
39
|
-
from openlineage.client.event_v2 import Dataset
|
|
40
41
|
|
|
41
42
|
|
|
42
43
|
def _iter_extractor_types() -> Iterator[type[BaseExtractor]]:
|
|
@@ -290,9 +291,10 @@ class ExtractorManager(LoggingMixin):
|
|
|
290
291
|
|
|
291
292
|
@staticmethod
|
|
292
293
|
def convert_to_ol_dataset(obj) -> Dataset | None:
|
|
293
|
-
from airflow.providers.common.compat.lineage.entities import File, Table
|
|
294
294
|
from openlineage.client.event_v2 import Dataset
|
|
295
295
|
|
|
296
|
+
from airflow.providers.common.compat.lineage.entities import File, Table
|
|
297
|
+
|
|
296
298
|
if isinstance(obj, Dataset):
|
|
297
299
|
return obj
|
|
298
300
|
elif isinstance(obj, Table):
|
|
@@ -20,10 +20,11 @@ from __future__ import annotations
|
|
|
20
20
|
import inspect
|
|
21
21
|
from typing import Callable
|
|
22
22
|
|
|
23
|
+
from openlineage.client.facet_v2 import source_code_job
|
|
24
|
+
|
|
23
25
|
from airflow.providers.openlineage import conf
|
|
24
26
|
from airflow.providers.openlineage.extractors.base import BaseExtractor, OperatorLineage
|
|
25
27
|
from airflow.providers.openlineage.utils.utils import get_unknown_source_attribute_run_facet
|
|
26
|
-
from openlineage.client.facet_v2 import source_code_job
|
|
27
28
|
|
|
28
29
|
"""
|
|
29
30
|
:meta private:
|
|
@@ -27,8 +27,9 @@ def get_provider_info():
|
|
|
27
27
|
"name": "OpenLineage Airflow",
|
|
28
28
|
"description": "`OpenLineage <https://openlineage.io/>`__\n",
|
|
29
29
|
"state": "ready",
|
|
30
|
-
"source-date-epoch":
|
|
30
|
+
"source-date-epoch": 1741509355,
|
|
31
31
|
"versions": [
|
|
32
|
+
"2.1.1",
|
|
32
33
|
"2.1.0",
|
|
33
34
|
"2.0.0",
|
|
34
35
|
"1.14.0",
|
|
@@ -72,7 +73,7 @@ def get_provider_info():
|
|
|
72
73
|
],
|
|
73
74
|
"config": {
|
|
74
75
|
"openlineage": {
|
|
75
|
-
"description": "This section applies settings for OpenLineage integration.\nMore about configuration and it's precedence can be found
|
|
76
|
+
"description": "This section applies settings for OpenLineage integration.\nMore about configuration and it's precedence can be found in the `user's guide\n<https://airflow.apache.org/docs/apache-airflow-providers-openlineage/stable/guides/user.html#transport-setup>`_.\n",
|
|
76
77
|
"options": {
|
|
77
78
|
"disabled": {
|
|
78
79
|
"description": "Disable sending events without uninstalling the OpenLineage Provider by setting this to true.\n",
|
|
@@ -124,7 +125,7 @@ def get_provider_info():
|
|
|
124
125
|
"default": "",
|
|
125
126
|
},
|
|
126
127
|
"transport": {
|
|
127
|
-
"description": "Pass OpenLineage Client transport configuration as JSON string
|
|
128
|
+
"description": "Pass OpenLineage Client transport configuration as a JSON string, including the transport type\nand any additional options specific to that type, as described in `OpenLineage docs\n<https://openlineage.io/docs/client/python/#built-in-transport-types>`_.\n\nCurrently supported types are:\n\n * HTTP\n * Kafka\n * Console\n * File\n * Composite\n * Custom\n",
|
|
128
129
|
"type": "string",
|
|
129
130
|
"example": '{"type": "http", "url": "http://localhost:5000", "endpoint": "api/v1/lineage"}',
|
|
130
131
|
"default": "",
|
|
@@ -145,7 +146,7 @@ def get_provider_info():
|
|
|
145
146
|
"version_added": "1.8.0",
|
|
146
147
|
},
|
|
147
148
|
"execution_timeout": {
|
|
148
|
-
"description": "Maximum amount of time (in seconds) that OpenLineage can spend executing metadata extraction.\n",
|
|
149
|
+
"description": "Maximum amount of time (in seconds) that OpenLineage can spend executing metadata extraction.\nNote that other configurations, sometimes with higher priority, such as\n`[core] task_success_overtime\n<https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#task-success-overtime>`_,\nmay also affect how much time OpenLineage has for execution.\n",
|
|
149
150
|
"default": "10",
|
|
150
151
|
"example": None,
|
|
151
152
|
"type": "integer",
|
|
@@ -189,6 +190,6 @@ def get_provider_info():
|
|
|
189
190
|
"attrs>=22.2",
|
|
190
191
|
"openlineage-integration-common>=1.24.2",
|
|
191
192
|
"openlineage-python>=1.24.2",
|
|
192
|
-
"uuid6>=2024.7.10",
|
|
193
193
|
],
|
|
194
|
+
"devel-dependencies": ["uuid6>=2024.7.10"],
|
|
194
195
|
}
|
|
@@ -23,6 +23,7 @@ from datetime import datetime
|
|
|
23
23
|
from typing import TYPE_CHECKING
|
|
24
24
|
|
|
25
25
|
import psutil
|
|
26
|
+
from openlineage.client.serde import Serde
|
|
26
27
|
from setproctitle import getproctitle, setproctitle
|
|
27
28
|
|
|
28
29
|
from airflow import settings
|
|
@@ -50,7 +51,6 @@ from airflow.stats import Stats
|
|
|
50
51
|
from airflow.utils import timezone
|
|
51
52
|
from airflow.utils.state import TaskInstanceState
|
|
52
53
|
from airflow.utils.timeout import timeout
|
|
53
|
-
from openlineage.client.serde import Serde
|
|
54
54
|
|
|
55
55
|
if TYPE_CHECKING:
|
|
56
56
|
from airflow.models import TaskInstance
|
|
@@ -104,7 +104,7 @@ class OpenLineageListener:
|
|
|
104
104
|
assert task
|
|
105
105
|
dagrun = context["dag_run"]
|
|
106
106
|
dag = context["dag"]
|
|
107
|
-
start_date =
|
|
107
|
+
start_date = task_instance.start_date
|
|
108
108
|
self._on_task_instance_running(task_instance, dag, dagrun, task, start_date)
|
|
109
109
|
else:
|
|
110
110
|
|
|
@@ -23,10 +23,9 @@ from enum import IntEnum
|
|
|
23
23
|
from typing import TYPE_CHECKING, Optional
|
|
24
24
|
|
|
25
25
|
from attrs import define
|
|
26
|
-
from sqlalchemy import Column, MetaData, Table, and_, or_, union_all
|
|
27
|
-
|
|
28
26
|
from openlineage.client.event_v2 import Dataset
|
|
29
27
|
from openlineage.client.facet_v2 import schema_dataset
|
|
28
|
+
from sqlalchemy import Column, MetaData, Table, and_, or_, union_all
|
|
30
29
|
|
|
31
30
|
if TYPE_CHECKING:
|
|
32
31
|
from sqlalchemy.engine import Engine
|
|
@@ -26,6 +26,7 @@ from importlib import metadata
|
|
|
26
26
|
from typing import TYPE_CHECKING, Any, Callable
|
|
27
27
|
|
|
28
28
|
import attrs
|
|
29
|
+
from openlineage.client.utils import RedactMixin
|
|
29
30
|
|
|
30
31
|
from airflow import __version__ as AIRFLOW_VERSION
|
|
31
32
|
|
|
@@ -54,7 +55,6 @@ from airflow.sensors.base import BaseSensorOperator
|
|
|
54
55
|
from airflow.serialization.serialized_objects import SerializedBaseOperator
|
|
55
56
|
from airflow.utils.module_loading import import_string
|
|
56
57
|
from airflow.utils.session import NEW_SESSION, provide_session
|
|
57
|
-
from openlineage.client.utils import RedactMixin
|
|
58
58
|
|
|
59
59
|
try:
|
|
60
60
|
from airflow.sdk import BaseOperator as SdkBaseOperator
|
|
@@ -62,6 +62,9 @@ except ImportError:
|
|
|
62
62
|
SdkBaseOperator = BaseOperator # type: ignore[misc]
|
|
63
63
|
|
|
64
64
|
if TYPE_CHECKING:
|
|
65
|
+
from openlineage.client.event_v2 import Dataset as OpenLineageDataset
|
|
66
|
+
from openlineage.client.facet_v2 import RunFacet, processing_engine_run
|
|
67
|
+
|
|
65
68
|
from airflow.models import TaskInstance
|
|
66
69
|
from airflow.providers.common.compat.assets import Asset
|
|
67
70
|
from airflow.sdk import DAG, MappedOperator
|
|
@@ -72,8 +75,6 @@ if TYPE_CHECKING:
|
|
|
72
75
|
should_hide_value_for_key,
|
|
73
76
|
)
|
|
74
77
|
from airflow.utils.state import DagRunState, TaskInstanceState
|
|
75
|
-
from openlineage.client.event_v2 import Dataset as OpenLineageDataset
|
|
76
|
-
from openlineage.client.facet_v2 import RunFacet, processing_engine_run
|
|
77
78
|
else:
|
|
78
79
|
try:
|
|
79
80
|
from airflow.sdk import DAG, MappedOperator
|
|
@@ -325,25 +326,35 @@ class DagInfo(InfoJsonEncodable):
|
|
|
325
326
|
|
|
326
327
|
@classmethod
|
|
327
328
|
def serialize_timetable(cls, dag: DAG) -> dict[str, Any]:
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
"
|
|
329
|
+
# This is enough for Airflow 2.10+ and has all the information needed
|
|
330
|
+
serialized = dag.timetable.serialize() or {}
|
|
331
|
+
|
|
332
|
+
# In Airflow 2.9 when using Dataset scheduling we do not receive datasets in serialized timetable
|
|
333
|
+
# Also for DatasetOrTimeSchedule, we only receive timetable without dataset_condition
|
|
334
|
+
if hasattr(dag, "dataset_triggers") and "dataset_condition" not in serialized:
|
|
335
|
+
try:
|
|
336
|
+
# Make sure we are in Airflow version where these are importable
|
|
337
|
+
from airflow.datasets import BaseDatasetEventInput, DatasetAll, DatasetAny
|
|
338
|
+
except ImportError:
|
|
339
|
+
log.warning("OpenLineage could not serialize full dag's timetable for dag `%s`.", dag.dag_id)
|
|
340
|
+
return serialized
|
|
341
|
+
|
|
342
|
+
def _serialize_ds(ds: BaseDatasetEventInput) -> dict[str, Any]:
|
|
343
|
+
if isinstance(ds, (DatasetAny, DatasetAll)):
|
|
344
|
+
return {
|
|
345
|
+
"__type": "dataset_all" if isinstance(ds, DatasetAll) else "dataset_any",
|
|
346
|
+
"objects": [_serialize_ds(child) for child in ds.objects],
|
|
347
|
+
}
|
|
348
|
+
return {"__type": "dataset", "uri": ds.uri, "extra": ds.extra}
|
|
349
|
+
|
|
350
|
+
if isinstance(dag.dataset_triggers, BaseDatasetEventInput):
|
|
351
|
+
serialized["dataset_condition"] = _serialize_ds(dag.dataset_triggers)
|
|
352
|
+
elif isinstance(dag.dataset_triggers, list) and len(dag.dataset_triggers):
|
|
353
|
+
serialized["dataset_condition"] = {
|
|
339
354
|
"__type": "dataset_all",
|
|
340
|
-
"objects": [
|
|
341
|
-
{"__type": "dataset", "uri": trigger.uri, "extra": trigger.extra}
|
|
342
|
-
for trigger in triggers
|
|
343
|
-
],
|
|
355
|
+
"objects": [_serialize_ds(trigger) for trigger in dag.dataset_triggers],
|
|
344
356
|
}
|
|
345
|
-
|
|
346
|
-
return {}
|
|
357
|
+
return serialized
|
|
347
358
|
|
|
348
359
|
|
|
349
360
|
class DagRunInfo(InfoJsonEncodable):
|
|
@@ -354,7 +365,7 @@ class DagRunInfo(InfoJsonEncodable):
|
|
|
354
365
|
"dag_id",
|
|
355
366
|
"data_interval_start",
|
|
356
367
|
"data_interval_end",
|
|
357
|
-
"external_trigger",
|
|
368
|
+
"external_trigger", # Removed in Airflow 3, use run_type instead
|
|
358
369
|
"run_id",
|
|
359
370
|
"run_type",
|
|
360
371
|
"start_date",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -22,16 +22,16 @@ from abc import ABC, abstractmethod
|
|
|
22
22
|
from typing import Generic, TypeVar, Union
|
|
23
23
|
|
|
24
24
|
from attrs import Factory, define
|
|
25
|
-
|
|
26
25
|
from openlineage.client.event_v2 import Dataset as OLDataset
|
|
27
26
|
|
|
28
27
|
with warnings.catch_warnings():
|
|
29
28
|
warnings.simplefilter("ignore", DeprecationWarning)
|
|
30
29
|
from openlineage.client.facet import BaseFacet as BaseFacet_V1
|
|
30
|
+
from openlineage.client.facet_v2 import JobFacet, RunFacet
|
|
31
|
+
|
|
31
32
|
from airflow.providers.openlineage.utils.utils import AIRFLOW_V_2_10_PLUS
|
|
32
33
|
from airflow.utils.log.logging_mixin import LoggingMixin
|
|
33
34
|
from airflow.utils.state import TaskInstanceState
|
|
34
|
-
from openlineage.client.facet_v2 import JobFacet, RunFacet
|
|
35
35
|
|
|
36
36
|
# this is not to break static checks compatibility with v1 OpenLineage facet classes
|
|
37
37
|
DatasetSubclass = TypeVar("DatasetSubclass", bound=OLDataset)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -21,16 +21,6 @@ from contextlib import ExitStack
|
|
|
21
21
|
from typing import TYPE_CHECKING
|
|
22
22
|
|
|
23
23
|
import yaml
|
|
24
|
-
|
|
25
|
-
from airflow.providers.openlineage import __version__ as OPENLINEAGE_PROVIDER_VERSION, conf
|
|
26
|
-
from airflow.providers.openlineage.utils.utils import (
|
|
27
|
-
OpenLineageRedactor,
|
|
28
|
-
get_airflow_debug_facet,
|
|
29
|
-
get_airflow_state_run_facet,
|
|
30
|
-
get_processing_engine_facet,
|
|
31
|
-
)
|
|
32
|
-
from airflow.stats import Stats
|
|
33
|
-
from airflow.utils.log.logging_mixin import LoggingMixin
|
|
34
24
|
from openlineage.client import OpenLineageClient, set_producer
|
|
35
25
|
from openlineage.client.event_v2 import Job, Run, RunEvent, RunState
|
|
36
26
|
from openlineage.client.facet_v2 import (
|
|
@@ -46,6 +36,16 @@ from openlineage.client.facet_v2 import (
|
|
|
46
36
|
)
|
|
47
37
|
from openlineage.client.uuid import generate_static_uuid
|
|
48
38
|
|
|
39
|
+
from airflow.providers.openlineage import __version__ as OPENLINEAGE_PROVIDER_VERSION, conf
|
|
40
|
+
from airflow.providers.openlineage.utils.utils import (
|
|
41
|
+
OpenLineageRedactor,
|
|
42
|
+
get_airflow_debug_facet,
|
|
43
|
+
get_airflow_state_run_facet,
|
|
44
|
+
get_processing_engine_facet,
|
|
45
|
+
)
|
|
46
|
+
from airflow.stats import Stats
|
|
47
|
+
from airflow.utils.log.logging_mixin import LoggingMixin
|
|
48
|
+
|
|
49
49
|
if TYPE_CHECKING:
|
|
50
50
|
from datetime import datetime
|
|
51
51
|
|
|
File without changes
|
|
File without changes
|
|
@@ -21,6 +21,9 @@ from typing import TYPE_CHECKING, Callable, TypedDict
|
|
|
21
21
|
|
|
22
22
|
import sqlparse
|
|
23
23
|
from attrs import define
|
|
24
|
+
from openlineage.client.event_v2 import Dataset
|
|
25
|
+
from openlineage.client.facet_v2 import column_lineage_dataset, extraction_error_run, sql_job
|
|
26
|
+
from openlineage.common.sql import DbTableMeta, SqlMeta, parse
|
|
24
27
|
|
|
25
28
|
from airflow.providers.openlineage.extractors.base import OperatorLineage
|
|
26
29
|
from airflow.providers.openlineage.utils.sql import (
|
|
@@ -30,16 +33,13 @@ from airflow.providers.openlineage.utils.sql import (
|
|
|
30
33
|
)
|
|
31
34
|
from airflow.providers.openlineage.utils.utils import should_use_external_connection
|
|
32
35
|
from airflow.utils.log.logging_mixin import LoggingMixin
|
|
33
|
-
from openlineage.client.event_v2 import Dataset
|
|
34
|
-
from openlineage.client.facet_v2 import column_lineage_dataset, extraction_error_run, sql_job
|
|
35
|
-
from openlineage.common.sql import DbTableMeta, SqlMeta, parse
|
|
36
36
|
|
|
37
37
|
if TYPE_CHECKING:
|
|
38
|
+
from openlineage.client.facet_v2 import JobFacet, RunFacet
|
|
38
39
|
from sqlalchemy.engine import Engine
|
|
39
40
|
|
|
40
41
|
from airflow.hooks.base import BaseHook
|
|
41
42
|
from airflow.providers.common.sql.hooks.sql import DbApiHook
|
|
42
|
-
from openlineage.client.facet_v2 import JobFacet, RunFacet
|
|
43
43
|
|
|
44
44
|
log = logging.getLogger(__name__)
|
|
45
45
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|