datacontract-cli 0.10.23__py3-none-any.whl → 0.10.40__py3-none-any.whl
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.
- datacontract/__init__.py +13 -0
- datacontract/api.py +12 -5
- datacontract/catalog/catalog.py +5 -3
- datacontract/cli.py +119 -13
- datacontract/data_contract.py +145 -67
- datacontract/engines/data_contract_checks.py +366 -60
- datacontract/engines/data_contract_test.py +50 -4
- datacontract/engines/fastjsonschema/check_jsonschema.py +37 -19
- datacontract/engines/fastjsonschema/s3/s3_read_files.py +3 -2
- datacontract/engines/soda/check_soda_execute.py +27 -3
- datacontract/engines/soda/connections/athena.py +79 -0
- datacontract/engines/soda/connections/duckdb_connection.py +65 -6
- datacontract/engines/soda/connections/kafka.py +4 -2
- datacontract/engines/soda/connections/oracle.py +50 -0
- datacontract/export/avro_converter.py +20 -3
- datacontract/export/bigquery_converter.py +1 -1
- datacontract/export/dbt_converter.py +36 -7
- datacontract/export/dqx_converter.py +126 -0
- datacontract/export/duckdb_type_converter.py +57 -0
- datacontract/export/excel_exporter.py +923 -0
- datacontract/export/exporter.py +3 -0
- datacontract/export/exporter_factory.py +17 -1
- datacontract/export/great_expectations_converter.py +55 -5
- datacontract/export/{html_export.py → html_exporter.py} +31 -20
- datacontract/export/markdown_converter.py +134 -5
- datacontract/export/mermaid_exporter.py +110 -0
- datacontract/export/odcs_v3_exporter.py +193 -149
- datacontract/export/protobuf_converter.py +163 -69
- datacontract/export/rdf_converter.py +2 -2
- datacontract/export/sodacl_converter.py +9 -1
- datacontract/export/spark_converter.py +31 -4
- datacontract/export/sql_converter.py +6 -2
- datacontract/export/sql_type_converter.py +124 -8
- datacontract/imports/avro_importer.py +63 -12
- datacontract/imports/csv_importer.py +111 -57
- datacontract/imports/excel_importer.py +1112 -0
- datacontract/imports/importer.py +16 -3
- datacontract/imports/importer_factory.py +17 -0
- datacontract/imports/json_importer.py +325 -0
- datacontract/imports/odcs_importer.py +2 -2
- datacontract/imports/odcs_v3_importer.py +367 -151
- datacontract/imports/protobuf_importer.py +264 -0
- datacontract/imports/spark_importer.py +117 -13
- datacontract/imports/sql_importer.py +32 -16
- datacontract/imports/unity_importer.py +84 -38
- datacontract/init/init_template.py +1 -1
- datacontract/integration/entropy_data.py +126 -0
- datacontract/lint/resolve.py +112 -23
- datacontract/lint/schema.py +24 -15
- datacontract/lint/urls.py +17 -3
- datacontract/model/data_contract_specification/__init__.py +1 -0
- datacontract/model/odcs.py +13 -0
- datacontract/model/run.py +3 -0
- datacontract/output/junit_test_results.py +3 -3
- datacontract/schemas/datacontract-1.1.0.init.yaml +1 -1
- datacontract/schemas/datacontract-1.2.0.init.yaml +91 -0
- datacontract/schemas/datacontract-1.2.0.schema.json +2029 -0
- datacontract/schemas/datacontract-1.2.1.init.yaml +91 -0
- datacontract/schemas/datacontract-1.2.1.schema.json +2058 -0
- datacontract/schemas/odcs-3.0.2.schema.json +2382 -0
- datacontract/schemas/odcs-3.1.0.schema.json +2809 -0
- datacontract/templates/datacontract.html +54 -3
- datacontract/templates/datacontract_odcs.html +685 -0
- datacontract/templates/index.html +5 -2
- datacontract/templates/partials/server.html +2 -0
- datacontract/templates/style/output.css +319 -145
- {datacontract_cli-0.10.23.dist-info → datacontract_cli-0.10.40.dist-info}/METADATA +711 -433
- datacontract_cli-0.10.40.dist-info/RECORD +121 -0
- {datacontract_cli-0.10.23.dist-info → datacontract_cli-0.10.40.dist-info}/WHEEL +1 -1
- {datacontract_cli-0.10.23.dist-info → datacontract_cli-0.10.40.dist-info/licenses}/LICENSE +1 -1
- datacontract/export/csv_type_converter.py +0 -36
- datacontract/integration/datamesh_manager.py +0 -72
- datacontract/lint/lint.py +0 -142
- datacontract/lint/linters/description_linter.py +0 -35
- datacontract/lint/linters/field_pattern_linter.py +0 -34
- datacontract/lint/linters/field_reference_linter.py +0 -48
- datacontract/lint/linters/notice_period_linter.py +0 -55
- datacontract/lint/linters/quality_schema_linter.py +0 -52
- datacontract/lint/linters/valid_constraints_linter.py +0 -100
- datacontract/model/data_contract_specification.py +0 -327
- datacontract_cli-0.10.23.dist-info/RECORD +0 -113
- /datacontract/{lint/linters → output}/__init__.py +0 -0
- {datacontract_cli-0.10.23.dist-info → datacontract_cli-0.10.40.dist-info}/entry_points.txt +0 -0
- {datacontract_cli-0.10.23.dist-info → datacontract_cli-0.10.40.dist-info}/top_level.txt +0 -0
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
from datacontract.model.data_contract_specification import DataContractSpecification, Field
|
|
2
|
-
|
|
3
|
-
from ..lint import Linter, LinterResult
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class ValidFieldConstraintsLinter(Linter):
|
|
7
|
-
"""Check validity of field constraints.
|
|
8
|
-
|
|
9
|
-
More precisely, check that only numeric constraints are specified on
|
|
10
|
-
fields of numeric type and string constraints on fields of string type.
|
|
11
|
-
Additionally, the linter checks that defined constraints make sense.
|
|
12
|
-
Minimum values should not be greater than maximum values, exclusive and
|
|
13
|
-
non-exclusive minimum and maximum should not be combined and string
|
|
14
|
-
pattern and format should not be combined.
|
|
15
|
-
|
|
16
|
-
"""
|
|
17
|
-
|
|
18
|
-
valid_types_for_constraint = {
|
|
19
|
-
"pattern": set(["string", "text", "varchar"]),
|
|
20
|
-
"format": set(["string", "text", "varchar"]),
|
|
21
|
-
"minLength": set(["string", "text", "varchar"]),
|
|
22
|
-
"maxLength": set(["string", "text", "varchar"]),
|
|
23
|
-
"minimum": set(["int", "integer", "number", "decimal", "numeric", "long", "bigint", "float", "double"]),
|
|
24
|
-
"exclusiveMinimum": set(
|
|
25
|
-
["int", "integer", "number", "decimal", "numeric", "long", "bigint", "float", "double"]
|
|
26
|
-
),
|
|
27
|
-
"maximum": set(["int", "integer", "number", "decimal", "numeric", "long", "bigint", "float", "double"]),
|
|
28
|
-
"exclusiveMaximum": set(
|
|
29
|
-
["int", "integer", "number", "decimal", "numeric", "long", "bigint", "float", "double"]
|
|
30
|
-
),
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
def check_minimum_maximum(self, field: Field, field_name: str, model_name: str) -> LinterResult:
|
|
34
|
-
(min, max, xmin, xmax) = (field.minimum, field.maximum, field.exclusiveMinimum, field.exclusiveMaximum)
|
|
35
|
-
match (
|
|
36
|
-
"minimum" in field.model_fields_set,
|
|
37
|
-
"maximum" in field.model_fields_set,
|
|
38
|
-
"exclusiveMinimum" in field.model_fields_set,
|
|
39
|
-
"exclusiveMaximum" in field.model_fields_set,
|
|
40
|
-
):
|
|
41
|
-
case (True, True, _, _) if min > max:
|
|
42
|
-
return LinterResult.erroneous(
|
|
43
|
-
f"Minimum {min} is greater than maximum {max} on " f"field '{field_name}' in model '{model_name}'."
|
|
44
|
-
)
|
|
45
|
-
case (_, _, True, True) if xmin >= xmax:
|
|
46
|
-
return LinterResult.erroneous(
|
|
47
|
-
f"Exclusive minimum {xmin} is greater than exclusive"
|
|
48
|
-
f" maximum {xmax} on field '{field_name}' in model '{model_name}'."
|
|
49
|
-
)
|
|
50
|
-
case (True, True, True, True):
|
|
51
|
-
return LinterResult.erroneous(
|
|
52
|
-
f"Both exclusive and non-exclusive minimum and maximum are "
|
|
53
|
-
f"defined on field '{field_name}' in model '{model_name}'."
|
|
54
|
-
)
|
|
55
|
-
case (True, _, True, _):
|
|
56
|
-
return LinterResult.erroneous(
|
|
57
|
-
f"Both exclusive and non-exclusive minimum are "
|
|
58
|
-
f"defined on field '{field_name}' in model '{model_name}'."
|
|
59
|
-
)
|
|
60
|
-
case (_, True, _, True):
|
|
61
|
-
return LinterResult.erroneous(
|
|
62
|
-
f"Both exclusive and non-exclusive maximum are "
|
|
63
|
-
f"defined on field '{field_name}' in model '{model_name}'."
|
|
64
|
-
)
|
|
65
|
-
return LinterResult()
|
|
66
|
-
|
|
67
|
-
def check_string_constraints(self, field: Field, field_name: str, model_name: str) -> LinterResult:
|
|
68
|
-
result = LinterResult()
|
|
69
|
-
if field.minLength and field.maxLength and field.minLength > field.maxLength:
|
|
70
|
-
result = result.with_error(
|
|
71
|
-
f"Minimum length is greater that maximum length on" f" field '{field_name}' in model '{model_name}'."
|
|
72
|
-
)
|
|
73
|
-
if field.pattern and field.format:
|
|
74
|
-
result = result.with_error(
|
|
75
|
-
f"Both a pattern and a format are defined for field" f" '{field_name}' in model '{model_name}'."
|
|
76
|
-
)
|
|
77
|
-
return result
|
|
78
|
-
|
|
79
|
-
@property
|
|
80
|
-
def name(self):
|
|
81
|
-
return "Fields use valid constraints"
|
|
82
|
-
|
|
83
|
-
@property
|
|
84
|
-
def id(self):
|
|
85
|
-
return "field-constraints"
|
|
86
|
-
|
|
87
|
-
def lint_implementation(self, contract: DataContractSpecification) -> LinterResult:
|
|
88
|
-
result = LinterResult()
|
|
89
|
-
for model_name, model in contract.models.items():
|
|
90
|
-
for field_name, field in model.fields.items():
|
|
91
|
-
for _property, allowed_types in self.valid_types_for_constraint.items():
|
|
92
|
-
if _property in field.model_fields_set and field.type not in allowed_types:
|
|
93
|
-
result = result.with_error(
|
|
94
|
-
f"Forbidden constraint '{_property}' defined on field "
|
|
95
|
-
f"'{field_name}' in model '{model_name}'. Field type "
|
|
96
|
-
f"is '{field.type}'."
|
|
97
|
-
)
|
|
98
|
-
result = result.combine(self.check_minimum_maximum(field, field_name, model_name))
|
|
99
|
-
result = result.combine(self.check_string_constraints(field, field_name, model_name))
|
|
100
|
-
return result
|
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
from typing import Any, Dict, List
|
|
3
|
-
|
|
4
|
-
import pydantic as pyd
|
|
5
|
-
import yaml
|
|
6
|
-
|
|
7
|
-
DATACONTRACT_TYPES = [
|
|
8
|
-
"string",
|
|
9
|
-
"text",
|
|
10
|
-
"varchar",
|
|
11
|
-
"number",
|
|
12
|
-
"decimal",
|
|
13
|
-
"numeric",
|
|
14
|
-
"int",
|
|
15
|
-
"integer",
|
|
16
|
-
"long",
|
|
17
|
-
"bigint",
|
|
18
|
-
"float",
|
|
19
|
-
"double",
|
|
20
|
-
"boolean",
|
|
21
|
-
"timestamp",
|
|
22
|
-
"timestamp_tz",
|
|
23
|
-
"timestamp_ntz",
|
|
24
|
-
"date",
|
|
25
|
-
"array",
|
|
26
|
-
"bytes",
|
|
27
|
-
"object",
|
|
28
|
-
"record",
|
|
29
|
-
"struct",
|
|
30
|
-
"null",
|
|
31
|
-
]
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class Contact(pyd.BaseModel):
|
|
35
|
-
name: str | None = None
|
|
36
|
-
url: str | None = None
|
|
37
|
-
email: str | None = None
|
|
38
|
-
|
|
39
|
-
model_config = pyd.ConfigDict(
|
|
40
|
-
extra="allow",
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
class ServerRole(pyd.BaseModel):
|
|
45
|
-
name: str | None = None
|
|
46
|
-
description: str | None = None
|
|
47
|
-
model_config = pyd.ConfigDict(
|
|
48
|
-
extra="allow",
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class Server(pyd.BaseModel):
|
|
53
|
-
type: str | None = None
|
|
54
|
-
description: str | None = None
|
|
55
|
-
environment: str | None = None
|
|
56
|
-
format: str | None = None
|
|
57
|
-
project: str | None = None
|
|
58
|
-
dataset: str | None = None
|
|
59
|
-
path: str | None = None
|
|
60
|
-
delimiter: str | None = None
|
|
61
|
-
endpointUrl: str | None = None
|
|
62
|
-
location: str | None = None
|
|
63
|
-
account: str | None = None
|
|
64
|
-
database: str | None = None
|
|
65
|
-
schema_: str | None = pyd.Field(default=None, alias="schema")
|
|
66
|
-
host: str | None = None
|
|
67
|
-
port: int | None = None
|
|
68
|
-
catalog: str | None = None
|
|
69
|
-
topic: str | None = None
|
|
70
|
-
http_path: str | None = None # Use ENV variable
|
|
71
|
-
token: str | None = None # Use ENV variable
|
|
72
|
-
dataProductId: str | None = None
|
|
73
|
-
outputPortId: str | None = None
|
|
74
|
-
driver: str | None = None
|
|
75
|
-
storageAccount: str | None = None
|
|
76
|
-
roles: List[ServerRole] = None
|
|
77
|
-
|
|
78
|
-
model_config = pyd.ConfigDict(
|
|
79
|
-
extra="allow",
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
class Terms(pyd.BaseModel):
|
|
84
|
-
usage: str | None = None
|
|
85
|
-
limitations: str | None = None
|
|
86
|
-
billing: str | None = None
|
|
87
|
-
noticePeriod: str | None = None
|
|
88
|
-
description: str | None = None
|
|
89
|
-
|
|
90
|
-
model_config = pyd.ConfigDict(
|
|
91
|
-
extra="allow",
|
|
92
|
-
)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
class Definition(pyd.BaseModel):
|
|
96
|
-
domain: str | None = None
|
|
97
|
-
name: str | None = None
|
|
98
|
-
title: str | None = None
|
|
99
|
-
description: str | None = None
|
|
100
|
-
type: str | None = None
|
|
101
|
-
enum: List[str] = []
|
|
102
|
-
format: str | None = None
|
|
103
|
-
minLength: int | None = None
|
|
104
|
-
maxLength: int | None = None
|
|
105
|
-
pattern: str | None = None
|
|
106
|
-
minimum: int | None = None
|
|
107
|
-
exclusiveMinimum: int | None = None
|
|
108
|
-
maximum: int | None = None
|
|
109
|
-
exclusiveMaximum: int | None = None
|
|
110
|
-
pii: bool | None = None
|
|
111
|
-
classification: str | None = None
|
|
112
|
-
fields: Dict[str, "Field"] = {}
|
|
113
|
-
items: "Field" = None
|
|
114
|
-
tags: List[str] = []
|
|
115
|
-
links: Dict[str, str] = {}
|
|
116
|
-
example: str | None = None
|
|
117
|
-
examples: List[Any] | None = None
|
|
118
|
-
|
|
119
|
-
model_config = pyd.ConfigDict(
|
|
120
|
-
extra="allow",
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
class Quality(pyd.BaseModel):
|
|
125
|
-
type: str | None = None
|
|
126
|
-
description: str | None = None
|
|
127
|
-
query: str | None = None
|
|
128
|
-
dialect: str | None = None
|
|
129
|
-
mustBe: int | None = None
|
|
130
|
-
mustNotBe: int | None = None
|
|
131
|
-
mustBeGreaterThan: int | None = None
|
|
132
|
-
mustBeGreaterThanOrEqualTo: int | None = None
|
|
133
|
-
mustBeLessThan: int | None = None
|
|
134
|
-
mustBeLessThanOrEqualTo: int | None = None
|
|
135
|
-
mustBeBetween: List[int] = None
|
|
136
|
-
mustNotBeBetween: List[int] = None
|
|
137
|
-
engine: str | None = None
|
|
138
|
-
implementation: str | Dict[str, Any] | None = None
|
|
139
|
-
|
|
140
|
-
model_config = pyd.ConfigDict(
|
|
141
|
-
extra="allow",
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
class Field(pyd.BaseModel):
|
|
146
|
-
ref: str = pyd.Field(default=None, alias="$ref")
|
|
147
|
-
title: str | None = None
|
|
148
|
-
type: str | None = None
|
|
149
|
-
format: str | None = None
|
|
150
|
-
required: bool | None = None
|
|
151
|
-
primary: bool = pyd.Field(
|
|
152
|
-
default=None,
|
|
153
|
-
deprecated="Removed in Data Contract Specification v1.1.0. Use primaryKey instead.",
|
|
154
|
-
)
|
|
155
|
-
primaryKey: bool | None = None
|
|
156
|
-
unique: bool | None = None
|
|
157
|
-
references: str | None = None
|
|
158
|
-
description: str | None = None
|
|
159
|
-
pii: bool | None = None
|
|
160
|
-
classification: str | None = None
|
|
161
|
-
pattern: str | None = None
|
|
162
|
-
minLength: int | None = None
|
|
163
|
-
maxLength: int | None = None
|
|
164
|
-
minimum: int | None = None
|
|
165
|
-
exclusiveMinimum: int | None = None
|
|
166
|
-
maximum: int | None = None
|
|
167
|
-
exclusiveMaximum: int | None = None
|
|
168
|
-
enum: List[str] | None = []
|
|
169
|
-
tags: List[str] | None = []
|
|
170
|
-
links: Dict[str, str] = {}
|
|
171
|
-
fields: Dict[str, "Field"] = {}
|
|
172
|
-
items: "Field" = None
|
|
173
|
-
keys: "Field" = None
|
|
174
|
-
values: "Field" = None
|
|
175
|
-
precision: int | None = None
|
|
176
|
-
scale: int | None = None
|
|
177
|
-
example: Any | None = pyd.Field(
|
|
178
|
-
default=None,
|
|
179
|
-
deprecated="Removed in Data Contract Specification v1.1.0. Use examples instead.",
|
|
180
|
-
)
|
|
181
|
-
examples: List[Any] | None = None
|
|
182
|
-
quality: List[Quality] | None = []
|
|
183
|
-
config: Dict[str, Any] | None = None
|
|
184
|
-
|
|
185
|
-
model_config = pyd.ConfigDict(
|
|
186
|
-
extra="allow",
|
|
187
|
-
)
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
class Model(pyd.BaseModel):
|
|
191
|
-
description: str | None = None
|
|
192
|
-
type: str | None = None
|
|
193
|
-
namespace: str | None = None
|
|
194
|
-
title: str | None = None
|
|
195
|
-
fields: Dict[str, Field] = {}
|
|
196
|
-
quality: List[Quality] | None = []
|
|
197
|
-
primaryKey: List[str] | None = []
|
|
198
|
-
examples: List[Any] | None = None
|
|
199
|
-
config: Dict[str, Any] = None
|
|
200
|
-
tags: List[str] | None = None
|
|
201
|
-
|
|
202
|
-
model_config = pyd.ConfigDict(
|
|
203
|
-
extra="allow",
|
|
204
|
-
)
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
class Info(pyd.BaseModel):
|
|
208
|
-
title: str | None = None
|
|
209
|
-
version: str | None = None
|
|
210
|
-
status: str | None = None
|
|
211
|
-
description: str | None = None
|
|
212
|
-
owner: str | None = None
|
|
213
|
-
contact: Contact | None = None
|
|
214
|
-
|
|
215
|
-
model_config = pyd.ConfigDict(
|
|
216
|
-
extra="allow",
|
|
217
|
-
)
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
class Example(pyd.BaseModel):
|
|
221
|
-
type: str | None = None
|
|
222
|
-
description: str | None = None
|
|
223
|
-
model: str | None = None
|
|
224
|
-
data: str | object = None
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
# Deprecated Quality class
|
|
228
|
-
class DeprecatedQuality(pyd.BaseModel):
|
|
229
|
-
type: str | None = None
|
|
230
|
-
specification: str | object = None
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
class Availability(pyd.BaseModel):
|
|
234
|
-
description: str | None = None
|
|
235
|
-
percentage: str | None = None
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
class Retention(pyd.BaseModel):
|
|
239
|
-
description: str | None = None
|
|
240
|
-
period: str | None = None
|
|
241
|
-
unlimited: bool | None = None
|
|
242
|
-
timestampField: str | None = None
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
class Latency(pyd.BaseModel):
|
|
246
|
-
description: str | None = None
|
|
247
|
-
threshold: str | None = None
|
|
248
|
-
sourceTimestampField: str | None = None
|
|
249
|
-
processedTimestampField: str | None = None
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
class Freshness(pyd.BaseModel):
|
|
253
|
-
description: str | None = None
|
|
254
|
-
threshold: str | None = None
|
|
255
|
-
timestampField: str | None = None
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
class Frequency(pyd.BaseModel):
|
|
259
|
-
description: str | None = None
|
|
260
|
-
type: str | None = None
|
|
261
|
-
interval: str | None = None
|
|
262
|
-
cron: str | None = None
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
class Support(pyd.BaseModel):
|
|
266
|
-
description: str | None = None
|
|
267
|
-
time: str | None = None
|
|
268
|
-
responseTime: str | None = None
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
class Backup(pyd.BaseModel):
|
|
272
|
-
description: str | None = None
|
|
273
|
-
interval: str | None = None
|
|
274
|
-
cron: str | None = None
|
|
275
|
-
recoveryTime: str | None = None
|
|
276
|
-
recoveryPoint: str | None = None
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
class ServiceLevel(pyd.BaseModel):
|
|
280
|
-
availability: Availability | None = None
|
|
281
|
-
retention: Retention | None = None
|
|
282
|
-
latency: Latency | None = None
|
|
283
|
-
freshness: Freshness | None = None
|
|
284
|
-
frequency: Frequency | None = None
|
|
285
|
-
support: Support | None = None
|
|
286
|
-
backup: Backup | None = None
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
class DataContractSpecification(pyd.BaseModel):
|
|
290
|
-
dataContractSpecification: str | None = None
|
|
291
|
-
id: str | None = None
|
|
292
|
-
info: Info | None = None
|
|
293
|
-
servers: Dict[str, Server] = {}
|
|
294
|
-
terms: Terms | None = None
|
|
295
|
-
models: Dict[str, Model] = {}
|
|
296
|
-
definitions: Dict[str, Definition] = {}
|
|
297
|
-
examples: List[Example] = pyd.Field(
|
|
298
|
-
default_factory=list,
|
|
299
|
-
deprecated="Removed in Data Contract Specification " "v1.1.0. Use models.examples instead.",
|
|
300
|
-
)
|
|
301
|
-
quality: DeprecatedQuality | None = pyd.Field(
|
|
302
|
-
default=None,
|
|
303
|
-
deprecated="Removed in Data Contract Specification v1.1.0. Use " "model-level and field-level quality instead.",
|
|
304
|
-
)
|
|
305
|
-
servicelevels: ServiceLevel | None = None
|
|
306
|
-
links: Dict[str, str] = {}
|
|
307
|
-
tags: List[str] = []
|
|
308
|
-
|
|
309
|
-
@classmethod
|
|
310
|
-
def from_file(cls, file):
|
|
311
|
-
if not os.path.exists(file):
|
|
312
|
-
raise FileNotFoundError(f"The file '{file}' does not exist.")
|
|
313
|
-
with open(file, "r") as file:
|
|
314
|
-
file_content = file.read()
|
|
315
|
-
return DataContractSpecification.from_string(file_content)
|
|
316
|
-
|
|
317
|
-
@classmethod
|
|
318
|
-
def from_string(cls, data_contract_str):
|
|
319
|
-
data = yaml.safe_load(data_contract_str)
|
|
320
|
-
return DataContractSpecification(**data)
|
|
321
|
-
|
|
322
|
-
def to_yaml(self):
|
|
323
|
-
return yaml.dump(
|
|
324
|
-
self.model_dump(exclude_defaults=True, exclude_none=True, by_alias=True),
|
|
325
|
-
sort_keys=False,
|
|
326
|
-
allow_unicode=True,
|
|
327
|
-
)
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
datacontract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
datacontract/api.py,sha256=qZJr8I5MI4wZlvjUEAvqna9Xj5Ic2GCBxSyogBlKEbE,8166
|
|
3
|
-
datacontract/cli.py,sha256=7jvwNDLe4TqaegpPiNOjMeHIg2qFxK6AGBWUkzqH7AM,16880
|
|
4
|
-
datacontract/data_contract.py,sha256=H9ogUTj41javVW8gcLWYDKZDJMJQHyc_Q4LxLqFrRoo,10686
|
|
5
|
-
datacontract/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
datacontract/breaking/breaking.py,sha256=DnqgxUjD-EAZcg5RBizOP9a2WxsFTaQBik0AB_m3K00,20431
|
|
7
|
-
datacontract/breaking/breaking_change.py,sha256=BIDEUo1U2CQLVT2-I5PyFttxAj6zQPI1UUkEoOOQXMY,2249
|
|
8
|
-
datacontract/breaking/breaking_rules.py,sha256=M9IdzVJSA7oOr1fvLQl0y9MoBKeItPz42Db2U2cjH2Y,4063
|
|
9
|
-
datacontract/catalog/catalog.py,sha256=wmv_2BBxHhNBlilAmQHHhNe4tK14DowkyIOVaQW2DWU,2691
|
|
10
|
-
datacontract/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
datacontract/engines/data_contract_checks.py,sha256=wjnKh1FxG9qXB1zOPjrGmjW7uCpRsxXICMIvyFwpVt4,26622
|
|
12
|
-
datacontract/engines/data_contract_test.py,sha256=8TUpKKausMcOoM_7PX_cqjHK_WKsvSvy09SwvJmJoOM,2855
|
|
13
|
-
datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py,sha256=zrDn-_EJJ5kv0kZWAA-toeEPuBd3YQ0-U7Jb8euNUS8,1558
|
|
14
|
-
datacontract/engines/datacontract/check_that_datacontract_file_exists.py,sha256=Vw-7U0GmQT2127tybxggZfpRFiZVgoIh6ndkTGM0FP4,665
|
|
15
|
-
datacontract/engines/fastjsonschema/check_jsonschema.py,sha256=-knTZ-NsHpBWCoR7r1JP5iYSWx697mugijmqUPx0pEY,10307
|
|
16
|
-
datacontract/engines/fastjsonschema/s3/s3_read_files.py,sha256=vuz_hLF2VD8LR_prjQpPLBU8Is-iHLAvqp4KwclOv9I,1157
|
|
17
|
-
datacontract/engines/soda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
datacontract/engines/soda/check_soda_execute.py,sha256=ve7Td5uy3ZvVyM5H3xz3ndsP-vYK8RP6j8PiSRi26Hs,8295
|
|
19
|
-
datacontract/engines/soda/connections/bigquery.py,sha256=C-8kxmzpYe88bJp80ObHFLMh4rpnIjnUQ7XOj0Ke7lk,903
|
|
20
|
-
datacontract/engines/soda/connections/databricks.py,sha256=cMRasuO0MrSKVgHPB-9uFTGTZPFg6z9Kpk3tJ0SdR0s,943
|
|
21
|
-
datacontract/engines/soda/connections/duckdb_connection.py,sha256=_usG-Ci7FaAdEsU3_70zUVGVQlqvVpupP44RYZOa6AE,6772
|
|
22
|
-
datacontract/engines/soda/connections/kafka.py,sha256=j6I9loXixzaV-SU56dIodCykPDAnWnsNRfKG4wOtzvs,8570
|
|
23
|
-
datacontract/engines/soda/connections/postgres.py,sha256=9GTF4Es3M5vb7ocSGqAxXmslvkS5CjsPQGIuo020CFc,626
|
|
24
|
-
datacontract/engines/soda/connections/snowflake.py,sha256=rfG2ysuqNM6TkvyqQKcGHFsTGJ6AROmud5VleUDRrb0,749
|
|
25
|
-
datacontract/engines/soda/connections/sqlserver.py,sha256=RzGLbCUdRyfmDcqtM_AB9WZ-Xk-XYX91nkXpVNpYbvc,1440
|
|
26
|
-
datacontract/engines/soda/connections/trino.py,sha256=JvKUP9aFg_n095oWE0-bGmfbETSWEOURGEZdQuG8txA,718
|
|
27
|
-
datacontract/export/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
-
datacontract/export/avro_converter.py,sha256=gPPSPSoQaHMMg9iOfiywt1IMYEsuTu8kCYWrSa7PJNs,4626
|
|
29
|
-
datacontract/export/avro_idl_converter.py,sha256=SGO7JfI9UGXLYFR5wMGNUH1qf6kt9lF6dUU9roVqnFo,9878
|
|
30
|
-
datacontract/export/bigquery_converter.py,sha256=VSBdVGWrlar18ETzgNArxDzk8Zt5JcAc_wKjfwLpG_A,4734
|
|
31
|
-
datacontract/export/csv_type_converter.py,sha256=ZZuJwBgQnafZC7PPvAXsBf2IajPJq8TYZ1l8Qq0GYeI,1290
|
|
32
|
-
datacontract/export/custom_converter.py,sha256=xb8KbkRRgHmT4ewwC7XxtnKpe_ZMSJWBjYOaKjmO_KQ,1216
|
|
33
|
-
datacontract/export/data_caterer_converter.py,sha256=eSEuy3TbqUIG_lHYEBOydAgp_CJNoGArXrcJvh81wcw,5984
|
|
34
|
-
datacontract/export/dbml_converter.py,sha256=f_OZEFwRUyL-Kg2yn_G58I8iz1VfFrZh8Nbw3Wq0JDo,4777
|
|
35
|
-
datacontract/export/dbt_converter.py,sha256=_CpRg3BD6UZvJJUMI4lzdiQj136rOjvXYVBMHvxEYqs,10548
|
|
36
|
-
datacontract/export/dcs_exporter.py,sha256=RALQ7bLAjak7EsoFFL2GFX2Oju7pnCDPCdRN_wo9wHM,210
|
|
37
|
-
datacontract/export/exporter.py,sha256=XrNmoIH_5Myb8jx-vaS1ZCF11RTw5zf5JATkqXWunXE,3025
|
|
38
|
-
datacontract/export/exporter_factory.py,sha256=0XmU51fQNZVQdC78gDy_82CatazhioMmcd6qdCl8muU,5847
|
|
39
|
-
datacontract/export/go_converter.py,sha256=Ttvbfu3YU-3GBwRD6nwCsFyZuc_hiIvJD-Jg2sT5WLw,3331
|
|
40
|
-
datacontract/export/great_expectations_converter.py,sha256=zMaHaj5DLj_Q_q-iFEa7EZHW-qHdFMxWL4MiMIFKV80,10505
|
|
41
|
-
datacontract/export/html_export.py,sha256=ojazWrb0AwSc7Vr72M_otMo-3PA8mfi8tfIy9BCXk9o,2578
|
|
42
|
-
datacontract/export/iceberg_converter.py,sha256=ArcQ_Y3z_W4_kGDU_8jPRx2-pHpP3Nhx1zYoETOL3c4,6804
|
|
43
|
-
datacontract/export/jsonschema_converter.py,sha256=2MT82MurcQQbrVDRj1kFsxnmFd9scNSfYI1upQSecl4,5631
|
|
44
|
-
datacontract/export/markdown_converter.py,sha256=chtaZX4vXTee7JCMYmWiDQ9m55gwJjHPw6SEM3UOwpQ,6467
|
|
45
|
-
datacontract/export/odcs_v3_exporter.py,sha256=w8PGyTczrZrRMKye_onYZCpB47OM0pEJCt5WIum2O5U,13130
|
|
46
|
-
datacontract/export/pandas_type_converter.py,sha256=464pQ3JQKFQa1TO0HBNcEoZvQye_yUbY6jQtiBaphSc,1117
|
|
47
|
-
datacontract/export/protobuf_converter.py,sha256=9K0fzBGbqlj9AhQumw2oq53hyn_QDCT3UlyH2uXJdC0,3192
|
|
48
|
-
datacontract/export/pydantic_converter.py,sha256=1Lt9F8i6zyQYb44MyQtsXwCWWXYxZ47SmzArr_uPqsU,5579
|
|
49
|
-
datacontract/export/rdf_converter.py,sha256=4gnKus37Geth4MJ3Ruc8AbnpD_Ll9OCx8oTIEKScvh8,6435
|
|
50
|
-
datacontract/export/sodacl_converter.py,sha256=lQCOcNiT7i6KGaJ1Ua4MYBYGm-EyktTGrL4FLZDi14c,1102
|
|
51
|
-
datacontract/export/spark_converter.py,sha256=-6P2_VRFqGfSF7n_lJcD-fuY9Pv8qoH-ud6g8Zimpz4,7190
|
|
52
|
-
datacontract/export/sql_converter.py,sha256=BGjmOAlzB5QfzJiXP61ajV0wj4M5oJrmNZZe_4Lo1Ik,4821
|
|
53
|
-
datacontract/export/sql_type_converter.py,sha256=qjm8Fdyihq3VBL4x2D7RHdWoOm6HWIJe28U4XboYCk8,13436
|
|
54
|
-
datacontract/export/sqlalchemy_converter.py,sha256=0DMncvA811lTtd5q4ZORREQ9YH1vQm1lJeqMWsFvloE,6463
|
|
55
|
-
datacontract/export/terraform_converter.py,sha256=ExFoEvErVk-gBnWJiqC38SxDUmUEydpACWc917l5RyM,2163
|
|
56
|
-
datacontract/imports/avro_importer.py,sha256=hpGvO6uv2zcupJC8-wC-c-vbjNb83IQ560a5F3MsEFA,9937
|
|
57
|
-
datacontract/imports/bigquery_importer.py,sha256=7TcP9FDsIas5LwJZ-HrOPXZ-NuR056sxLfDDh3vjo8E,8419
|
|
58
|
-
datacontract/imports/csv_importer.py,sha256=NT9N9kOSZe6YSJVsYOKF9-d7fqih3Q1zssQzem0finM,2921
|
|
59
|
-
datacontract/imports/dbml_importer.py,sha256=o0IOgvXN34lU1FICDHm_QUTv0DKsgwbHPHUDxQhIapE,3872
|
|
60
|
-
datacontract/imports/dbt_importer.py,sha256=hQwqD9vbvwLLc6Yj3tQbar5ldI0pV-ynSiz7CZZ0JCc,8290
|
|
61
|
-
datacontract/imports/glue_importer.py,sha256=fiJPkvfwOCsaKKCGW19-JM5CCGXZ2mkNrVtUzp2iw6g,8370
|
|
62
|
-
datacontract/imports/iceberg_importer.py,sha256=vadGJVqQKgG-j8swUytZALFB8QjbGRqZPCcPcCy0vco,5923
|
|
63
|
-
datacontract/imports/importer.py,sha256=X4M0SZiRQsz8TGm-FSRuh6bs6qny7V8odyQ7l_1DwNg,876
|
|
64
|
-
datacontract/imports/importer_factory.py,sha256=8ed9-ceJlFMf-AIAyuI6Uzs05CqEs1nPlLA-tvfI0bU,3639
|
|
65
|
-
datacontract/imports/jsonschema_importer.py,sha256=67H__XLugV4vguHrIqzW02dtx27zYTWnOms4D1ma3bk,4961
|
|
66
|
-
datacontract/imports/odcs_importer.py,sha256=vv2dHLGL0Cdivv1CdKn5euJwGNKmiZmXCoxUYAXsHX8,2126
|
|
67
|
-
datacontract/imports/odcs_v3_importer.py,sha256=ev-qvtbRsG52I--We15P3T_OB7mvS7Zj9-6MOI-8vUQ,13061
|
|
68
|
-
datacontract/imports/parquet_importer.py,sha256=W_0_16mX4stwDUt4GM2L7dnGmTpAySab5k13-OlTCCc,3095
|
|
69
|
-
datacontract/imports/spark_importer.py,sha256=h2na1YtdJYu9Oz07tSvwx8L4RX6aLCCDVkAv-RTKyVA,5100
|
|
70
|
-
datacontract/imports/sql_importer.py,sha256=ElFS2LILDOvWzW-X4emSIKltFV42i78TEoyg0bvn3II,9322
|
|
71
|
-
datacontract/imports/unity_importer.py,sha256=UcPYABhLZaWNl5IkCazwAuMoVDdujsu_QteuV_Q9hgI,6737
|
|
72
|
-
datacontract/init/init_template.py,sha256=BMawR-AF_vXyn_-Co-XoT8Dxj9b55V8xKk2KkJK-c1o,721
|
|
73
|
-
datacontract/integration/datamesh_manager.py,sha256=6_mHRQAqw-KCfVtejNxULN4ihBZTZikf_5p0pYHer7g,2849
|
|
74
|
-
datacontract/lint/files.py,sha256=tg0vq_w4LQsEr_8A5qr4hUJmHeGalUpsXJXC1t-OGC0,471
|
|
75
|
-
datacontract/lint/lint.py,sha256=Ew0n3ooXxmCVnUxJ_cDoacsD82QdMZYnKrxnG9J0sWQ,5077
|
|
76
|
-
datacontract/lint/resolve.py,sha256=58Z48Bkkjl4QWLNA3sPvqjh46sh1KQGgUzo3cG1BQvI,11431
|
|
77
|
-
datacontract/lint/resources.py,sha256=nfeZmORh1aP7EKpMKCmfbS04Te8pQ0nz64vJVkHOq3c,647
|
|
78
|
-
datacontract/lint/schema.py,sha256=4pYX6JX6SkASftyqaWTodKFRVPi2qV0_Z60tvaCOk80,1813
|
|
79
|
-
datacontract/lint/urls.py,sha256=giac0eAYa6hha8exleL3KsiPtiFlOq8l53axtAmCilw,2529
|
|
80
|
-
datacontract/lint/linters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
81
|
-
datacontract/lint/linters/description_linter.py,sha256=7fla7FQwDa-1UrLFCFKFoeUzkR91e4o9W6ySKSW6_U8,1555
|
|
82
|
-
datacontract/lint/linters/field_pattern_linter.py,sha256=lreGvOW3v_Glah_SriVe9ejZ7EuR6_gJsdr2tEORB_8,1084
|
|
83
|
-
datacontract/lint/linters/field_reference_linter.py,sha256=65GnbBtazn55dXslujOho3YIHCwNy9DDp0m56pNMkUk,2021
|
|
84
|
-
datacontract/lint/linters/notice_period_linter.py,sha256=6r413aEVOVHWJHb33-68ecVTAUNzbxL4me6ebmPcgpE,2130
|
|
85
|
-
datacontract/lint/linters/quality_schema_linter.py,sha256=ZXFHlMLFV1GZejizbUdfW6-msffFECoDGNsdynaPnog,2182
|
|
86
|
-
datacontract/lint/linters/valid_constraints_linter.py,sha256=qTFh1X3I9wOtAxuXlvbGesCQ3GQ6iWc-MT_ttIybRsw,4916
|
|
87
|
-
datacontract/model/data_contract_specification.py,sha256=1bEE7hQJEjzoL4XtCQBmPe6VWclU_D_YiUJW2oNRNos,8655
|
|
88
|
-
datacontract/model/exceptions.py,sha256=5BMuEH2qWuckNP4FTfpUEeEu6rjgGcLOD0GQugKRQ1U,1242
|
|
89
|
-
datacontract/model/odcs.py,sha256=9PXwm72FASjNwteF1Jn591iP3-St0aq16Cpsk0PkEW8,389
|
|
90
|
-
datacontract/model/run.py,sha256=2HTISHW6gvu7NTke76hLw4wkH_kQAig9Z176OuttYSA,3004
|
|
91
|
-
datacontract/output/junit_test_results.py,sha256=hAT7UgxwbfNzA0f5uuGzM4OIwLfXbmA4dgsfxsclWh0,4822
|
|
92
|
-
datacontract/output/output_format.py,sha256=_ZokDBo7-HXBs6czUv7kLLf9cYft_q5QaKzthsVnc58,212
|
|
93
|
-
datacontract/output/test_results_writer.py,sha256=PWNLs3R_LQMH4xp5WDxLkQgY3xvj8Eyzw1jnfgkQxlc,2713
|
|
94
|
-
datacontract/schemas/datacontract-1.1.0.init.yaml,sha256=_WQX6NRwimXlPVKcKeHLd4mFL0TJ2vYH0WnyMXZeQ8Y,1828
|
|
95
|
-
datacontract/schemas/datacontract-1.1.0.schema.json,sha256=3Bu2rxEjkF6dNLcqi1GF4KoXBnEIopaJ87Qb8S4zUvg,62872
|
|
96
|
-
datacontract/schemas/odcs-3.0.1.schema.json,sha256=bRZsSXA0fV0EmV_8f1K68PlXu1m4K7JcuHpLnY3ESwQ,72933
|
|
97
|
-
datacontract/templates/datacontract.html,sha256=9rm5hLkST8EnOFwj0al9c0xPajzlyWlnfxT2iicSRCM,15179
|
|
98
|
-
datacontract/templates/index.html,sha256=nyi9nrEsSPuOrXszKzqkqwZGveXsdy1PLJp2g9oDw0A,12517
|
|
99
|
-
datacontract/templates/partials/datacontract_information.html,sha256=7ZBxgEgi2XndKBypeOpe03oCSRPOujC6NVlN7zexGNM,6221
|
|
100
|
-
datacontract/templates/partials/datacontract_servicelevels.html,sha256=ed3QgB11B0Qq2h_NwaroGZ4pQMBPEhfeQaoS-qEipqY,11401
|
|
101
|
-
datacontract/templates/partials/datacontract_terms.html,sha256=1cnJcOTpxwot2BCuZmkLF_SPfiVloLs3c8mj9WfE4sc,1865
|
|
102
|
-
datacontract/templates/partials/definition.html,sha256=gZEmNvwNGGxA_Fnzx_0L6tXlAMk_EAPWr5ziRIThb_o,1005
|
|
103
|
-
datacontract/templates/partials/example.html,sha256=F1dWbHDIXQScgfs4OVgqM1lR4uV4xX5j6suasXHNM88,1204
|
|
104
|
-
datacontract/templates/partials/model_field.html,sha256=2YBF95ypNCPFYuYKoeilRnDG-H_FuW4JK1znkCaYCac,7625
|
|
105
|
-
datacontract/templates/partials/quality.html,sha256=ynEDWRn8I90Uje-xhGYgFcfwOgKI1R-CDki-EvTsauQ,1785
|
|
106
|
-
datacontract/templates/partials/server.html,sha256=WkWFbz1ZvhIAUQQhH5Lkwb0HZRW907ehEnFmJSkpquQ,6235
|
|
107
|
-
datacontract/templates/style/output.css,sha256=V1k6smSvlz07W2UNOkhcDFUb0HLmoas7DnNg_o8XUcA,25759
|
|
108
|
-
datacontract_cli-0.10.23.dist-info/LICENSE,sha256=23h64qnSeIZ0DKeziWAKC-zBCt328iSbRbWBrXoYRb4,2210
|
|
109
|
-
datacontract_cli-0.10.23.dist-info/METADATA,sha256=ls0fDH5tDEJLo2F1qkl2I0_jZJJHr1U6quP_nEE2QVw,102825
|
|
110
|
-
datacontract_cli-0.10.23.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
111
|
-
datacontract_cli-0.10.23.dist-info/entry_points.txt,sha256=D3Eqy4q_Z6bHauGd4ppIyQglwbrm1AJnLau4Ppbw9Is,54
|
|
112
|
-
datacontract_cli-0.10.23.dist-info/top_level.txt,sha256=VIRjd8EIUrBYWjEXJJjtdUgc0UAJdPZjmLiOR8BRBYM,13
|
|
113
|
-
datacontract_cli-0.10.23.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|