apache-airflow-providers-openlineage 1.1.1rc1__tar.gz → 1.2.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.
- {apache-airflow-providers-openlineage-1.1.1rc1/apache_airflow_providers_openlineage.egg-info → apache-airflow-providers-openlineage-1.2.0rc1}/PKG-INFO +6 -6
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/README.rst +3 -3
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/__init__.py +2 -2
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/get_provider_info.py +1 -1
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/sqlparser.py +52 -1
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1/apache_airflow_providers_openlineage.egg-info}/PKG-INFO +6 -6
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/pyproject.toml +15 -7
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/setup.cfg +2 -2
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/setup.py +1 -1
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/LICENSE +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/MANIFEST.in +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/NOTICE +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/extractors/__init__.py +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/extractors/base.py +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/extractors/bash.py +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/extractors/manager.py +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/extractors/python.py +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/plugins/__init__.py +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/plugins/adapter.py +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/plugins/facets.py +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/plugins/listener.py +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/plugins/macros.py +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/plugins/openlineage.py +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/utils/__init__.py +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/utils/sql.py +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/airflow/providers/openlineage/utils/utils.py +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/apache_airflow_providers_openlineage.egg-info/SOURCES.txt +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/apache_airflow_providers_openlineage.egg-info/dependency_links.txt +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/apache_airflow_providers_openlineage.egg-info/entry_points.txt +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/apache_airflow_providers_openlineage.egg-info/not-zip-safe +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/apache_airflow_providers_openlineage.egg-info/requires.txt +0 -0
- {apache-airflow-providers-openlineage-1.1.1rc1 → apache-airflow-providers-openlineage-1.2.0rc1}/apache_airflow_providers_openlineage.egg-info/top_level.txt +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: apache-airflow-providers-openlineage
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0rc1
|
|
4
4
|
Summary: Provider for Apache Airflow. Implements apache-airflow-providers-openlineage package
|
|
5
5
|
Home-page: https://airflow.apache.org/
|
|
6
6
|
Download-URL: https://archive.apache.org/dist/airflow/providers
|
|
7
7
|
Author: Apache Software Foundation
|
|
8
8
|
Author-email: dev@airflow.apache.org
|
|
9
9
|
License: Apache License 2.0
|
|
10
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.
|
|
11
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.
|
|
10
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.2.0/
|
|
11
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.2.0/changelog.html
|
|
12
12
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
13
13
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
14
14
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
@@ -71,7 +71,7 @@ License-File: NOTICE
|
|
|
71
71
|
|
|
72
72
|
Package ``apache-airflow-providers-openlineage``
|
|
73
73
|
|
|
74
|
-
Release: ``1.
|
|
74
|
+
Release: ``1.2.0rc1``
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
`OpenLineage <https://openlineage.io/>`__
|
|
@@ -84,7 +84,7 @@ This is a provider package for ``openlineage`` provider. All classes for this pr
|
|
|
84
84
|
are in ``airflow.providers.openlineage`` python package.
|
|
85
85
|
|
|
86
86
|
You can find package information and changelog for the provider
|
|
87
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.
|
|
87
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.2.0/>`_.
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
Installation
|
|
@@ -129,4 +129,4 @@ Dependent package
|
|
|
129
129
|
============================================================================================================ ==============
|
|
130
130
|
|
|
131
131
|
The changelog for the provider package can be found in the
|
|
132
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.
|
|
132
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.2.0/changelog.html>`_.
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
Package ``apache-airflow-providers-openlineage``
|
|
38
38
|
|
|
39
|
-
Release: ``1.
|
|
39
|
+
Release: ``1.2.0rc1``
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
`OpenLineage <https://openlineage.io/>`__
|
|
@@ -49,7 +49,7 @@ This is a provider package for ``openlineage`` provider. All classes for this pr
|
|
|
49
49
|
are in ``airflow.providers.openlineage`` python package.
|
|
50
50
|
|
|
51
51
|
You can find package information and changelog for the provider
|
|
52
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.
|
|
52
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.2.0/>`_.
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
Installation
|
|
@@ -94,4 +94,4 @@ Dependent package
|
|
|
94
94
|
============================================================================================================ ==============
|
|
95
95
|
|
|
96
96
|
The changelog for the provider package can be found in the
|
|
97
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.
|
|
97
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.2.0/changelog.html>`_.
|
|
@@ -28,7 +28,7 @@ import packaging.version
|
|
|
28
28
|
|
|
29
29
|
__all__ = ["__version__"]
|
|
30
30
|
|
|
31
|
-
__version__ = "1.
|
|
31
|
+
__version__ = "1.2.0"
|
|
32
32
|
|
|
33
33
|
try:
|
|
34
34
|
from airflow import __version__ as airflow_version
|
|
@@ -39,5 +39,5 @@ if packaging.version.parse(packaging.version.parse(airflow_version).base_version
|
|
|
39
39
|
"2.7.0"
|
|
40
40
|
):
|
|
41
41
|
raise RuntimeError(
|
|
42
|
-
f"The package `apache-airflow-providers-openlineage:{__version__}` requires Apache Airflow 2.7.0+"
|
|
42
|
+
f"The package `apache-airflow-providers-openlineage:{__version__}` requires Apache Airflow 2.7.0+"
|
|
43
43
|
)
|
|
@@ -28,7 +28,7 @@ def get_provider_info():
|
|
|
28
28
|
"name": "OpenLineage Airflow",
|
|
29
29
|
"description": "`OpenLineage <https://openlineage.io/>`__\n",
|
|
30
30
|
"suspended": False,
|
|
31
|
-
"versions": ["1.1.1", "1.1.0", "1.0.2", "1.0.1", "1.0.0"],
|
|
31
|
+
"versions": ["1.2.0", "1.1.1", "1.1.0", "1.0.2", "1.0.1", "1.0.0"],
|
|
32
32
|
"dependencies": [
|
|
33
33
|
"apache-airflow>=2.7.0",
|
|
34
34
|
"apache-airflow-providers-common-sql>=1.6.0",
|
|
@@ -20,7 +20,15 @@ from typing import TYPE_CHECKING, Callable
|
|
|
20
20
|
|
|
21
21
|
import sqlparse
|
|
22
22
|
from attrs import define
|
|
23
|
-
from openlineage.client.facet import
|
|
23
|
+
from openlineage.client.facet import (
|
|
24
|
+
BaseFacet,
|
|
25
|
+
ColumnLineageDatasetFacet,
|
|
26
|
+
ColumnLineageDatasetFacetFieldsAdditional,
|
|
27
|
+
ColumnLineageDatasetFacetFieldsAdditionalInputFields,
|
|
28
|
+
ExtractionError,
|
|
29
|
+
ExtractionErrorRunFacet,
|
|
30
|
+
SqlJobFacet,
|
|
31
|
+
)
|
|
24
32
|
from openlineage.common.sql import DbTableMeta, SqlMeta, parse
|
|
25
33
|
|
|
26
34
|
from airflow.providers.openlineage.extractors.base import OperatorLineage
|
|
@@ -143,6 +151,47 @@ class SQLParser:
|
|
|
143
151
|
else None,
|
|
144
152
|
)
|
|
145
153
|
|
|
154
|
+
def attach_column_lineage(
|
|
155
|
+
self, datasets: list[Dataset], database: str | None, parse_result: SqlMeta
|
|
156
|
+
) -> None:
|
|
157
|
+
"""
|
|
158
|
+
Attaches column lineage facet to the list of datasets.
|
|
159
|
+
|
|
160
|
+
Note that currently each dataset has the same column lineage information set.
|
|
161
|
+
This would be a matter of change after OpenLineage SQL Parser improvements.
|
|
162
|
+
"""
|
|
163
|
+
if not len(parse_result.column_lineage):
|
|
164
|
+
return
|
|
165
|
+
for dataset in datasets:
|
|
166
|
+
dataset.facets["columnLineage"] = ColumnLineageDatasetFacet(
|
|
167
|
+
fields={
|
|
168
|
+
column_lineage.descendant.name: ColumnLineageDatasetFacetFieldsAdditional(
|
|
169
|
+
inputFields=[
|
|
170
|
+
ColumnLineageDatasetFacetFieldsAdditionalInputFields(
|
|
171
|
+
namespace=dataset.namespace,
|
|
172
|
+
name=".".join(
|
|
173
|
+
filter(
|
|
174
|
+
None,
|
|
175
|
+
(
|
|
176
|
+
column_meta.origin.database or database,
|
|
177
|
+
column_meta.origin.schema or self.default_schema,
|
|
178
|
+
column_meta.origin.name,
|
|
179
|
+
),
|
|
180
|
+
)
|
|
181
|
+
)
|
|
182
|
+
if column_meta.origin
|
|
183
|
+
else "",
|
|
184
|
+
field=column_meta.name,
|
|
185
|
+
)
|
|
186
|
+
for column_meta in column_lineage.lineage
|
|
187
|
+
],
|
|
188
|
+
transformationType="",
|
|
189
|
+
transformationDescription="",
|
|
190
|
+
)
|
|
191
|
+
for column_lineage in parse_result.column_lineage
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
|
|
146
195
|
def generate_openlineage_metadata_from_sql(
|
|
147
196
|
self,
|
|
148
197
|
sql: list[str] | str,
|
|
@@ -198,6 +247,8 @@ class SQLParser:
|
|
|
198
247
|
sqlalchemy_engine=sqlalchemy_engine,
|
|
199
248
|
)
|
|
200
249
|
|
|
250
|
+
self.attach_column_lineage(outputs, database or database_info.database, parse_result)
|
|
251
|
+
|
|
201
252
|
return OperatorLineage(
|
|
202
253
|
inputs=inputs,
|
|
203
254
|
outputs=outputs,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: apache-airflow-providers-openlineage
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0rc1
|
|
4
4
|
Summary: Provider for Apache Airflow. Implements apache-airflow-providers-openlineage package
|
|
5
5
|
Home-page: https://airflow.apache.org/
|
|
6
6
|
Download-URL: https://archive.apache.org/dist/airflow/providers
|
|
7
7
|
Author: Apache Software Foundation
|
|
8
8
|
Author-email: dev@airflow.apache.org
|
|
9
9
|
License: Apache License 2.0
|
|
10
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.
|
|
11
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.
|
|
10
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.2.0/
|
|
11
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.2.0/changelog.html
|
|
12
12
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
13
13
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
14
14
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
@@ -71,7 +71,7 @@ License-File: NOTICE
|
|
|
71
71
|
|
|
72
72
|
Package ``apache-airflow-providers-openlineage``
|
|
73
73
|
|
|
74
|
-
Release: ``1.
|
|
74
|
+
Release: ``1.2.0rc1``
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
`OpenLineage <https://openlineage.io/>`__
|
|
@@ -84,7 +84,7 @@ This is a provider package for ``openlineage`` provider. All classes for this pr
|
|
|
84
84
|
are in ``airflow.providers.openlineage`` python package.
|
|
85
85
|
|
|
86
86
|
You can find package information and changelog for the provider
|
|
87
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.
|
|
87
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.2.0/>`_.
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
Installation
|
|
@@ -129,4 +129,4 @@ Dependent package
|
|
|
129
129
|
============================================================================================================ ==============
|
|
130
130
|
|
|
131
131
|
The changelog for the provider package can be found in the
|
|
132
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.
|
|
132
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.2.0/changelog.html>`_.
|
|
@@ -63,7 +63,8 @@ extend-select = [
|
|
|
63
63
|
"D419",
|
|
64
64
|
"TCH001", # typing-only-first-party-import
|
|
65
65
|
"TCH002", # typing-only-third-party-import
|
|
66
|
-
"TID251",
|
|
66
|
+
"TID251", # Specific modules or module members that may not be imported or accessed
|
|
67
|
+
"TID253", # Ban certain modules from being imported at module level
|
|
67
68
|
]
|
|
68
69
|
extend-ignore = [
|
|
69
70
|
"D203",
|
|
@@ -128,15 +129,16 @@ combine-as-imports = true
|
|
|
128
129
|
|
|
129
130
|
# Ignore pydoc style from these
|
|
130
131
|
"*.pyi" = ["D"]
|
|
131
|
-
"tests/*" = ["D"]
|
|
132
132
|
"scripts/*" = ["D"]
|
|
133
|
-
"dev/*" = ["D"]
|
|
134
133
|
"docs/*" = ["D"]
|
|
135
134
|
"provider_packages/*" = ["D"]
|
|
136
|
-
"docker_tests/*" = ["D"]
|
|
137
|
-
"kubernetes_tests/*" = ["D"]
|
|
138
135
|
"*/example_dags/*" = ["D"]
|
|
139
136
|
"chart/*" = ["D"]
|
|
137
|
+
# In addition ignore top level imports, e.g. pandas, numpy in tests and dev
|
|
138
|
+
"dev/*" = ["D", "TID253"]
|
|
139
|
+
"tests/*" = ["D", "TID253"]
|
|
140
|
+
"docker_tests/*" = ["D", "TID253"]
|
|
141
|
+
"kubernetes_tests/*" = ["D", "TID253"]
|
|
140
142
|
|
|
141
143
|
# All of the modules which have an extra license header (i.e. that we copy from another project) need to
|
|
142
144
|
# ignore E402 -- module level import not at top level
|
|
@@ -150,6 +152,14 @@ combine-as-imports = true
|
|
|
150
152
|
"airflow.AirflowException".msg = "Use airflow.exceptions.AirflowException instead."
|
|
151
153
|
"airflow.Dataset".msg = "Use airflow.datasets.Dataset instead."
|
|
152
154
|
|
|
155
|
+
[tool.ruff.flake8-tidy-imports]
|
|
156
|
+
# Ban certain modules from being imported at module level, instead requiring
|
|
157
|
+
# that they're imported lazily (e.g., within a function definition).
|
|
158
|
+
banned-module-level-imports = ["numpy", "pandas"]
|
|
159
|
+
|
|
160
|
+
[tool.ruff.flake8-type-checking]
|
|
161
|
+
exempt-modules = ["typing", "typing_extensions"]
|
|
162
|
+
|
|
153
163
|
[tool.coverage.run]
|
|
154
164
|
branch = true
|
|
155
165
|
relative_files = true
|
|
@@ -175,5 +185,3 @@ exclude_also = [
|
|
|
175
185
|
"@(typing(_extensions)?\\.)?overload",
|
|
176
186
|
"if TYPE_CHECKING:"
|
|
177
187
|
]
|
|
178
|
-
[tool.ruff.flake8-type-checking]
|
|
179
|
-
exempt-modules = ["typing", "typing_extensions"]
|
|
@@ -27,8 +27,8 @@ classifiers =
|
|
|
27
27
|
Programming Language :: Python :: 3.11
|
|
28
28
|
Topic :: System :: Monitoring
|
|
29
29
|
project_urls =
|
|
30
|
-
Documentation=https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.
|
|
31
|
-
Changelog=https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.
|
|
30
|
+
Documentation=https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.2.0/
|
|
31
|
+
Changelog=https://airflow.apache.org/docs/apache-airflow-providers-openlineage/1.2.0/changelog.html
|
|
32
32
|
Bug Tracker=https://github.com/apache/airflow/issues
|
|
33
33
|
Source Code=https://github.com/apache/airflow
|
|
34
34
|
Slack Chat=https://s.apache.org/airflow-slack
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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
|