openlineage-python 1.15.0__tar.gz → 1.17.0__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.15.0 → openlineage_python-1.17.0}/PKG-INFO +1 -1
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/constants.py +1 -1
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/base.py +35 -35
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/column_lineage_dataset.py +25 -7
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/data_quality_assertions_dataset.py +4 -4
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/data_quality_metrics_input_dataset.py +13 -13
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/dataset_version_dataset.py +2 -2
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/datasource_dataset.py +4 -4
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/documentation_dataset.py +2 -2
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/documentation_job.py +2 -2
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/error_message_run.py +3 -3
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/external_query_run.py +2 -2
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/extraction_error_run.py +6 -6
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/job_type_job.py +3 -3
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/lifecycle_state_change_dataset.py +4 -4
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/nominal_time_run.py +4 -4
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/output_statistics_output_dataset.py +5 -5
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/ownership_dataset.py +5 -5
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/ownership_job.py +5 -5
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/parent_run.py +5 -5
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/processing_engine_run.py +4 -4
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/schema_dataset.py +7 -7
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/source_code_job.py +2 -2
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/source_code_location_job.py +8 -8
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/sql_job.py +2 -2
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/storage_dataset.py +3 -3
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/symlinks_dataset.py +4 -4
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/run.py +4 -4
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/transport/http.py +7 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/transport/kafka.py +1 -1
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/transport/msk_iam.py +2 -2
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/pyproject.toml +1 -1
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/redact_fields.yml +5 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tox.ini +3 -1
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/.gitignore +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/README.md +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/docs/Makefile +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/docs/conf.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/docs/convert.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/docs/index.rst +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/docs/make.bat +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/docs/release-api-reference.sh +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/docs/source/openlineage.client.rst +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/__init__.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/client.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/event_v2.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/facet.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/facet_v2.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/filter.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/py.typed +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/serde.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/transport/__init__.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/transport/console.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/transport/factory.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/transport/file.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/transport/noop.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/transport/transport.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/utils.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/uuid.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/__init__.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/config/config.yml +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/config/exact_filter.yml +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/config/http.yml +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/config/openlineage.yml +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/config/regex_filter.yml +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/conftest.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/example_full_event.json +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/nominal_time_without_end.json +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/serde_example_dataset_event.json +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/serde_example_job_event.json +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/serde_example_run_event.json +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/test_client.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/test_events.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/test_facet.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/test_facet_v2.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/test_factory.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/test_file.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/test_http.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/test_kafka.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/test_msk_iam.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/test_utils.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/test_uuid.py +0 -0
- {openlineage_python-1.15.0 → openlineage_python-1.17.0}/tests/transport.py +0 -0
{openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/base.py
RENAMED
|
@@ -6,7 +6,7 @@ from __future__ import annotations
|
|
|
6
6
|
from enum import Enum
|
|
7
7
|
from typing import ClassVar
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
import attr
|
|
10
10
|
from openlineage.client.constants import DEFAULT_PRODUCER
|
|
11
11
|
from openlineage.client.utils import RedactMixin
|
|
12
12
|
|
|
@@ -18,13 +18,13 @@ def set_producer(producer: str) -> None:
|
|
|
18
18
|
PRODUCER = producer
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
@define(kw_only=True)
|
|
21
|
+
@attr.define(kw_only=True)
|
|
22
22
|
class BaseEvent(RedactMixin):
|
|
23
|
-
eventTime: str = field() # noqa: N815
|
|
23
|
+
eventTime: str = attr.field() # noqa: N815
|
|
24
24
|
"""the time the event occurred at"""
|
|
25
25
|
|
|
26
|
-
producer: str = field(default="", kw_only=True)
|
|
27
|
-
schemaURL: str = field( # noqa: N815
|
|
26
|
+
producer: str = attr.field(default="", kw_only=True)
|
|
27
|
+
schemaURL: str = attr.field( # noqa: N815
|
|
28
28
|
default="https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/BaseEvent", init=False
|
|
29
29
|
)
|
|
30
30
|
_base_skip_redact: ClassVar[list[str]] = ["producer", "schemaURL"]
|
|
@@ -66,12 +66,12 @@ class BaseEvent(RedactMixin):
|
|
|
66
66
|
urlparse(value)
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
@define
|
|
69
|
+
@attr.define
|
|
70
70
|
class BaseFacet(RedactMixin):
|
|
71
71
|
"""all fields of the base facet are prefixed with _ to avoid name conflicts in facets"""
|
|
72
72
|
|
|
73
|
-
_producer: str = field(default="", kw_only=True)
|
|
74
|
-
_schemaURL: str = field( # noqa: N815
|
|
73
|
+
_producer: str = attr.field(default="", kw_only=True)
|
|
74
|
+
_schemaURL: str = attr.field( # noqa: N815
|
|
75
75
|
default="https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/BaseFacet", init=False
|
|
76
76
|
)
|
|
77
77
|
_base_skip_redact: ClassVar[list[str]] = ["_producer", "_schemaURL"]
|
|
@@ -103,7 +103,7 @@ class BaseFacet(RedactMixin):
|
|
|
103
103
|
urlparse(value)
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
@define
|
|
106
|
+
@attr.define
|
|
107
107
|
class Dataset(RedactMixin):
|
|
108
108
|
namespace: str
|
|
109
109
|
"""The namespace containing that dataset"""
|
|
@@ -111,7 +111,7 @@ class Dataset(RedactMixin):
|
|
|
111
111
|
name: str
|
|
112
112
|
"""The unique name for that dataset within that namespace"""
|
|
113
113
|
|
|
114
|
-
facets: dict[str, DatasetFacet] | None = field(factory=dict, kw_only=True)
|
|
114
|
+
facets: dict[str, DatasetFacet] | None = attr.field(factory=dict, kw_only=True)
|
|
115
115
|
"""The facets for this dataset"""
|
|
116
116
|
|
|
117
117
|
_skip_redact: ClassVar[list[str]] = ["namespace", "name"]
|
|
@@ -121,7 +121,7 @@ class Dataset(RedactMixin):
|
|
|
121
121
|
return "https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/Dataset"
|
|
122
122
|
|
|
123
123
|
|
|
124
|
-
@define(kw_only=True)
|
|
124
|
+
@attr.define(kw_only=True)
|
|
125
125
|
class DatasetEvent(BaseEvent):
|
|
126
126
|
dataset: StaticDataset
|
|
127
127
|
|
|
@@ -130,11 +130,11 @@ class DatasetEvent(BaseEvent):
|
|
|
130
130
|
return "https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/DatasetEvent"
|
|
131
131
|
|
|
132
132
|
|
|
133
|
-
@define
|
|
133
|
+
@attr.define
|
|
134
134
|
class DatasetFacet(BaseFacet):
|
|
135
135
|
"""A Dataset Facet"""
|
|
136
136
|
|
|
137
|
-
_deleted: bool | None = field(default=None, kw_only=True)
|
|
137
|
+
_deleted: bool | None = attr.field(default=None, kw_only=True)
|
|
138
138
|
"""set to true to delete a facet"""
|
|
139
139
|
|
|
140
140
|
@staticmethod
|
|
@@ -157,11 +157,11 @@ class EventType(Enum):
|
|
|
157
157
|
OTHER = "OTHER"
|
|
158
158
|
|
|
159
159
|
|
|
160
|
-
@define
|
|
160
|
+
@attr.define
|
|
161
161
|
class InputDataset(Dataset):
|
|
162
162
|
"""An input dataset"""
|
|
163
163
|
|
|
164
|
-
inputFacets: dict[str, InputDatasetFacet] | None = field(factory=dict) #
|
|
164
|
+
inputFacets: dict[str, InputDatasetFacet] | None = attr.field(factory=dict) # noqa: N815
|
|
165
165
|
"""The input facets for this dataset."""
|
|
166
166
|
|
|
167
167
|
_additional_skip_redact: ClassVar[list[str]] = ["namespace", "name"]
|
|
@@ -171,7 +171,7 @@ class InputDataset(Dataset):
|
|
|
171
171
|
return "https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/InputDataset"
|
|
172
172
|
|
|
173
173
|
|
|
174
|
-
@define
|
|
174
|
+
@attr.define
|
|
175
175
|
class InputDatasetFacet(BaseFacet):
|
|
176
176
|
"""An Input Dataset Facet"""
|
|
177
177
|
|
|
@@ -180,7 +180,7 @@ class InputDatasetFacet(BaseFacet):
|
|
|
180
180
|
return "https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/InputDatasetFacet"
|
|
181
181
|
|
|
182
182
|
|
|
183
|
-
@define
|
|
183
|
+
@attr.define
|
|
184
184
|
class Job(RedactMixin):
|
|
185
185
|
namespace: str
|
|
186
186
|
"""The namespace containing that job"""
|
|
@@ -188,7 +188,7 @@ class Job(RedactMixin):
|
|
|
188
188
|
name: str
|
|
189
189
|
"""The unique name for that job within that namespace"""
|
|
190
190
|
|
|
191
|
-
facets: dict[str, JobFacet] | None = field(factory=dict)
|
|
191
|
+
facets: dict[str, JobFacet] | None = attr.field(factory=dict)
|
|
192
192
|
"""The job facets."""
|
|
193
193
|
|
|
194
194
|
_skip_redact: ClassVar[list[str]] = ["namespace", "name"]
|
|
@@ -198,13 +198,13 @@ class Job(RedactMixin):
|
|
|
198
198
|
return "https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/Job"
|
|
199
199
|
|
|
200
200
|
|
|
201
|
-
@define(kw_only=True)
|
|
201
|
+
@attr.define(kw_only=True)
|
|
202
202
|
class JobEvent(BaseEvent):
|
|
203
203
|
job: Job
|
|
204
|
-
inputs: list[InputDataset] | None = field(factory=list)
|
|
204
|
+
inputs: list[InputDataset] | None = attr.field(factory=list)
|
|
205
205
|
"""The set of **input** datasets."""
|
|
206
206
|
|
|
207
|
-
outputs: list[OutputDataset] | None = field(factory=list)
|
|
207
|
+
outputs: list[OutputDataset] | None = attr.field(factory=list)
|
|
208
208
|
"""The set of **output** datasets."""
|
|
209
209
|
|
|
210
210
|
@staticmethod
|
|
@@ -212,11 +212,11 @@ class JobEvent(BaseEvent):
|
|
|
212
212
|
return "https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/JobEvent"
|
|
213
213
|
|
|
214
214
|
|
|
215
|
-
@define
|
|
215
|
+
@attr.define
|
|
216
216
|
class JobFacet(BaseFacet):
|
|
217
217
|
"""A Job Facet"""
|
|
218
218
|
|
|
219
|
-
_deleted: bool | None = field(default=None, kw_only=True)
|
|
219
|
+
_deleted: bool | None = attr.field(default=None, kw_only=True)
|
|
220
220
|
"""set to true to delete a facet"""
|
|
221
221
|
|
|
222
222
|
@staticmethod
|
|
@@ -224,11 +224,11 @@ class JobFacet(BaseFacet):
|
|
|
224
224
|
return "https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/JobFacet"
|
|
225
225
|
|
|
226
226
|
|
|
227
|
-
@define
|
|
227
|
+
@attr.define
|
|
228
228
|
class OutputDataset(Dataset):
|
|
229
229
|
"""An output dataset"""
|
|
230
230
|
|
|
231
|
-
outputFacets: dict[str, OutputDatasetFacet] | None = field(factory=dict) #
|
|
231
|
+
outputFacets: dict[str, OutputDatasetFacet] | None = attr.field(factory=dict) # noqa: N815
|
|
232
232
|
"""The output facets for this dataset"""
|
|
233
233
|
|
|
234
234
|
_additional_skip_redact: ClassVar[list[str]] = ["namespace", "name"]
|
|
@@ -238,7 +238,7 @@ class OutputDataset(Dataset):
|
|
|
238
238
|
return "https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/OutputDataset"
|
|
239
239
|
|
|
240
240
|
|
|
241
|
-
@define
|
|
241
|
+
@attr.define
|
|
242
242
|
class OutputDatasetFacet(BaseFacet):
|
|
243
243
|
"""An Output Dataset Facet"""
|
|
244
244
|
|
|
@@ -247,12 +247,12 @@ class OutputDatasetFacet(BaseFacet):
|
|
|
247
247
|
return "https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/OutputDatasetFacet"
|
|
248
248
|
|
|
249
249
|
|
|
250
|
-
@define
|
|
250
|
+
@attr.define
|
|
251
251
|
class Run(RedactMixin):
|
|
252
|
-
runId: str = field() # noqa: N815
|
|
252
|
+
runId: str = attr.field() # noqa: N815
|
|
253
253
|
"""The globally unique ID of the run associated with the job."""
|
|
254
254
|
|
|
255
|
-
facets: dict[str, RunFacet] | None = field(factory=dict)
|
|
255
|
+
facets: dict[str, RunFacet] | None = attr.field(factory=dict)
|
|
256
256
|
"""The run facets."""
|
|
257
257
|
|
|
258
258
|
_skip_redact: ClassVar[list[str]] = ["runId"]
|
|
@@ -268,20 +268,20 @@ class Run(RedactMixin):
|
|
|
268
268
|
UUID(value)
|
|
269
269
|
|
|
270
270
|
|
|
271
|
-
@define(kw_only=True)
|
|
271
|
+
@attr.define(kw_only=True)
|
|
272
272
|
class RunEvent(BaseEvent):
|
|
273
273
|
run: Run
|
|
274
274
|
job: Job
|
|
275
|
-
eventType: EventType | None = field(default=None) # noqa: N815
|
|
275
|
+
eventType: EventType | None = attr.field(default=None) # noqa: N815
|
|
276
276
|
"""
|
|
277
277
|
the current transition of the run state. It is required to issue 1 START event and 1 of [ COMPLETE,
|
|
278
278
|
ABORT, FAIL ] event per run. Additional events with OTHER eventType can be added to the same run.
|
|
279
279
|
For example to send additional metadata after the run is complete
|
|
280
280
|
"""
|
|
281
|
-
inputs: list[InputDataset] | None = field(factory=list)
|
|
281
|
+
inputs: list[InputDataset] | None = attr.field(factory=list)
|
|
282
282
|
"""The set of **input** datasets."""
|
|
283
283
|
|
|
284
|
-
outputs: list[OutputDataset] | None = field(factory=list)
|
|
284
|
+
outputs: list[OutputDataset] | None = attr.field(factory=list)
|
|
285
285
|
"""The set of **output** datasets."""
|
|
286
286
|
|
|
287
287
|
_additional_skip_redact: ClassVar[list[str]] = ["eventType", "eventTime"]
|
|
@@ -291,7 +291,7 @@ class RunEvent(BaseEvent):
|
|
|
291
291
|
return "https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/RunEvent"
|
|
292
292
|
|
|
293
293
|
|
|
294
|
-
@define
|
|
294
|
+
@attr.define
|
|
295
295
|
class RunFacet(BaseFacet):
|
|
296
296
|
"""A Run Facet"""
|
|
297
297
|
|
|
@@ -300,7 +300,7 @@ class RunFacet(BaseFacet):
|
|
|
300
300
|
return "https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/RunFacet"
|
|
301
301
|
|
|
302
302
|
|
|
303
|
-
@define
|
|
303
|
+
@attr.define
|
|
304
304
|
class StaticDataset(Dataset):
|
|
305
305
|
"""A Dataset sent within static metadata events"""
|
|
306
306
|
|
|
@@ -5,35 +5,35 @@ from __future__ import annotations
|
|
|
5
5
|
|
|
6
6
|
from typing import ClassVar
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import attr
|
|
9
9
|
from openlineage.client.generated.base import DatasetFacet
|
|
10
10
|
from openlineage.client.utils import RedactMixin
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
@define
|
|
13
|
+
@attr.define
|
|
14
14
|
class ColumnLineageDatasetFacet(DatasetFacet):
|
|
15
15
|
fields: dict[str, Fields]
|
|
16
16
|
"""Column level lineage that maps output fields into input fields used to evaluate them."""
|
|
17
17
|
|
|
18
18
|
@staticmethod
|
|
19
19
|
def _get_schema() -> str:
|
|
20
|
-
return "https://openlineage.io/spec/facets/1-0
|
|
20
|
+
return "https://openlineage.io/spec/facets/1-1-0/ColumnLineageDatasetFacet.json#/$defs/ColumnLineageDatasetFacet"
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
@define
|
|
23
|
+
@attr.define
|
|
24
24
|
class Fields(RedactMixin):
|
|
25
25
|
inputFields: list[InputField] # noqa: N815
|
|
26
|
-
transformationDescription: str | None = field(default=None) # noqa: N815
|
|
26
|
+
transformationDescription: str | None = attr.field(default=None) # noqa: N815
|
|
27
27
|
"""a string representation of the transformation applied"""
|
|
28
28
|
|
|
29
|
-
transformationType: str | None = field(default=None) # noqa: N815
|
|
29
|
+
transformationType: str | None = attr.field(default=None) # noqa: N815
|
|
30
30
|
"""
|
|
31
31
|
IDENTITY|MASKED reflects a clearly defined behavior. IDENTITY: exact same as input; MASKED: no
|
|
32
32
|
original data available (like a hash of PII for example)
|
|
33
33
|
"""
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
@define
|
|
36
|
+
@attr.define
|
|
37
37
|
class InputField(RedactMixin):
|
|
38
38
|
namespace: str
|
|
39
39
|
"""The input dataset namespace"""
|
|
@@ -44,4 +44,22 @@ class InputField(RedactMixin):
|
|
|
44
44
|
field: str
|
|
45
45
|
"""The input field"""
|
|
46
46
|
|
|
47
|
+
transformations: list[Transformation] | None = attr.field(factory=list)
|
|
47
48
|
_skip_redact: ClassVar[list[str]] = ["namespace", "name", "field"]
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
@attr.define
|
|
52
|
+
class Transformation(RedactMixin):
|
|
53
|
+
type: str
|
|
54
|
+
"""The type of the transformation. Allowed values are: DIRECT, INDIRECT"""
|
|
55
|
+
|
|
56
|
+
subtype: str | None = attr.field(default=None)
|
|
57
|
+
"""The subtype of the transformation"""
|
|
58
|
+
|
|
59
|
+
description: str | None = attr.field(default=None)
|
|
60
|
+
"""a string representation of the transformation applied"""
|
|
61
|
+
|
|
62
|
+
masking: bool | None = attr.field(default=None)
|
|
63
|
+
"""is transformation masking the data or not"""
|
|
64
|
+
|
|
65
|
+
_skip_redact: ClassVar[list[str]] = ["type", "subtype", "masking"]
|
|
@@ -5,18 +5,18 @@ from __future__ import annotations
|
|
|
5
5
|
|
|
6
6
|
from typing import ClassVar
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import attr
|
|
9
9
|
from openlineage.client.generated.base import InputDatasetFacet
|
|
10
10
|
from openlineage.client.utils import RedactMixin
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
@define
|
|
13
|
+
@attr.define
|
|
14
14
|
class Assertion(RedactMixin):
|
|
15
15
|
assertion: str
|
|
16
16
|
"""Type of expectation test that dataset is subjected to"""
|
|
17
17
|
|
|
18
18
|
success: bool
|
|
19
|
-
column: str | None = field(default=None)
|
|
19
|
+
column: str | None = attr.field(default=None)
|
|
20
20
|
"""
|
|
21
21
|
Column that expectation is testing. It should match the name provided in SchemaDatasetFacet. If
|
|
22
22
|
column field is empty, then expectation refers to whole dataset.
|
|
@@ -24,7 +24,7 @@ class Assertion(RedactMixin):
|
|
|
24
24
|
_skip_redact: ClassVar[list[str]] = ["column"]
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
@define
|
|
27
|
+
@attr.define
|
|
28
28
|
class DataQualityAssertionsDatasetFacet(InputDatasetFacet):
|
|
29
29
|
"""list of tests performed on dataset or dataset columns, and their results"""
|
|
30
30
|
|
|
@@ -3,43 +3,43 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import attr
|
|
7
7
|
from openlineage.client.generated.base import InputDatasetFacet
|
|
8
8
|
from openlineage.client.utils import RedactMixin
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
@define
|
|
11
|
+
@attr.define
|
|
12
12
|
class ColumnMetrics(RedactMixin):
|
|
13
|
-
nullCount: int | None = field(default=None) # noqa: N815
|
|
13
|
+
nullCount: int | None = attr.field(default=None) # noqa: N815
|
|
14
14
|
"""The number of null values in this column for the rows evaluated"""
|
|
15
15
|
|
|
16
|
-
distinctCount: int | None = field(default=None) # noqa: N815
|
|
16
|
+
distinctCount: int | None = attr.field(default=None) # noqa: N815
|
|
17
17
|
"""The number of distinct values in this column for the rows evaluated"""
|
|
18
18
|
|
|
19
|
-
sum: float | None = field(default=None)
|
|
19
|
+
sum: float | None = attr.field(default=None)
|
|
20
20
|
"""The total sum of values in this column for the rows evaluated"""
|
|
21
21
|
|
|
22
|
-
count: float | None = field(default=None)
|
|
22
|
+
count: float | None = attr.field(default=None)
|
|
23
23
|
"""The number of values in this column"""
|
|
24
24
|
|
|
25
|
-
min: float | None = field(default=None)
|
|
26
|
-
max: float | None = field(default=None)
|
|
27
|
-
quantiles: dict[str, float] | None = field(factory=dict)
|
|
25
|
+
min: float | None = attr.field(default=None)
|
|
26
|
+
max: float | None = attr.field(default=None)
|
|
27
|
+
quantiles: dict[str, float] | None = attr.field(factory=dict)
|
|
28
28
|
"""The property key is the quantile. Examples: 0.1 0.25 0.5 0.75 1"""
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
@define
|
|
31
|
+
@attr.define
|
|
32
32
|
class DataQualityMetricsInputDatasetFacet(InputDatasetFacet):
|
|
33
33
|
columnMetrics: dict[str, ColumnMetrics] # noqa: N815
|
|
34
34
|
"""The property key is the column name"""
|
|
35
35
|
|
|
36
|
-
rowCount: int | None = field(default=None) # noqa: N815
|
|
36
|
+
rowCount: int | None = attr.field(default=None) # noqa: N815
|
|
37
37
|
"""The number of rows evaluated"""
|
|
38
38
|
|
|
39
|
-
bytes: int | None = field(default=None)
|
|
39
|
+
bytes: int | None = attr.field(default=None)
|
|
40
40
|
"""The size in bytes"""
|
|
41
41
|
|
|
42
|
-
fileCount: int | None = field(default=None) # noqa: N815
|
|
42
|
+
fileCount: int | None = attr.field(default=None) # noqa: N815
|
|
43
43
|
"""The number of files evaluated"""
|
|
44
44
|
|
|
45
45
|
@staticmethod
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import attr
|
|
7
7
|
from openlineage.client.generated.base import DatasetFacet
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
@define
|
|
10
|
+
@attr.define
|
|
11
11
|
class DatasetVersionDatasetFacet(DatasetFacet):
|
|
12
12
|
datasetVersion: str # noqa: N815
|
|
13
13
|
"""The version of the dataset."""
|
|
@@ -5,14 +5,14 @@ from __future__ import annotations
|
|
|
5
5
|
|
|
6
6
|
from typing import ClassVar
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import attr
|
|
9
9
|
from openlineage.client.generated.base import DatasetFacet
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
@define
|
|
12
|
+
@attr.define
|
|
13
13
|
class DatasourceDatasetFacet(DatasetFacet):
|
|
14
|
-
name: str | None = field(default=None)
|
|
15
|
-
uri: str | None = field(default=None)
|
|
14
|
+
name: str | None = attr.field(default=None)
|
|
15
|
+
uri: str | None = attr.field(default=None)
|
|
16
16
|
_additional_skip_redact: ClassVar[list[str]] = ["name", "uri"]
|
|
17
17
|
|
|
18
18
|
@staticmethod
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import attr
|
|
7
7
|
from openlineage.client.generated.base import DatasetFacet
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
@define
|
|
10
|
+
@attr.define
|
|
11
11
|
class DocumentationDatasetFacet(DatasetFacet):
|
|
12
12
|
description: str
|
|
13
13
|
"""The description of the dataset."""
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import attr
|
|
7
7
|
from openlineage.client.generated.base import JobFacet
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
@define
|
|
10
|
+
@attr.define
|
|
11
11
|
class DocumentationJobFacet(JobFacet):
|
|
12
12
|
description: str
|
|
13
13
|
"""The description of the job."""
|
|
@@ -5,11 +5,11 @@ from __future__ import annotations
|
|
|
5
5
|
|
|
6
6
|
from typing import ClassVar
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import attr
|
|
9
9
|
from openlineage.client.generated.base import RunFacet
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
@define
|
|
12
|
+
@attr.define
|
|
13
13
|
class ErrorMessageRunFacet(RunFacet):
|
|
14
14
|
message: str
|
|
15
15
|
"""A human-readable string representing error message generated by observed system"""
|
|
@@ -17,7 +17,7 @@ class ErrorMessageRunFacet(RunFacet):
|
|
|
17
17
|
programmingLanguage: str # noqa: N815
|
|
18
18
|
"""Programming language the observed system uses."""
|
|
19
19
|
|
|
20
|
-
stackTrace: str | None = field(default=None) # noqa: N815
|
|
20
|
+
stackTrace: str | None = attr.field(default=None) # noqa: N815
|
|
21
21
|
"""A language-specific stack trace generated by observed system"""
|
|
22
22
|
|
|
23
23
|
_additional_skip_redact: ClassVar[list[str]] = ["programmingLanguage"]
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import attr
|
|
7
7
|
from openlineage.client.generated.base import RunFacet
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
@define
|
|
10
|
+
@attr.define
|
|
11
11
|
class ExternalQueryRunFacet(RunFacet):
|
|
12
12
|
externalQueryId: str # noqa: N815
|
|
13
13
|
"""Identifier for the external system"""
|
|
@@ -3,29 +3,29 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import attr
|
|
7
7
|
from openlineage.client.generated.base import RunFacet
|
|
8
8
|
from openlineage.client.utils import RedactMixin
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
@define
|
|
11
|
+
@attr.define
|
|
12
12
|
class Error(RedactMixin):
|
|
13
13
|
errorMessage: str # noqa: N815
|
|
14
14
|
"""Text representation of extraction error message."""
|
|
15
15
|
|
|
16
|
-
stackTrace: str | None = field(default=None) # noqa: N815
|
|
16
|
+
stackTrace: str | None = attr.field(default=None) # noqa: N815
|
|
17
17
|
"""Stack trace of extraction error message"""
|
|
18
18
|
|
|
19
|
-
task: str | None = field(default=None)
|
|
19
|
+
task: str | None = attr.field(default=None)
|
|
20
20
|
"""
|
|
21
21
|
Text representation of task that failed. This can be, for example, SQL statement that parser could
|
|
22
22
|
not interpret.
|
|
23
23
|
"""
|
|
24
|
-
taskNumber: int | None = field(default=None) # noqa: N815
|
|
24
|
+
taskNumber: int | None = attr.field(default=None) # noqa: N815
|
|
25
25
|
"""Order of task (counted from 0)."""
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
@define
|
|
28
|
+
@attr.define
|
|
29
29
|
class ExtractionErrorRunFacet(RunFacet):
|
|
30
30
|
totalTasks: int # noqa: N815
|
|
31
31
|
"""
|
{openlineage_python-1.15.0 → openlineage_python-1.17.0}/openlineage/client/generated/job_type_job.py
RENAMED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import attr
|
|
7
7
|
from openlineage.client.generated.base import JobFacet
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
@define
|
|
10
|
+
@attr.define
|
|
11
11
|
class JobTypeJobFacet(JobFacet):
|
|
12
12
|
processingType: str # noqa: N815
|
|
13
13
|
"""Job processing type like: BATCH or STREAMING"""
|
|
@@ -15,7 +15,7 @@ class JobTypeJobFacet(JobFacet):
|
|
|
15
15
|
integration: str
|
|
16
16
|
"""OpenLineage integration type of this job: SPARK|DBT|AIRFLOW|FLINK"""
|
|
17
17
|
|
|
18
|
-
jobType: str | None = field(default=None) # noqa: N815
|
|
18
|
+
jobType: str | None = attr.field(default=None) # noqa: N815
|
|
19
19
|
"""Run type like: QUERY|COMMAND|DAG|TASK|JOB|MODEL"""
|
|
20
20
|
|
|
21
21
|
@staticmethod
|
|
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
|
|
6
6
|
from enum import Enum
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import attr
|
|
9
9
|
from openlineage.client.generated.base import DatasetFacet
|
|
10
10
|
from openlineage.client.utils import RedactMixin
|
|
11
11
|
|
|
@@ -21,12 +21,12 @@ class LifecycleStateChange(Enum):
|
|
|
21
21
|
TRUNCATE = "TRUNCATE"
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
@define
|
|
24
|
+
@attr.define
|
|
25
25
|
class LifecycleStateChangeDatasetFacet(DatasetFacet):
|
|
26
26
|
lifecycleStateChange: LifecycleStateChange # noqa: N815
|
|
27
27
|
"""The lifecycle state change."""
|
|
28
28
|
|
|
29
|
-
previousIdentifier: PreviousIdentifier | None = field(default=None) # noqa: N815
|
|
29
|
+
previousIdentifier: PreviousIdentifier | None = attr.field(default=None) # noqa: N815
|
|
30
30
|
"""Previous name of the dataset in case of renaming it."""
|
|
31
31
|
|
|
32
32
|
@staticmethod
|
|
@@ -34,7 +34,7 @@ class LifecycleStateChangeDatasetFacet(DatasetFacet):
|
|
|
34
34
|
return "https://openlineage.io/spec/facets/1-0-1/LifecycleStateChangeDatasetFacet.json#/$defs/LifecycleStateChangeDatasetFacet"
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
@define
|
|
37
|
+
@attr.define
|
|
38
38
|
class PreviousIdentifier(RedactMixin):
|
|
39
39
|
"""Previous name of the dataset in case of renaming it."""
|
|
40
40
|
|
|
@@ -5,18 +5,18 @@ from __future__ import annotations
|
|
|
5
5
|
|
|
6
6
|
from typing import ClassVar
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import attr
|
|
9
9
|
from openlineage.client.generated.base import RunFacet
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
@define
|
|
12
|
+
@attr.define
|
|
13
13
|
class NominalTimeRunFacet(RunFacet):
|
|
14
|
-
nominalStartTime: str = field() # noqa: N815
|
|
14
|
+
nominalStartTime: str = attr.field() # noqa: N815
|
|
15
15
|
"""
|
|
16
16
|
An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the nominal start time
|
|
17
17
|
(included) of the run. AKA the schedule time
|
|
18
18
|
"""
|
|
19
|
-
nominalEndTime: str | None = field(default=None) # noqa: N815
|
|
19
|
+
nominalEndTime: str | None = attr.field(default=None) # noqa: N815
|
|
20
20
|
"""
|
|
21
21
|
An [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp representing the nominal end time
|
|
22
22
|
(excluded) of the run. (Should be the nominal start time of the next run)
|
|
@@ -5,19 +5,19 @@ from __future__ import annotations
|
|
|
5
5
|
|
|
6
6
|
from typing import ClassVar
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import attr
|
|
9
9
|
from openlineage.client.generated.base import OutputDatasetFacet
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
@define
|
|
12
|
+
@attr.define
|
|
13
13
|
class OutputStatisticsOutputDatasetFacet(OutputDatasetFacet):
|
|
14
|
-
rowCount: int | None = field(default=None) # noqa: N815
|
|
14
|
+
rowCount: int | None = attr.field(default=None) # noqa: N815
|
|
15
15
|
"""The number of rows written to the dataset"""
|
|
16
16
|
|
|
17
|
-
size: int | None = field(default=None)
|
|
17
|
+
size: int | None = attr.field(default=None)
|
|
18
18
|
"""The size in bytes written to the dataset"""
|
|
19
19
|
|
|
20
|
-
fileCount: int | None = field(default=None) # noqa: N815
|
|
20
|
+
fileCount: int | None = attr.field(default=None) # noqa: N815
|
|
21
21
|
"""The number of files written to the dataset"""
|
|
22
22
|
|
|
23
23
|
_additional_skip_redact: ClassVar[list[str]] = ["rowCount", "size"]
|