datacontract-cli 0.10.13__py3-none-any.whl → 0.10.14__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.
Potentially problematic release.
This version of datacontract-cli might be problematic. Click here for more details.
- datacontract/cli.py +5 -0
- datacontract/data_contract.py +9 -1
- datacontract/engines/soda/connections/kafka.py +26 -5
- datacontract/export/avro_converter.py +8 -1
- datacontract/export/avro_idl_converter.py +1 -0
- datacontract/export/dcs_exporter.py +6 -0
- datacontract/export/exporter.py +4 -1
- datacontract/export/exporter_factory.py +13 -1
- datacontract/export/{odcs_converter.py → odcs_v2_exporter.py} +4 -4
- datacontract/export/odcs_v3_exporter.py +294 -0
- datacontract/export/sodacl_converter.py +82 -2
- datacontract/export/spark_converter.py +3 -1
- datacontract/export/sql_type_converter.py +55 -11
- datacontract/imports/iceberg_importer.py +162 -0
- datacontract/imports/importer.py +1 -0
- datacontract/imports/importer_factory.py +5 -0
- datacontract/imports/odcs_importer.py +25 -168
- datacontract/imports/odcs_v2_importer.py +177 -0
- datacontract/imports/odcs_v3_importer.py +309 -0
- datacontract/integration/datamesh_manager.py +1 -1
- datacontract/lint/resolve.py +14 -9
- datacontract/lint/resources.py +21 -0
- datacontract/lint/urls.py +4 -2
- datacontract/model/data_contract_specification.py +72 -8
- datacontract/model/odcs.py +11 -0
- {datacontract_cli-0.10.13.dist-info → datacontract_cli-0.10.14.dist-info}/METADATA +89 -51
- {datacontract_cli-0.10.13.dist-info → datacontract_cli-0.10.14.dist-info}/RECORD +31 -25
- {datacontract_cli-0.10.13.dist-info → datacontract_cli-0.10.14.dist-info}/WHEEL +1 -1
- datacontract/engines/datacontract/check_that_datacontract_str_is_valid.py +0 -48
- {datacontract_cli-0.10.13.dist-info → datacontract_cli-0.10.14.dist-info}/LICENSE +0 -0
- {datacontract_cli-0.10.13.dist-info → datacontract_cli-0.10.14.dist-info}/entry_points.txt +0 -0
- {datacontract_cli-0.10.13.dist-info → datacontract_cli-0.10.14.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: datacontract-cli
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.14
|
|
4
4
|
Summary: The datacontract CLI is an open source command-line tool for working with Data Contracts. It uses data contract YAML files to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
|
|
5
5
|
Author-email: Jochen Christ <jochen.christ@innoq.com>, Stefan Negele <stefan.negele@innoq.com>, Simon Harrer <simon.harrer@innoq.com>
|
|
6
6
|
Project-URL: Homepage, https://cli.datacontract.com
|
|
@@ -15,32 +15,32 @@ Requires-Dist: typer<0.13,>=0.12
|
|
|
15
15
|
Requires-Dist: pydantic<2.10.0,>=2.8.2
|
|
16
16
|
Requires-Dist: pyyaml~=6.0.1
|
|
17
17
|
Requires-Dist: requests<2.33,>=2.31
|
|
18
|
-
Requires-Dist: fastapi==0.
|
|
18
|
+
Requires-Dist: fastapi==0.115.2
|
|
19
19
|
Requires-Dist: uvicorn==0.30.6
|
|
20
20
|
Requires-Dist: fastjsonschema<2.21.0,>=2.19.1
|
|
21
21
|
Requires-Dist: fastparquet==2024.5.0
|
|
22
|
-
Requires-Dist: python-multipart==0.0.
|
|
23
|
-
Requires-Dist: rich<13.
|
|
24
|
-
Requires-Dist: simple-ddl-parser==1.
|
|
25
|
-
Requires-Dist: duckdb==1.
|
|
22
|
+
Requires-Dist: python-multipart==0.0.12
|
|
23
|
+
Requires-Dist: rich<13.10,>=13.7
|
|
24
|
+
Requires-Dist: simple-ddl-parser==1.7.1
|
|
25
|
+
Requires-Dist: duckdb==1.1.2
|
|
26
26
|
Requires-Dist: soda-core-duckdb<3.4.0,>=3.3.1
|
|
27
27
|
Requires-Dist: setuptools>=60
|
|
28
28
|
Requires-Dist: python-dotenv~=1.0.0
|
|
29
29
|
Requires-Dist: rdflib==7.0.0
|
|
30
30
|
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc~=1.16
|
|
31
31
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http~=1.16
|
|
32
|
-
Requires-Dist: boto3<1.35.
|
|
32
|
+
Requires-Dist: boto3<1.35.45,>=1.34.41
|
|
33
33
|
Requires-Dist: jinja-partials>=0.2.1
|
|
34
34
|
Provides-Extra: all
|
|
35
|
-
Requires-Dist: datacontract-cli[bigquery,databricks,dbml,dbt,kafka,postgres,s3,snowflake,sqlserver,trino]; extra == "all"
|
|
35
|
+
Requires-Dist: datacontract-cli[bigquery,databricks,dbml,dbt,iceberg,kafka,postgres,s3,snowflake,sqlserver,trino]; extra == "all"
|
|
36
36
|
Provides-Extra: avro
|
|
37
37
|
Requires-Dist: avro==1.12.0; extra == "avro"
|
|
38
38
|
Provides-Extra: bigquery
|
|
39
39
|
Requires-Dist: soda-core-bigquery<3.4.0,>=3.3.1; extra == "bigquery"
|
|
40
40
|
Provides-Extra: databricks
|
|
41
41
|
Requires-Dist: soda-core-spark-df<3.4.0,>=3.3.1; extra == "databricks"
|
|
42
|
-
Requires-Dist: databricks-sql-connector<3.
|
|
43
|
-
Requires-Dist: databricks-sdk<0.
|
|
42
|
+
Requires-Dist: databricks-sql-connector<3.6.0,>=3.1.2; extra == "databricks"
|
|
43
|
+
Requires-Dist: databricks-sdk<0.36.0,>=0.32.0; extra == "databricks"
|
|
44
44
|
Requires-Dist: soda-core-spark[databricks]<3.4.0,>=3.3.1; extra == "databricks"
|
|
45
45
|
Provides-Extra: dbml
|
|
46
46
|
Requires-Dist: pydbml>=1.1.1; extra == "dbml"
|
|
@@ -50,7 +50,7 @@ Provides-Extra: dev
|
|
|
50
50
|
Requires-Dist: datacontract-cli[all]; extra == "dev"
|
|
51
51
|
Requires-Dist: httpx==0.27.2; extra == "dev"
|
|
52
52
|
Requires-Dist: kafka-python; extra == "dev"
|
|
53
|
-
Requires-Dist: moto==5.0.
|
|
53
|
+
Requires-Dist: moto==5.0.18; extra == "dev"
|
|
54
54
|
Requires-Dist: pandas>=2.1.0; extra == "dev"
|
|
55
55
|
Requires-Dist: pre-commit<3.9.0,>=3.7.1; extra == "dev"
|
|
56
56
|
Requires-Dist: pyarrow>=12.0.0; extra == "dev"
|
|
@@ -58,8 +58,10 @@ Requires-Dist: pytest; extra == "dev"
|
|
|
58
58
|
Requires-Dist: pytest-xdist; extra == "dev"
|
|
59
59
|
Requires-Dist: pymssql==2.3.1; extra == "dev"
|
|
60
60
|
Requires-Dist: ruff; extra == "dev"
|
|
61
|
-
Requires-Dist: testcontainers[kafka,minio,mssql,postgres]==4.8.
|
|
62
|
-
Requires-Dist: trino==0.
|
|
61
|
+
Requires-Dist: testcontainers[kafka,minio,mssql,postgres]==4.8.2; extra == "dev"
|
|
62
|
+
Requires-Dist: trino==0.330.0; extra == "dev"
|
|
63
|
+
Provides-Extra: iceberg
|
|
64
|
+
Requires-Dist: pyiceberg==0.7.1; extra == "iceberg"
|
|
63
65
|
Provides-Extra: kafka
|
|
64
66
|
Requires-Dist: datacontract-cli[avro]; extra == "kafka"
|
|
65
67
|
Requires-Dist: soda-core-spark-df<3.4.0,>=3.3.1; extra == "kafka"
|
|
@@ -85,8 +87,8 @@ Requires-Dist: soda-core-trino<3.4.0,>=3.3.1; extra == "trino"
|
|
|
85
87
|
<a href="https://datacontract.com/slack" rel="nofollow"><img src="https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social" alt="Slack Status" data-canonical-src="https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social" style="max-width: 100%;"></a>
|
|
86
88
|
</p>
|
|
87
89
|
|
|
88
|
-
The `datacontract` CLI is an open
|
|
89
|
-
It uses data contract YAML files to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
|
|
90
|
+
The `datacontract` CLI is an open-source command-line tool for working with data contracts.
|
|
91
|
+
It uses data contract YAML files as [Data Contract Specification](https://datacontract.com/) or [ODCS](https://bitol-io.github.io/open-data-contract-standard/latest/) to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
|
|
90
92
|
|
|
91
93
|

|
|
92
94
|
|
|
@@ -98,15 +100,15 @@ Let's look at this data contract:
|
|
|
98
100
|
|
|
99
101
|
We have a _servers_ section with endpoint details to the S3 bucket, _models_ for the structure of the data, _servicelevels_ and _quality_ attributes that describe the expected freshness and number of rows.
|
|
100
102
|
|
|
101
|
-
This data contract contains all information to connect to S3 and check that the actual data meets the defined schema and quality requirements. We can use this information to test if the actual data
|
|
103
|
+
This data contract contains all information to connect to S3 and check that the actual data meets the defined schema and quality requirements. We can use this information to test if the actual data product in S3 is compliant to the data contract.
|
|
102
104
|
|
|
103
|
-
Let's use [pip](https://pip.pypa.io/en/stable/getting-started/) to install the CLI (or use the [Docker image](#docker),
|
|
105
|
+
Let's use [pip](https://pip.pypa.io/en/stable/getting-started/) to install the CLI (or use the [Docker image](#docker)),
|
|
104
106
|
```bash
|
|
105
107
|
$ python3 -m pip install datacontract-cli[all]
|
|
106
108
|
```
|
|
107
109
|
|
|
108
110
|
|
|
109
|
-
|
|
111
|
+
now, let's run the tests:
|
|
110
112
|
|
|
111
113
|
```bash
|
|
112
114
|
$ datacontract test https://datacontract.com/examples/orders-latest/datacontract.yaml
|
|
@@ -144,7 +146,7 @@ Testing https://datacontract.com/examples/orders-latest/datacontract.yaml
|
|
|
144
146
|
|
|
145
147
|
Voilà, the CLI tested that the _datacontract.yaml_ itself is valid, all records comply with the schema, and all quality attributes are met.
|
|
146
148
|
|
|
147
|
-
We can also use the datacontract.yaml to export in many [formats](#format), e.g., to SQL:
|
|
149
|
+
We can also use the datacontract.yaml to export in many [formats](#format), e.g., to generate a SQL DDL:
|
|
148
150
|
|
|
149
151
|
```bash
|
|
150
152
|
$ datacontract export --format sql https://datacontract.com/examples/orders-latest/datacontract.yaml
|
|
@@ -191,7 +193,7 @@ $ datacontract test datacontract.yaml
|
|
|
191
193
|
# execute schema and quality checks on the examples within the contract
|
|
192
194
|
$ datacontract test --examples datacontract.yaml
|
|
193
195
|
|
|
194
|
-
# export data contract as html (other formats: avro, dbt, dbt-sources, dbt-staging-sql, jsonschema,
|
|
196
|
+
# export data contract as html (other formats: avro, dbt, dbt-sources, dbt-staging-sql, jsonschema, odcs_v2, odcs_v3, rdf, sql, sodacl, terraform, ...)
|
|
195
197
|
$ datacontract export --format html datacontract.yaml > datacontract.html
|
|
196
198
|
|
|
197
199
|
# import avro (other formats: sql, glue, bigquery...)
|
|
@@ -224,8 +226,7 @@ if not run.has_passed():
|
|
|
224
226
|
Choose the most appropriate installation method for your needs:
|
|
225
227
|
|
|
226
228
|
### pip
|
|
227
|
-
Python 3.11
|
|
228
|
-
Python 3.12 available as pre-release release candidate for 0.9.3
|
|
229
|
+
Python 3.10, 3.11, and 3.12 are supported. We recommend to use Python 3.11.
|
|
229
230
|
|
|
230
231
|
```bash
|
|
231
232
|
python3 -m pip install datacontract-cli[all]
|
|
@@ -239,17 +240,22 @@ pipx install datacontract-cli[all]
|
|
|
239
240
|
|
|
240
241
|
### Docker
|
|
241
242
|
|
|
243
|
+
You can also use our Docker image to run the CLI tool. It is also convenient for CI/CD pipelines.
|
|
244
|
+
|
|
242
245
|
```bash
|
|
243
246
|
docker pull datacontract/cli
|
|
244
247
|
docker run --rm -v ${PWD}:/home/datacontract datacontract/cli
|
|
245
248
|
```
|
|
246
249
|
|
|
247
|
-
|
|
250
|
+
You can create an alias for the Docker command to make it easier to use:
|
|
248
251
|
|
|
249
252
|
```bash
|
|
250
253
|
alias datacontract='docker run --rm -v "${PWD}:/home/datacontract" datacontract/cli:latest'
|
|
251
254
|
```
|
|
252
255
|
|
|
256
|
+
_Note:_ The output of Docker command line messages is limited to 80 columns and may include line breaks. Don't pipe docker output to files if you want to export code. Use the `--output` option instead.
|
|
257
|
+
|
|
258
|
+
|
|
253
259
|
|
|
254
260
|
## Optional Dependencies
|
|
255
261
|
|
|
@@ -742,10 +748,11 @@ servers:
|
|
|
742
748
|
|
|
743
749
|
#### Environment Variables
|
|
744
750
|
|
|
745
|
-
| Environment Variable
|
|
746
|
-
|
|
747
|
-
| `DATACONTRACT_KAFKA_SASL_USERNAME`
|
|
748
|
-
| `DATACONTRACT_KAFKA_SASL_PASSWORD`
|
|
751
|
+
| Environment Variable | Example | Description |
|
|
752
|
+
|-------------------------------------|---------|----------------------------------------------------------------------------------|
|
|
753
|
+
| `DATACONTRACT_KAFKA_SASL_USERNAME` | `xxx` | The SASL username (key). |
|
|
754
|
+
| `DATACONTRACT_KAFKA_SASL_PASSWORD` | `xxx` | The SASL password (secret). |
|
|
755
|
+
| `DATACONTRACT_KAFKA_SASL_MECHANISM` | `PLAIN` | Default `PLAIN`. Other supported mechanisms: `SCRAM-SHA-256` and `SCRAM-SHA-512` |
|
|
749
756
|
|
|
750
757
|
|
|
751
758
|
### Postgres
|
|
@@ -800,6 +807,10 @@ models:
|
|
|
800
807
|
fields:
|
|
801
808
|
my_column_1: # corresponds to a column
|
|
802
809
|
type: varchar
|
|
810
|
+
my_column_2: # corresponds to a column with custom trino type
|
|
811
|
+
type: object
|
|
812
|
+
config:
|
|
813
|
+
trinoType: row(en_us varchar, pt_br varchar)
|
|
803
814
|
```
|
|
804
815
|
|
|
805
816
|
#### Environment Variables
|
|
@@ -826,7 +837,7 @@ models:
|
|
|
826
837
|
│ * --format [jsonschema|pydantic-model|sodacl|dbt|dbt-sources|db The export format. [default: None] [required] │
|
|
827
838
|
│ t-staging-sql|odcs|rdf|avro|protobuf|great-expectati │
|
|
828
839
|
│ ons|terraform|avro-idl|sql|sql-query|html|go|bigquer │
|
|
829
|
-
│ y|dbml|spark|sqlalchemy|data-caterer] │
|
|
840
|
+
│ y|dbml|spark|sqlalchemy|data-caterer|dcs] │
|
|
830
841
|
│ --output PATH Specify the file path where the exported data will be │
|
|
831
842
|
│ saved. If no path is provided, the output will be │
|
|
832
843
|
│ printed to stdout. │
|
|
@@ -858,27 +869,30 @@ Available export options:
|
|
|
858
869
|
|
|
859
870
|
| Type | Description | Status |
|
|
860
871
|
|----------------------|---------------------------------------------------------|--------|
|
|
861
|
-
| `html` | Export to HTML | ✅
|
|
862
|
-
| `jsonschema` | Export to JSON Schema | ✅
|
|
863
|
-
| `
|
|
864
|
-
| `
|
|
865
|
-
| `
|
|
866
|
-
| `
|
|
867
|
-
| `dbt
|
|
868
|
-
| `
|
|
869
|
-
| `
|
|
870
|
-
| `
|
|
871
|
-
| `
|
|
872
|
-
| `
|
|
873
|
-
| `
|
|
874
|
-
| `
|
|
875
|
-
| `
|
|
876
|
-
| `
|
|
877
|
-
| `
|
|
878
|
-
| `
|
|
879
|
-
| `
|
|
880
|
-
| `
|
|
881
|
-
| `
|
|
872
|
+
| `html` | Export to HTML | ✅ |
|
|
873
|
+
| `jsonschema` | Export to JSON Schema | ✅ |
|
|
874
|
+
| `odcs_v2` | Export to Open Data Contract Standard (ODCS) V2 | ✅ |
|
|
875
|
+
| `odcs_v3` | Export to Open Data Contract Standard (ODCS) V3 | ✅ |
|
|
876
|
+
| `odcs` | Export to Open Data Contract Standard (ODCS) V3 | ✅ |
|
|
877
|
+
| `sodacl` | Export to SodaCL quality checks in YAML format | ✅ |
|
|
878
|
+
| `dbt` | Export to dbt models in YAML format | ✅ |
|
|
879
|
+
| `dbt-sources` | Export to dbt sources in YAML format | ✅ |
|
|
880
|
+
| `dbt-staging-sql` | Export to dbt staging SQL models | ✅ |
|
|
881
|
+
| `rdf` | Export data contract to RDF representation in N3 format | ✅ |
|
|
882
|
+
| `avro` | Export to AVRO models | ✅ |
|
|
883
|
+
| `protobuf` | Export to Protobuf | ✅ |
|
|
884
|
+
| `terraform` | Export to terraform resources | ✅ |
|
|
885
|
+
| `sql` | Export to SQL DDL | ✅ |
|
|
886
|
+
| `sql-query` | Export to SQL Query | ✅ |
|
|
887
|
+
| `great-expectations` | Export to Great Expectations Suites in JSON Format | ✅ |
|
|
888
|
+
| `bigquery` | Export to BigQuery Schemas | ✅ |
|
|
889
|
+
| `go` | Export to Go types | ✅ |
|
|
890
|
+
| `pydantic-model` | Export to pydantic models | ✅ |
|
|
891
|
+
| `DBML` | Export to a DBML Diagram description | ✅ |
|
|
892
|
+
| `spark` | Export to a Spark StructType | ✅ |
|
|
893
|
+
| `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
|
|
894
|
+
| `data-caterer` | Export to Data Caterer in YAML format | ✅ |
|
|
895
|
+
| `dcs` | Export to Data Contract Specification in YAML format | ✅ |
|
|
882
896
|
| Missing something? | Please create an issue on GitHub | TBD |
|
|
883
897
|
|
|
884
898
|
#### Great Expectations
|
|
@@ -996,7 +1010,7 @@ models:
|
|
|
996
1010
|
|
|
997
1011
|
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
998
1012
|
│ * --format [sql|avro|dbt|glue|jsonschema|bigquery|odcs The format of the source file. │
|
|
999
|
-
│ |unity|spark]
|
|
1013
|
+
│ |unity|spark|iceberg] [default: None] │
|
|
1000
1014
|
│ [required] │
|
|
1001
1015
|
│ --source TEXT The path to the file or Glue Database that │
|
|
1002
1016
|
│ should be imported. │
|
|
@@ -1026,6 +1040,8 @@ models:
|
|
|
1026
1040
|
│ file (repeat for multiple table names, leave │
|
|
1027
1041
|
│ empty for all tables in the file). │
|
|
1028
1042
|
│ [default: None] │
|
|
1043
|
+
│ --iceberg-table TEXT Table name to assign to the model created │
|
|
1044
|
+
│ from the Iceberg schema. [default: None] │
|
|
1029
1045
|
│ --help Show this message and exit. │
|
|
1030
1046
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
1031
1047
|
```
|
|
@@ -1051,12 +1067,25 @@ Available import options:
|
|
|
1051
1067
|
| `spark` | Import from Spark StructTypes | ✅ |
|
|
1052
1068
|
| `dbml` | Import from DBML models | ✅ |
|
|
1053
1069
|
| `protobuf` | Import from Protobuf schemas | TBD |
|
|
1070
|
+
| `iceberg` | Import from an Iceberg JSON Schema Definition | partial |
|
|
1054
1071
|
| Missing something? | Please create an issue on GitHub | TBD |
|
|
1055
1072
|
|
|
1056
1073
|
|
|
1074
|
+
#### ODCS
|
|
1075
|
+
|
|
1076
|
+
Import from Open Data Contract Standard (ODCS) v2 or v3.
|
|
1077
|
+
The importer automatically detects the ODCS version and imports the data contract.
|
|
1078
|
+
|
|
1079
|
+
Examples:
|
|
1080
|
+
|
|
1081
|
+
```bash
|
|
1082
|
+
# Example import from ODCS
|
|
1083
|
+
datacontract import --format odcs --source my_data_contract.odcs.yaml
|
|
1084
|
+
```
|
|
1085
|
+
|
|
1057
1086
|
#### BigQuery
|
|
1058
1087
|
|
|
1059
|
-
|
|
1088
|
+
BigQuery data can either be imported off of JSON Files generated from the table descriptions or directly from the Bigquery API. In case you want to use JSON Files, specify the `source` parameter with a path to the JSON File.
|
|
1060
1089
|
|
|
1061
1090
|
To import from the Bigquery API, you have to _omit_ `source` and instead need to provide `bigquery-project` and `bigquery-dataset`. Additionally you may specify `bigquery-table` to enumerate the tables that should be imported. If no tables are given, _all_ available tables of the dataset will be imported.
|
|
1062
1091
|
|
|
@@ -1168,6 +1197,15 @@ datacontract import --format dbml --source <file_path> --dbml-table <table_name_
|
|
|
1168
1197
|
datacontract import --format dbml --source <file_path> --dbml-table <table_name_1> --dbml-schema <schema_1>
|
|
1169
1198
|
```
|
|
1170
1199
|
|
|
1200
|
+
#### Iceberg
|
|
1201
|
+
|
|
1202
|
+
Importing from an [Iceberg Table Json Schema Definition](https://iceberg.apache.org/spec/#appendix-c-json-serialization). Specify location of json files using the `source` parameter.
|
|
1203
|
+
|
|
1204
|
+
Examples:
|
|
1205
|
+
|
|
1206
|
+
```bash
|
|
1207
|
+
datacontract import --format iceberg --source ./tests/fixtures/iceberg/simple_schema.json --iceberg-table test-table
|
|
1208
|
+
```
|
|
1171
1209
|
|
|
1172
1210
|
### breaking
|
|
1173
1211
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
datacontract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
datacontract/cli.py,sha256=
|
|
3
|
-
datacontract/data_contract.py,sha256=
|
|
2
|
+
datacontract/cli.py,sha256=1ISEaBHIHnlh-srGepldy20zHlnEH0qbhDRoqezAr6o,15132
|
|
3
|
+
datacontract/data_contract.py,sha256=JJ3WxNOb8cymkq3svSO0RcnnMZLigh7AGGMBDUVAJ_U,14057
|
|
4
4
|
datacontract/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
datacontract/web.py,sha256=Ov50NJVbQiaxjHXnVOvRw9moMkKHHcxFhdzwbA13QOw,2134
|
|
6
6
|
datacontract/breaking/breaking.py,sha256=l0ZwUX8G4QK_0nLRLJHArpwgTWTD7WQYMuAp3l_y1bY,12184
|
|
@@ -9,7 +9,6 @@ datacontract/catalog/catalog.py,sha256=reT2NDKGbjnid8itlBVL5gH9lJI_Z2V3NJa8AR7uG
|
|
|
9
9
|
datacontract/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py,sha256=TXO47ON3NjwYI4Y2eBYklMOCo7vAtYzqLPAhZhii6dg,1565
|
|
11
11
|
datacontract/engines/datacontract/check_that_datacontract_file_exists.py,sha256=XHvxX6BrTdZk2wN55zd6ER4k7ILDyGzjbCbZxQAJ2iE,665
|
|
12
|
-
datacontract/engines/datacontract/check_that_datacontract_str_is_valid.py,sha256=CsxFGyInjpsylmoofByV1b-wpFhG1jtRWxSUpp-BXk8,1525
|
|
13
12
|
datacontract/engines/fastjsonschema/check_jsonschema.py,sha256=tI5mfdxilAn-zmq02s8t6pNww9-uJYTOjooO0HimwQo,6321
|
|
14
13
|
datacontract/engines/fastjsonschema/s3/s3_read_files.py,sha256=vuz_hLF2VD8LR_prjQpPLBU8Is-iHLAvqp4KwclOv9I,1157
|
|
15
14
|
datacontract/engines/soda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -18,33 +17,35 @@ datacontract/engines/soda/connections/bigquery.py,sha256=C-8kxmzpYe88bJp80ObHFLM
|
|
|
18
17
|
datacontract/engines/soda/connections/dask.py,sha256=Yy6Et2n_vDVsdjtqyBWDSZt7mnjPzPk_MZ-92VZHfnY,1496
|
|
19
18
|
datacontract/engines/soda/connections/databricks.py,sha256=lpMju-o_TzLZeF0EEVwePPr8JahqvFnj5xRYjF15fc8,561
|
|
20
19
|
datacontract/engines/soda/connections/duckdb.py,sha256=OVaxDO9HwfD4M6FYDIDS4zwnUJ20uAM1jz_Fy3EkClo,6271
|
|
21
|
-
datacontract/engines/soda/connections/kafka.py,sha256=
|
|
20
|
+
datacontract/engines/soda/connections/kafka.py,sha256=eyn4ExpnaqnKKFnl8-B2J66MqyvOGWlLyECHDBbJ6_s,8452
|
|
22
21
|
datacontract/engines/soda/connections/postgres.py,sha256=9GTF4Es3M5vb7ocSGqAxXmslvkS5CjsPQGIuo020CFc,626
|
|
23
22
|
datacontract/engines/soda/connections/snowflake.py,sha256=rfG2ysuqNM6TkvyqQKcGHFsTGJ6AROmud5VleUDRrb0,749
|
|
24
23
|
datacontract/engines/soda/connections/sqlserver.py,sha256=RzGLbCUdRyfmDcqtM_AB9WZ-Xk-XYX91nkXpVNpYbvc,1440
|
|
25
24
|
datacontract/engines/soda/connections/trino.py,sha256=JvKUP9aFg_n095oWE0-bGmfbETSWEOURGEZdQuG8txA,718
|
|
26
25
|
datacontract/export/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
-
datacontract/export/avro_converter.py,sha256=
|
|
28
|
-
datacontract/export/avro_idl_converter.py,sha256
|
|
26
|
+
datacontract/export/avro_converter.py,sha256=xNRo0eXR3n--EA8SziarWqhlvOYtQWkWJtEiVK5QKXI,4451
|
|
27
|
+
datacontract/export/avro_idl_converter.py,sha256=pjxcOR3jE6-3qdKZ1AJPBsonwa6Y9HBExgeqBDiLFMk,9879
|
|
29
28
|
datacontract/export/bigquery_converter.py,sha256=gVo6PMoUalc3UuuMtw4CGgvm43ineHNtdu-F1OHKOwA,4639
|
|
30
29
|
datacontract/export/csv_type_converter.py,sha256=ZZuJwBgQnafZC7PPvAXsBf2IajPJq8TYZ1l8Qq0GYeI,1290
|
|
31
30
|
datacontract/export/data_caterer_converter.py,sha256=FaY6GkuR1SPjLbz6FgraEItOVVrYpv0Q5uyHI5fF44Y,5324
|
|
32
31
|
datacontract/export/dbml_converter.py,sha256=Lmg0so_YP652UvDiNYyhAzzxtYvaHQBWFMUHzWadSDA,4739
|
|
33
32
|
datacontract/export/dbt_converter.py,sha256=QfapVeunwab7bWn_B9-J_1U8fm1wdsPBW_Ws2b99o1E,9390
|
|
34
|
-
datacontract/export/
|
|
35
|
-
datacontract/export/
|
|
33
|
+
datacontract/export/dcs_exporter.py,sha256=RALQ7bLAjak7EsoFFL2GFX2Oju7pnCDPCdRN_wo9wHM,210
|
|
34
|
+
datacontract/export/exporter.py,sha256=SM0SKcmmGI855ilpAcRZiFu7MGsl8oVxcfwFEuae21U,2979
|
|
35
|
+
datacontract/export/exporter_factory.py,sha256=QWtBWuM37tIgfwYckV6bQGoUcOGXt6Fb6ekgwkgpsHU,5569
|
|
36
36
|
datacontract/export/go_converter.py,sha256=oWkEjOXBIGN8emTaxeJD8xpB3VYP4sVaNzKX-Oeqgw0,3330
|
|
37
37
|
datacontract/export/great_expectations_converter.py,sha256=LIuWHn3h7xRrDDs1YoibHOI8NVF2Izh5IZOQFLeWN7k,5302
|
|
38
38
|
datacontract/export/html_export.py,sha256=i7jckL80osA8incF0YoJdq3NaYmV1_3OU0cZBfPdNDs,2578
|
|
39
39
|
datacontract/export/jsonschema_converter.py,sha256=O3pCtqiQ41m0M-ohmmq3eMgIioD3DRhnWGAsEsIKbKQ,5557
|
|
40
|
-
datacontract/export/
|
|
40
|
+
datacontract/export/odcs_v2_exporter.py,sha256=p3q34K2whAhY9OagQgsnlrjkCRMuoY0NbA4OKVoHqUM,4679
|
|
41
|
+
datacontract/export/odcs_v3_exporter.py,sha256=LF9OQHTNhvldCV3ey1Tb23ffgO9E-CbKrqi4B6x7KOE,12093
|
|
41
42
|
datacontract/export/protobuf_converter.py,sha256=Baqq2uvRg0AHFo6gR-hEYdLyiYRWziC1Q4AujlHgCzo,3192
|
|
42
43
|
datacontract/export/pydantic_converter.py,sha256=1Lt9F8i6zyQYb44MyQtsXwCWWXYxZ47SmzArr_uPqsU,5579
|
|
43
44
|
datacontract/export/rdf_converter.py,sha256=nNYVKJ5bQEq-rRz3yHwpvbsNbvjoOMwkCfkev8Y11H0,6436
|
|
44
|
-
datacontract/export/sodacl_converter.py,sha256=
|
|
45
|
-
datacontract/export/spark_converter.py,sha256=
|
|
45
|
+
datacontract/export/sodacl_converter.py,sha256=znUL40uT6pwyp7OylJv9Kf59xttwYTaQiq2iJJ5Zbn8,10382
|
|
46
|
+
datacontract/export/spark_converter.py,sha256=CglVBsR4_iYFiTBmNPrB0GMCf35nuRBgXfDWAKYWE9I,7159
|
|
46
47
|
datacontract/export/sql_converter.py,sha256=grDTj3MGhVc5BbJbZ__LFawJtrsnv4ApmOMX4ohPnCQ,4802
|
|
47
|
-
datacontract/export/sql_type_converter.py,sha256=
|
|
48
|
+
datacontract/export/sql_type_converter.py,sha256=MGTH1hXC90TLMEap1v_Fkahf4N6Ju8yf01pCT7wJrpg,11984
|
|
48
49
|
datacontract/export/sqlalchemy_converter.py,sha256=x2_MVvDMfqgf_c5yfWimSC0um718EYYUpFiCe1-HN4g,6469
|
|
49
50
|
datacontract/export/terraform_converter.py,sha256=IFwn-6BWPVkfwDQbj_Gl0GwbJdMKiwKgXCXz5A64cEs,2163
|
|
50
51
|
datacontract/imports/avro_importer.py,sha256=HkzaMCa9A20D3Z0O_7I67TRcqyNV9XGYX_0JAF51qF8,9937
|
|
@@ -52,21 +53,25 @@ datacontract/imports/bigquery_importer.py,sha256=zQU-eMOcY3ZRDXwyA4RYMorLKrSK0kg
|
|
|
52
53
|
datacontract/imports/dbml_importer.py,sha256=iWX8EmCRqGfVCtpI2oojVCQQA7oTahtsMUUm_3gPRcE,3869
|
|
53
54
|
datacontract/imports/dbt_importer.py,sha256=f96-eGbdkDMh8B6iKhWy4qfAskE-b4dpWYHfenjTX8Y,3236
|
|
54
55
|
datacontract/imports/glue_importer.py,sha256=QuMvuga4rfiYm59AopFrscGPaiJkgrjtbu0-09_uF_A,8368
|
|
55
|
-
datacontract/imports/
|
|
56
|
-
datacontract/imports/
|
|
56
|
+
datacontract/imports/iceberg_importer.py,sha256=N_nZHCkvsR-1g77pGEk9AYpkmqH2nOaCYuNTgdGhht0,5397
|
|
57
|
+
datacontract/imports/importer.py,sha256=J_77jlP37ZRT9aVUGcOtnuxTyPZZu3GT2X0ZlEw3a6U,836
|
|
58
|
+
datacontract/imports/importer_factory.py,sha256=oqcwc8BruCplO9KMcNAW6LL7NcjRrtLuW3R0hJ10-6c,3320
|
|
57
59
|
datacontract/imports/jsonschema_importer.py,sha256=cY70b2bFx9Kfsnq5vNj0iy_GvNOIcBH8xeFjrsxv4bQ,4925
|
|
58
|
-
datacontract/imports/odcs_importer.py,sha256=
|
|
60
|
+
datacontract/imports/odcs_importer.py,sha256=w1TumifVSDgSwsxWV2VmbdzHkb_3vNBKt6mEVE-P284,2042
|
|
61
|
+
datacontract/imports/odcs_v2_importer.py,sha256=QUqInUIEy4GW_ybVQFMX818JWdEZ3aeEkTRwONLvpLc,7151
|
|
62
|
+
datacontract/imports/odcs_v3_importer.py,sha256=pzI2M0xCAjoOjymlvzo3-i8dk-8hwT9KkH6Ge_ScDog,12814
|
|
59
63
|
datacontract/imports/spark_importer.py,sha256=ZKjfZ-lqTRO_bU-QSvAeaXf8PWuR7FJZocUOWt8g0Qg,5099
|
|
60
64
|
datacontract/imports/sql_importer.py,sha256=CiOzSthTwyjCHxYQNVO7j4udchEFER8gtXrr_IyX2dU,2890
|
|
61
65
|
datacontract/imports/unity_importer.py,sha256=a13eBZBYwIzaaeKE4wDWVEPGq5aCM4iZxmBxxpZe3MU,6737
|
|
62
66
|
datacontract/init/download_datacontract_file.py,sha256=pj_4mhWKlEtfueWohDgkb1nyuG5ERDipUDszxKwpZUs,413
|
|
63
|
-
datacontract/integration/datamesh_manager.py,sha256=
|
|
67
|
+
datacontract/integration/datamesh_manager.py,sha256=RWIrOKXtyeiDSTRthsLOXV1PxTEXFFasYp1F2ZCw77s,2749
|
|
64
68
|
datacontract/integration/opentelemetry.py,sha256=0XsqOsc06qNtXC5KqZCxyeC_IGlIi63lYWHh3KKlOO0,3828
|
|
65
69
|
datacontract/lint/files.py,sha256=tg0vq_w4LQsEr_8A5qr4hUJmHeGalUpsXJXC1t-OGC0,471
|
|
66
70
|
datacontract/lint/lint.py,sha256=GhgBwfDgihXfWIu1WUfYeJoxfYacVJrwq3L2KO4Z2Io,5076
|
|
67
|
-
datacontract/lint/resolve.py,sha256
|
|
71
|
+
datacontract/lint/resolve.py,sha256=-4FlYx5eDP4kTlefKYSll_InbvFQC8iYLlMLHxYJtZw,9607
|
|
72
|
+
datacontract/lint/resources.py,sha256=nfeZmORh1aP7EKpMKCmfbS04Te8pQ0nz64vJVkHOq3c,647
|
|
68
73
|
datacontract/lint/schema.py,sha256=php99jF3puwCWrE02JD1ownC5UFEKCZsLH89UGOxMww,1469
|
|
69
|
-
datacontract/lint/urls.py,sha256=
|
|
74
|
+
datacontract/lint/urls.py,sha256=W7Edcd8Iw4NjokVtuSshEfzsXshQpuh_tpO73aM9dsM,2294
|
|
70
75
|
datacontract/lint/linters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
71
76
|
datacontract/lint/linters/description_linter.py,sha256=Cm99NTWo75kDRIW63qz5uEa8xsug_8dFURPRC1twodw,1554
|
|
72
77
|
datacontract/lint/linters/example_model_linter.py,sha256=EljSvzI4RSswdZrGa840bX6Zjat2GI16o5yDmKJfDOg,3972
|
|
@@ -76,8 +81,9 @@ datacontract/lint/linters/notice_period_linter.py,sha256=oHSOLU2uXd7BDvfEd_VjeXS
|
|
|
76
81
|
datacontract/lint/linters/quality_schema_linter.py,sha256=-zaI49okETJYo-qR-J6rQqMRI9QX17UK9ASf1GxgYnk,2181
|
|
77
82
|
datacontract/lint/linters/valid_constraints_linter.py,sha256=GeeE2hojMt24EoHuSHE1lURA2v2p5Dmxc7Qq8IvZQH0,4915
|
|
78
83
|
datacontract/model/breaking_change.py,sha256=BIDEUo1U2CQLVT2-I5PyFttxAj6zQPI1UUkEoOOQXMY,2249
|
|
79
|
-
datacontract/model/data_contract_specification.py,sha256=
|
|
84
|
+
datacontract/model/data_contract_specification.py,sha256=VTzwjcy7qEh6tpAxy0ONqDKvmY3w13z73-4Hg1Skx5U,7417
|
|
80
85
|
datacontract/model/exceptions.py,sha256=zW9NoyzwsND-c9UqgyTVuezUVGEc6KK1Uc2zl12loyo,1178
|
|
86
|
+
datacontract/model/odcs.py,sha256=9PXwm72FASjNwteF1Jn591iP3-St0aq16Cpsk0PkEW8,389
|
|
81
87
|
datacontract/model/run.py,sha256=v7QNsPwYS1otQrpjeOaFsLRnxO8OgbdK_d-Z_e3iy0s,2610
|
|
82
88
|
datacontract/templates/datacontract.html,sha256=w9xGnjYFtFmmsU90_I1NHVLNcuS22flPw51oIAn56WY,13442
|
|
83
89
|
datacontract/templates/index.html,sha256=dggq8ng61xZEeu6-6tbTQqjNcRFT0JTkn7y75087U58,12503
|
|
@@ -89,9 +95,9 @@ datacontract/templates/partials/example.html,sha256=F1dWbHDIXQScgfs4OVgqM1lR4uV4
|
|
|
89
95
|
datacontract/templates/partials/model_field.html,sha256=kh_ZIqJuayyxN-zDNIUPIoXOZeehGxXQxiImYB6G5qY,6946
|
|
90
96
|
datacontract/templates/partials/server.html,sha256=WkWFbz1ZvhIAUQQhH5Lkwb0HZRW907ehEnFmJSkpquQ,6235
|
|
91
97
|
datacontract/templates/style/output.css,sha256=F3oEhUpuv8kA_dWr4pJymBS_Ju6huIIZdLMkJzPzMmU,25647
|
|
92
|
-
datacontract_cli-0.10.
|
|
93
|
-
datacontract_cli-0.10.
|
|
94
|
-
datacontract_cli-0.10.
|
|
95
|
-
datacontract_cli-0.10.
|
|
96
|
-
datacontract_cli-0.10.
|
|
97
|
-
datacontract_cli-0.10.
|
|
98
|
+
datacontract_cli-0.10.14.dist-info/LICENSE,sha256=23h64qnSeIZ0DKeziWAKC-zBCt328iSbRbWBrXoYRb4,2210
|
|
99
|
+
datacontract_cli-0.10.14.dist-info/METADATA,sha256=oL-1jeHoWVq24tKRTLBw5wAmu_A1DC_HxibjP4BMLo8,91309
|
|
100
|
+
datacontract_cli-0.10.14.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
101
|
+
datacontract_cli-0.10.14.dist-info/entry_points.txt,sha256=D3Eqy4q_Z6bHauGd4ppIyQglwbrm1AJnLau4Ppbw9Is,54
|
|
102
|
+
datacontract_cli-0.10.14.dist-info/top_level.txt,sha256=VIRjd8EIUrBYWjEXJJjtdUgc0UAJdPZjmLiOR8BRBYM,13
|
|
103
|
+
datacontract_cli-0.10.14.dist-info/RECORD,,
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
|
|
3
|
-
import fastjsonschema
|
|
4
|
-
import yaml
|
|
5
|
-
from fastjsonschema import JsonSchemaValueException
|
|
6
|
-
|
|
7
|
-
from datacontract.lint.schema import fetch_schema
|
|
8
|
-
from datacontract.model.run import Check, Run
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def check_that_datacontract_str_is_valid(run: Run, data_contract_str: str):
|
|
12
|
-
schema = fetch_schema()
|
|
13
|
-
data_contract_yaml = yaml.safe_load(data_contract_str)
|
|
14
|
-
try:
|
|
15
|
-
fastjsonschema.validate(schema, data_contract_yaml)
|
|
16
|
-
logging.debug("YAML data is valid.")
|
|
17
|
-
run.checks.append(
|
|
18
|
-
Check(
|
|
19
|
-
type="lint",
|
|
20
|
-
result="passed",
|
|
21
|
-
name="Check that data contract YAML is valid",
|
|
22
|
-
engine="datacontract",
|
|
23
|
-
)
|
|
24
|
-
)
|
|
25
|
-
except JsonSchemaValueException as e:
|
|
26
|
-
logging.warning("YAML data is invalid.")
|
|
27
|
-
logging.warning(f"Validation error: {e.message}")
|
|
28
|
-
run.checks.append(
|
|
29
|
-
Check(
|
|
30
|
-
type="lint",
|
|
31
|
-
result="failed",
|
|
32
|
-
name="Check that data contract YAML is valid",
|
|
33
|
-
reason=e.message,
|
|
34
|
-
engine="datacontract",
|
|
35
|
-
)
|
|
36
|
-
)
|
|
37
|
-
except Exception as e:
|
|
38
|
-
logging.warning("YAML data is invalid.")
|
|
39
|
-
logging.warning(f"Validation error: {str(e)}")
|
|
40
|
-
run.checks.append(
|
|
41
|
-
Check(
|
|
42
|
-
type="lint",
|
|
43
|
-
result="failed",
|
|
44
|
-
name="Check that data contract YAML is valid",
|
|
45
|
-
reason=str(e),
|
|
46
|
-
engine="datacontract",
|
|
47
|
-
)
|
|
48
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|