apache-airflow-providers-openlineage 1.9.0__tar.gz → 1.9.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-openlineage might be problematic. Click here for more details.
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/PKG-INFO +4 -4
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/README.rst +1 -1
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/extractors/base.py +3 -6
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/plugins/adapter.py +4 -11
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/plugins/facets.py +1 -2
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/plugins/listener.py +2 -2
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/sqlparser.py +2 -4
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/utils/selective_enable.py +3 -6
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/utils/sql.py +2 -4
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/utils/utils.py +1 -12
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/pyproject.toml +3 -3
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/LICENSE +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/__init__.py +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/conf.py +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/extractors/__init__.py +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/extractors/bash.py +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/extractors/manager.py +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/extractors/python.py +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/facets/AirflowJobFacet.json +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/facets/AirflowRunFacet.json +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/facets/AirflowStateRunFacet.json +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/facets/__init__.py +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/get_provider_info.py +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/plugins/__init__.py +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/plugins/macros.py +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/plugins/openlineage.py +0 -0
- {apache_airflow_providers_openlineage-1.9.0 → apache_airflow_providers_openlineage-1.9.0rc1}/airflow/providers/openlineage/utils/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: apache-airflow-providers-openlineage
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.0rc1
|
|
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>
|
|
@@ -21,8 +21,8 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
|
23
23
|
Classifier: Topic :: System :: Monitoring
|
|
24
|
-
Requires-Dist: apache-airflow-providers-common-sql>=1.6.
|
|
25
|
-
Requires-Dist: apache-airflow>=2.7.
|
|
24
|
+
Requires-Dist: apache-airflow-providers-common-sql>=1.6.0rc0
|
|
25
|
+
Requires-Dist: apache-airflow>=2.7.0rc0
|
|
26
26
|
Requires-Dist: attrs>=22.2
|
|
27
27
|
Requires-Dist: openlineage-integration-common>=1.16.0
|
|
28
28
|
Requires-Dist: openlineage-python>=1.16.0
|
|
@@ -80,7 +80,7 @@ Provides-Extra: common.sql
|
|
|
80
80
|
|
|
81
81
|
Package ``apache-airflow-providers-openlineage``
|
|
82
82
|
|
|
83
|
-
Release: ``1.9.0``
|
|
83
|
+
Release: ``1.9.0.rc1``
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
`OpenLineage <https://openlineage.io/>`__
|
|
@@ -41,8 +41,7 @@ class OperatorLineage:
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
class BaseExtractor(ABC, LoggingMixin):
|
|
44
|
-
"""
|
|
45
|
-
Abstract base extractor class.
|
|
44
|
+
"""Abstract base extractor class.
|
|
46
45
|
|
|
47
46
|
This is used mostly to maintain support for custom extractors.
|
|
48
47
|
"""
|
|
@@ -56,8 +55,7 @@ class BaseExtractor(ABC, LoggingMixin):
|
|
|
56
55
|
@classmethod
|
|
57
56
|
@abstractmethod
|
|
58
57
|
def get_operator_classnames(cls) -> list[str]:
|
|
59
|
-
"""
|
|
60
|
-
Get a list of operators that extractor works for.
|
|
58
|
+
"""Get a list of operators that extractor works for.
|
|
61
59
|
|
|
62
60
|
This is an abstract method that subclasses should implement. There are
|
|
63
61
|
operators that work very similarly and one extractor can cover.
|
|
@@ -79,8 +77,7 @@ class DefaultExtractor(BaseExtractor):
|
|
|
79
77
|
|
|
80
78
|
@classmethod
|
|
81
79
|
def get_operator_classnames(cls) -> list[str]:
|
|
82
|
-
"""
|
|
83
|
-
Assign this extractor to *no* operators.
|
|
80
|
+
"""Assign this extractor to *no* operators.
|
|
84
81
|
|
|
85
82
|
Default extractor is chosen not on the classname basis, but
|
|
86
83
|
by existence of get_openlineage_facets method on operator.
|
|
@@ -139,8 +139,7 @@ class OpenLineageAdapter(LoggingMixin):
|
|
|
139
139
|
)
|
|
140
140
|
|
|
141
141
|
def emit(self, event: RunEvent):
|
|
142
|
-
"""
|
|
143
|
-
Emit OpenLineage event.
|
|
142
|
+
"""Emit OpenLineage event.
|
|
144
143
|
|
|
145
144
|
:param event: Event to be emitted.
|
|
146
145
|
:return: Redacted Event.
|
|
@@ -296,17 +295,11 @@ class OpenLineageAdapter(LoggingMixin):
|
|
|
296
295
|
"""
|
|
297
296
|
error_facet = {}
|
|
298
297
|
if error:
|
|
299
|
-
|
|
300
|
-
if isinstance(error, BaseException) and error.__traceback__:
|
|
298
|
+
if isinstance(error, BaseException):
|
|
301
299
|
import traceback
|
|
302
300
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
error_facet = {
|
|
306
|
-
"errorMessage": ErrorMessageRunFacet(
|
|
307
|
-
message=str(error), programmingLanguage="python", stackTrace=stack_trace
|
|
308
|
-
)
|
|
309
|
-
}
|
|
301
|
+
error = "\\n".join(traceback.format_exception(type(error), error, error.__traceback__))
|
|
302
|
+
error_facet = {"errorMessage": ErrorMessageRunFacet(message=error, programmingLanguage="python")}
|
|
310
303
|
|
|
311
304
|
event = RunEvent(
|
|
312
305
|
eventType=RunState.FAIL,
|
|
@@ -102,8 +102,7 @@ class AirflowRunFacet(BaseFacet):
|
|
|
102
102
|
|
|
103
103
|
@define(slots=False)
|
|
104
104
|
class UnknownOperatorInstance(RedactMixin):
|
|
105
|
-
"""
|
|
106
|
-
Describes an unknown operator.
|
|
105
|
+
"""Describes an unknown operator.
|
|
107
106
|
|
|
108
107
|
This specifies the (class) name of the operator and its properties.
|
|
109
108
|
"""
|
|
@@ -367,7 +367,7 @@ class OpenLineageListener:
|
|
|
367
367
|
except BaseException:
|
|
368
368
|
# Kill the process directly.
|
|
369
369
|
self._terminate_with_wait(process)
|
|
370
|
-
self.log.
|
|
370
|
+
self.log.warning("Process with pid %s finished - parent", pid)
|
|
371
371
|
else:
|
|
372
372
|
setproctitle(getproctitle() + " - OpenLineage - " + callable_name)
|
|
373
373
|
configure_orm(disable_connection_pool=True)
|
|
@@ -381,7 +381,7 @@ class OpenLineageListener:
|
|
|
381
381
|
if not self._executor:
|
|
382
382
|
self._executor = ProcessPoolExecutor(
|
|
383
383
|
max_workers=conf.dag_state_change_process_pool_size(),
|
|
384
|
-
initializer=_executor_initializer,
|
|
384
|
+
initializer=_executor_initializer(),
|
|
385
385
|
)
|
|
386
386
|
return self._executor
|
|
387
387
|
|
|
@@ -118,8 +118,7 @@ def from_table_meta(
|
|
|
118
118
|
|
|
119
119
|
|
|
120
120
|
class SQLParser(LoggingMixin):
|
|
121
|
-
"""
|
|
122
|
-
Interface for openlineage-sql.
|
|
121
|
+
"""Interface for openlineage-sql.
|
|
123
122
|
|
|
124
123
|
:param dialect: dialect specific to the database
|
|
125
124
|
:param default_schema: schema applied to each table with no schema parsed
|
|
@@ -245,8 +244,7 @@ class SQLParser(LoggingMixin):
|
|
|
245
244
|
sqlalchemy_engine: Engine | None = None,
|
|
246
245
|
use_connection: bool = True,
|
|
247
246
|
) -> OperatorLineage:
|
|
248
|
-
"""
|
|
249
|
-
Parse SQL statement(s) and generate OpenLineage metadata.
|
|
247
|
+
"""Parse SQL statement(s) and generate OpenLineage metadata.
|
|
250
248
|
|
|
251
249
|
Generated OpenLineage metadata contains:
|
|
252
250
|
|
|
@@ -32,8 +32,7 @@ log = logging.getLogger(__name__)
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
def enable_lineage(obj: T) -> T:
|
|
35
|
-
"""
|
|
36
|
-
Set selective enable OpenLineage parameter to True.
|
|
35
|
+
"""Set selective enable OpenLineage parameter to True.
|
|
37
36
|
|
|
38
37
|
The method also propagates param to tasks if the object is DAG.
|
|
39
38
|
"""
|
|
@@ -49,8 +48,7 @@ def enable_lineage(obj: T) -> T:
|
|
|
49
48
|
|
|
50
49
|
|
|
51
50
|
def disable_lineage(obj: T) -> T:
|
|
52
|
-
"""
|
|
53
|
-
Set selective enable OpenLineage parameter to False.
|
|
51
|
+
"""Set selective enable OpenLineage parameter to False.
|
|
54
52
|
|
|
55
53
|
The method also propagates param to tasks if the object is DAG.
|
|
56
54
|
"""
|
|
@@ -75,8 +73,7 @@ def is_task_lineage_enabled(task: Operator) -> bool:
|
|
|
75
73
|
|
|
76
74
|
|
|
77
75
|
def is_dag_lineage_enabled(dag: DAG) -> bool:
|
|
78
|
-
"""
|
|
79
|
-
Check if DAG is selectively enabled to emit OpenLineage events.
|
|
76
|
+
"""Check if DAG is selectively enabled to emit OpenLineage events.
|
|
80
77
|
|
|
81
78
|
The method also checks if selective enable parameter is set to True
|
|
82
79
|
or if any of the tasks in DAG is selectively enabled.
|
|
@@ -85,8 +85,7 @@ def get_table_schemas(
|
|
|
85
85
|
in_query: str | None,
|
|
86
86
|
out_query: str | None,
|
|
87
87
|
) -> tuple[list[Dataset], list[Dataset]]:
|
|
88
|
-
"""
|
|
89
|
-
Query database for table schemas.
|
|
88
|
+
"""Query database for table schemas.
|
|
90
89
|
|
|
91
90
|
Uses provided hook. Responsibility to provide queries for this function is on particular extractors.
|
|
92
91
|
If query for input or output table isn't provided, the query is skipped.
|
|
@@ -112,8 +111,7 @@ def get_table_schemas(
|
|
|
112
111
|
|
|
113
112
|
|
|
114
113
|
def parse_query_result(cursor) -> list[TableSchema]:
|
|
115
|
-
"""
|
|
116
|
-
Fetch results from DB-API 2.0 cursor and creates list of table schemas.
|
|
114
|
+
"""Fetch results from DB-API 2.0 cursor and creates list of table schemas.
|
|
117
115
|
|
|
118
116
|
For each row it creates :class:`TableSchema`.
|
|
119
117
|
"""
|
|
@@ -150,7 +150,7 @@ class InfoJsonEncodable(dict):
|
|
|
150
150
|
return value.isoformat()
|
|
151
151
|
if isinstance(value, datetime.timedelta):
|
|
152
152
|
return f"{value.total_seconds()} seconds"
|
|
153
|
-
if isinstance(value, (set, tuple)):
|
|
153
|
+
if isinstance(value, (set, list, tuple)):
|
|
154
154
|
return str(list(value))
|
|
155
155
|
return value
|
|
156
156
|
|
|
@@ -214,12 +214,6 @@ class TaskInstanceInfo(InfoJsonEncodable):
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
|
|
217
|
-
class DatasetInfo(InfoJsonEncodable):
|
|
218
|
-
"""Defines encoding Airflow Dataset object to JSON."""
|
|
219
|
-
|
|
220
|
-
includes = ["uri", "extra"]
|
|
221
|
-
|
|
222
|
-
|
|
223
217
|
class TaskInfo(InfoJsonEncodable):
|
|
224
218
|
"""Defines encoding BaseOperator/AbstractOperator object to JSON."""
|
|
225
219
|
|
|
@@ -248,9 +242,6 @@ class TaskInfo(InfoJsonEncodable):
|
|
|
248
242
|
"run_as_user",
|
|
249
243
|
"sla",
|
|
250
244
|
"task_id",
|
|
251
|
-
"trigger_dag_id",
|
|
252
|
-
"external_dag_id",
|
|
253
|
-
"external_task_id",
|
|
254
245
|
"trigger_rule",
|
|
255
246
|
"upstream_task_ids",
|
|
256
247
|
"wait_for_downstream",
|
|
@@ -264,8 +255,6 @@ class TaskInfo(InfoJsonEncodable):
|
|
|
264
255
|
if hasattr(task, "task_group") and getattr(task.task_group, "_group_id", None)
|
|
265
256
|
else None
|
|
266
257
|
),
|
|
267
|
-
"inlets": lambda task: [DatasetInfo(inlet) for inlet in task.inlets],
|
|
268
|
-
"outlets": lambda task: [DatasetInfo(outlet) for outlet in task.outlets],
|
|
269
258
|
}
|
|
270
259
|
|
|
271
260
|
|
|
@@ -28,7 +28,7 @@ build-backend = "flit_core.buildapi"
|
|
|
28
28
|
|
|
29
29
|
[project]
|
|
30
30
|
name = "apache-airflow-providers-openlineage"
|
|
31
|
-
version = "1.9.0"
|
|
31
|
+
version = "1.9.0.rc1"
|
|
32
32
|
description = "Provider package apache-airflow-providers-openlineage for Apache Airflow"
|
|
33
33
|
readme = "README.rst"
|
|
34
34
|
authors = [
|
|
@@ -56,8 +56,8 @@ classifiers = [
|
|
|
56
56
|
]
|
|
57
57
|
requires-python = "~=3.8"
|
|
58
58
|
dependencies = [
|
|
59
|
-
"apache-airflow-providers-common-sql>=1.6.
|
|
60
|
-
"apache-airflow>=2.7.
|
|
59
|
+
"apache-airflow-providers-common-sql>=1.6.0rc0",
|
|
60
|
+
"apache-airflow>=2.7.0rc0",
|
|
61
61
|
"attrs>=22.2",
|
|
62
62
|
"openlineage-integration-common>=1.16.0",
|
|
63
63
|
"openlineage-python>=1.16.0",
|
|
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
|