openlineage-python 1.10.1__tar.gz → 1.11.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/PKG-INFO +2 -2
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/client.py +8 -8
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/constants.py +1 -1
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/facet.py +4 -2
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/pyproject.toml +1 -1
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/.gitignore +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/README.md +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/__init__.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/filter.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/py.typed +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/run.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/serde.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/__init__.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/console.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/factory.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/file.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/http.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/kafka.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/msk_iam.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/noop.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/transport.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/utils.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/__init__.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/config/config.yml +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/config/exact_filter.yml +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/config/http.yml +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/config/openlineage.yml +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/config/regex_filter.yml +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/conftest.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/nominal_time_without_end.json +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/serde_example_dataset_event.json +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/serde_example_job_event.json +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/serde_example_run_event.json +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/test_client.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/test_events.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/test_facet.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/test_factory.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/test_file.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/test_http.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/test_kafka.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/test_msk_iam.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/transport.py +0 -0
- {openlineage_python-1.10.1 → openlineage_python-1.11.1}/tox.ini +0 -0
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import logging
|
|
6
6
|
import os
|
|
7
|
-
from typing import TYPE_CHECKING, Any, TypeVar
|
|
7
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
8
8
|
|
|
9
9
|
import attr
|
|
10
10
|
from openlineage.client.filter import Filter, create_filter
|
|
@@ -86,20 +86,20 @@ class OpenLineageClient:
|
|
|
86
86
|
),
|
|
87
87
|
)
|
|
88
88
|
|
|
89
|
-
def emit(self, event:
|
|
89
|
+
def emit(self, event: RunEvent | DatasetEvent | JobEvent) -> None:
|
|
90
90
|
if not (isinstance(event, (RunEvent, DatasetEvent, JobEvent))):
|
|
91
91
|
msg = "`emit` only accepts RunEvent, DatasetEvent, JobEvent classes"
|
|
92
92
|
raise ValueError(msg) # noqa: TRY004
|
|
93
|
+
if self._filters and self.filter_event(event) is None:
|
|
94
|
+
return
|
|
93
95
|
if not self.transport:
|
|
94
96
|
log.error("Tried to emit OpenLineage event, but transport is not configured.")
|
|
95
97
|
return
|
|
98
|
+
|
|
96
99
|
if log.isEnabledFor(logging.DEBUG):
|
|
97
100
|
val = Serde.to_json(event).encode("utf-8")
|
|
98
101
|
log.debug("OpenLineageClient will emit event %s", val)
|
|
99
|
-
|
|
100
|
-
return
|
|
101
|
-
if event:
|
|
102
|
-
self.transport.emit(event)
|
|
102
|
+
self.transport.emit(event)
|
|
103
103
|
|
|
104
104
|
@classmethod
|
|
105
105
|
def from_environment(cls: type[_T]) -> _T:
|
|
@@ -112,8 +112,8 @@ class OpenLineageClient:
|
|
|
112
112
|
|
|
113
113
|
def filter_event(
|
|
114
114
|
self,
|
|
115
|
-
event:
|
|
116
|
-
) ->
|
|
115
|
+
event: RunEvent | DatasetEvent | JobEvent,
|
|
116
|
+
) -> RunEvent | DatasetEvent | JobEvent | None:
|
|
117
117
|
"""Filters jobs according to config-defined events"""
|
|
118
118
|
for _filter in self._filters:
|
|
119
119
|
if isinstance(event, RunEvent) and _filter.filter_event(event) is None:
|
|
@@ -145,10 +145,11 @@ class DataSourceDatasetFacet(BaseFacet):
|
|
|
145
145
|
|
|
146
146
|
@attr.s
|
|
147
147
|
class OutputStatisticsOutputDatasetFacet(BaseFacet):
|
|
148
|
-
rowCount: int = attr.ib() # noqa: N815
|
|
148
|
+
rowCount: Optional[int] = attr.ib(default=None) # noqa: N815
|
|
149
149
|
size: Optional[int] = attr.ib(default=None)
|
|
150
|
+
fileCount: Optional[int] = attr.ib(default=None) # noqa: N815
|
|
150
151
|
|
|
151
|
-
_additional_skip_redact: ClassVar[List[str]] = ["rowCount", "size"]
|
|
152
|
+
_additional_skip_redact: ClassVar[List[str]] = ["rowCount", "size", "fileCount"]
|
|
152
153
|
|
|
153
154
|
@staticmethod
|
|
154
155
|
def _get_schema() -> str:
|
|
@@ -170,6 +171,7 @@ class ColumnMetric:
|
|
|
170
171
|
class DataQualityMetricsInputDatasetFacet(BaseFacet):
|
|
171
172
|
rowCount: Optional[int] = attr.ib(default=None) # noqa: N815
|
|
172
173
|
bytes: Optional[int] = attr.ib(default=None) # noqa: A003
|
|
174
|
+
fileCount: Optional[int] = attr.ib(default=None) # noqa: N815
|
|
173
175
|
columnMetrics: Dict[str, ColumnMetric] = attr.ib(factory=dict) # noqa: N815
|
|
174
176
|
|
|
175
177
|
@staticmethod
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/__init__.py
RENAMED
|
File without changes
|
{openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/console.py
RENAMED
|
File without changes
|
{openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/factory.py
RENAMED
|
File without changes
|
{openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/file.py
RENAMED
|
File without changes
|
{openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/http.py
RENAMED
|
File without changes
|
{openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/kafka.py
RENAMED
|
File without changes
|
{openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/msk_iam.py
RENAMED
|
File without changes
|
{openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/noop.py
RENAMED
|
File without changes
|
{openlineage_python-1.10.1 → openlineage_python-1.11.1}/openlineage/client/transport/transport.py
RENAMED
|
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
|
{openlineage_python-1.10.1 → openlineage_python-1.11.1}/tests/serde_example_dataset_event.json
RENAMED
|
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
|