datacontract-cli 0.10.1__tar.gz → 0.10.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of datacontract-cli might be problematic. Click here for more details.

Files changed (134) hide show
  1. {datacontract_cli-0.10.1/datacontract_cli.egg-info → datacontract_cli-0.10.2}/PKG-INFO +180 -102
  2. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/README.md +172 -98
  3. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/breaking/breaking_rules.py +4 -0
  4. datacontract_cli-0.10.2/datacontract/catalog/catalog.py +74 -0
  5. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/cli.py +39 -3
  6. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/data_contract.py +12 -1
  7. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/engines/fastjsonschema/check_jsonschema.py +1 -2
  8. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/engines/soda/check_soda_execute.py +9 -15
  9. datacontract_cli-0.10.2/datacontract/engines/soda/connections/duckdb.py +145 -0
  10. datacontract_cli-0.10.2/datacontract/engines/soda/connections/kafka.py +155 -0
  11. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/avro_idl_converter.py +1 -2
  12. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/dbt_converter.py +1 -2
  13. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/great_expectations_converter.py +1 -2
  14. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/html_export.py +3 -4
  15. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/jsonschema_converter.py +1 -2
  16. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/odcs_converter.py +1 -2
  17. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/rdf_converter.py +1 -1
  18. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/sodacl_converter.py +1 -2
  19. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/terraform_converter.py +1 -2
  20. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/imports/avro_importer.py +1 -2
  21. datacontract_cli-0.10.2/datacontract/imports/glue_importer.py +183 -0
  22. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/imports/sql_importer.py +20 -9
  23. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/integration/publish_opentelemetry.py +3 -6
  24. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/lint/linters/example_model_linter.py +1 -2
  25. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/lint/linters/field_pattern_linter.py +1 -2
  26. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/lint/linters/notice_period_linter.py +1 -2
  27. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/lint/linters/quality_schema_linter.py +1 -2
  28. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/lint/resolve.py +9 -6
  29. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/model/data_contract_specification.py +2 -0
  30. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/templates/datacontract.html +76 -21
  31. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/templates/style/output.css +113 -4
  32. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2/datacontract_cli.egg-info}/PKG-INFO +180 -102
  33. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract_cli.egg-info/SOURCES.txt +6 -0
  34. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract_cli.egg-info/requires.txt +7 -3
  35. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/pyproject.toml +14 -5
  36. datacontract_cli-0.10.2/tests/test_catalog.py +17 -0
  37. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_changelog.py +3 -3
  38. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_avro.py +1 -2
  39. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_dbt_models.py +1 -2
  40. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_dbt_sources.py +1 -2
  41. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_dbt_staging_sql.py +1 -2
  42. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_great_expectations.py +5 -7
  43. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_html.py +16 -0
  44. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_jsonschema.py +1 -2
  45. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_odcs.py +1 -2
  46. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_protobuf.py +1 -2
  47. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_rdf.py +2 -3
  48. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_sodacl.py +2 -3
  49. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_terraform.py +1 -2
  50. datacontract_cli-0.10.2/tests/test_import_glue.py +98 -0
  51. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_integration_opentelemetry.py +3 -6
  52. datacontract_cli-0.10.2/tests/test_test_azure_parquet_remote.py +28 -0
  53. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_parquet.py +12 -0
  54. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_postgres.py +8 -4
  55. datacontract_cli-0.10.2/tests/test_test_s3_delta.py +56 -0
  56. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_s3_json_complex.py +3 -3
  57. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_s3_json_multiple_models.py +3 -3
  58. datacontract_cli-0.10.2/tests/test_test_s3_json_remote.py +36 -0
  59. datacontract_cli-0.10.1/datacontract/engines/soda/connections/duckdb.py +0 -76
  60. datacontract_cli-0.10.1/datacontract/engines/soda/connections/kafka.py +0 -152
  61. datacontract_cli-0.10.1/tests/test_test_s3_json_remote.py +0 -26
  62. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/LICENSE +0 -0
  63. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/MANIFEST.in +0 -0
  64. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/__init__.py +0 -0
  65. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/breaking/breaking.py +0 -0
  66. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/engines/__init__.py +0 -0
  67. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py +0 -0
  68. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/engines/datacontract/check_that_datacontract_file_exists.py +0 -0
  69. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/engines/datacontract/check_that_datacontract_str_is_valid.py +0 -0
  70. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/engines/fastjsonschema/s3/s3_read_files.py +0 -0
  71. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/engines/soda/__init__.py +0 -0
  72. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/engines/soda/connections/bigquery.py +0 -0
  73. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/engines/soda/connections/dask.py +0 -0
  74. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/engines/soda/connections/databricks.py +0 -0
  75. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/engines/soda/connections/postgres.py +0 -0
  76. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/engines/soda/connections/snowflake.py +0 -0
  77. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/avro_converter.py +0 -0
  78. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/csv_type_converter.py +0 -0
  79. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/protobuf_converter.py +0 -0
  80. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/pydantic_converter.py +0 -0
  81. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/sql_converter.py +0 -0
  82. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/export/sql_type_converter.py +0 -0
  83. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/init/download_datacontract_file.py +0 -0
  84. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/integration/publish_datamesh_manager.py +0 -0
  85. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/lint/files.py +0 -0
  86. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/lint/lint.py +0 -0
  87. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/lint/linters/__init__.py +0 -0
  88. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/lint/linters/description_linter.py +0 -0
  89. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/lint/linters/field_reference_linter.py +0 -0
  90. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/lint/linters/valid_constraints_linter.py +0 -0
  91. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/lint/schema.py +0 -0
  92. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/lint/urls.py +0 -0
  93. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/model/breaking_change.py +0 -0
  94. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/model/exceptions.py +0 -0
  95. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/model/run.py +0 -0
  96. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract/web.py +0 -0
  97. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract_cli.egg-info/dependency_links.txt +0 -0
  98. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract_cli.egg-info/entry_points.txt +0 -0
  99. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/datacontract_cli.egg-info/top_level.txt +0 -0
  100. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/setup.cfg +0 -0
  101. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_breaking.py +0 -0
  102. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_cli.py +0 -0
  103. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_description_linter.py +0 -0
  104. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_documentation_linter.py +0 -0
  105. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_download_datacontract_file.py +0 -0
  106. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_example_model_linter.py +0 -0
  107. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_avro_idl.py +0 -0
  108. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_pydantic.py +0 -0
  109. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_sql.py +0 -0
  110. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_export_sql_query.py +0 -0
  111. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_field_constraint_linter.py +0 -0
  112. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_field_pattern_linter.py +0 -0
  113. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_field_reference_linter.py +0 -0
  114. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_import_avro.py +0 -0
  115. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_import_sql.py +0 -0
  116. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_integration_datameshmanager.py +0 -0
  117. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_lint.py +0 -0
  118. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_notice_period_linter.py +0 -0
  119. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_quality_schema_linter.py +0 -0
  120. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_schema.py +0 -0
  121. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_bigquery.py +0 -0
  122. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_databricks.py +0 -0
  123. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_examples_csv.py +0 -0
  124. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_examples_formats_valid.py +0 -0
  125. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_examples_inline.py +0 -0
  126. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_examples_json.py +0 -0
  127. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_examples_missing.py +0 -0
  128. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_kafka.py +0 -0
  129. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_kafka_remote.py +0 -0
  130. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_local_json.py +0 -0
  131. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_s3_csv.py +0 -0
  132. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_s3_json.py +0 -0
  133. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_test_snowflake.py +0 -0
  134. {datacontract_cli-0.10.1 → datacontract_cli-0.10.2}/tests/test_web.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datacontract-cli
3
- Version: 0.10.1
3
+ Version: 0.10.2
4
4
  Summary: Test data contracts
5
5
  Author-email: Jochen Christ <jochen.christ@innoq.com>, Stefan Negele <stefan.negele@innoq.com>
6
6
  Project-URL: Homepage, https://cli.datacontract.com
@@ -19,7 +19,7 @@ Requires-Dist: fastapi==0.110.1
19
19
  Requires-Dist: fastparquet==2024.2.0
20
20
  Requires-Dist: python-multipart==0.0.9
21
21
  Requires-Dist: rich~=13.7.0
22
- Requires-Dist: simple-ddl-parser==1.0.4
22
+ Requires-Dist: simple-ddl-parser==1.1.0
23
23
  Requires-Dist: soda-core-bigquery<3.4.0,>=3.3.1
24
24
  Requires-Dist: soda-core-duckdb<3.4.0,>=3.3.1
25
25
  Requires-Dist: soda-core-postgres<3.4.0,>=3.3.1
@@ -27,7 +27,7 @@ Requires-Dist: soda-core-snowflake<3.4.0,>=3.3.1
27
27
  Requires-Dist: soda-core-spark[databricks]<3.4.0,>=3.3.1
28
28
  Requires-Dist: soda-core-spark-df<3.4.0,>=3.3.1
29
29
  Requires-Dist: snowflake-connector-python[pandas]<3.8,>=3.6
30
- Requires-Dist: duckdb==0.10.1
30
+ Requires-Dist: duckdb==0.10.2
31
31
  Requires-Dist: fastjsonschema~=2.19.1
32
32
  Requires-Dist: python-dotenv~=1.0.0
33
33
  Requires-Dist: s3fs==2024.3.1
@@ -35,12 +35,16 @@ Requires-Dist: rdflib==7.0.0
35
35
  Requires-Dist: avro==1.11.3
36
36
  Requires-Dist: opentelemetry-exporter-otlp-proto-grpc~=1.16.0
37
37
  Requires-Dist: opentelemetry-exporter-otlp-proto-http~=1.16.0
38
+ Requires-Dist: deltalake~=0.17.0
39
+ Requires-Dist: boto3<1.34.70,>=1.34.41
40
+ Requires-Dist: botocore<1.34.70,>=1.34.41
38
41
  Provides-Extra: dev
39
42
  Requires-Dist: httpx==0.27.0; extra == "dev"
40
43
  Requires-Dist: ruff; extra == "dev"
41
44
  Requires-Dist: pytest; extra == "dev"
42
45
  Requires-Dist: pytest-xdist; extra == "dev"
43
- Requires-Dist: testcontainers<4.0; extra == "dev"
46
+ Requires-Dist: moto; extra == "dev"
47
+ Requires-Dist: testcontainers<4.0.0; extra == "dev"
44
48
  Requires-Dist: testcontainers-minio; extra == "dev"
45
49
  Requires-Dist: testcontainers-postgres; extra == "dev"
46
50
  Requires-Dist: testcontainers-kafka; extra == "dev"
@@ -136,7 +140,13 @@ CREATE TABLE line_items (
136
140
  );
137
141
  ```
138
142
 
139
- Or generate this [HTML page](https://datacontract.com/examples/orders-latest/datacontract.html).
143
+ Or generate an HTML export:
144
+
145
+ ```bash
146
+ $ datacontract export --format html https://datacontract.com/examples/orders-latest/datacontract.yaml > datacontract.html
147
+ ```
148
+
149
+ which will create this [HTML export](https://datacontract.com/examples/orders-latest/datacontract.html).
140
150
 
141
151
  ## Usage
142
152
 
@@ -224,6 +234,7 @@ Commands
224
234
  - [breaking](#breaking)
225
235
  - [changelog](#changelog)
226
236
  - [diff](#diff)
237
+ - [catalog](#catalog)
227
238
 
228
239
  ### init
229
240
 
@@ -296,46 +307,49 @@ Commands
296
307
  ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
297
308
  ```
298
309
 
299
- Data Contract CLI can connect to data sources and run schema and quality tests to verify that the data contract is valid.
310
+ Data Contract CLI connects to a data source and runs schema and quality tests to verify that the data contract is valid.
300
311
 
301
312
  ```bash
302
313
  $ datacontract test --server production datacontract.yaml
303
314
  ```
304
315
 
305
- To connect to the databases the `server` block in the datacontract.yaml is used to set up the connection. In addition, credentials, such as username and passwords, may be defined with environment variables.
316
+ To connect to the databases the `server` block in the datacontract.yaml is used to set up the connection.
317
+ In addition, credentials, such as username and passwords, may be defined with environment variables.
306
318
 
307
319
  The application uses different engines, based on the server `type`.
308
- Internally, it connects with DuckDB, Spark, or a native connection and executes the most tests with soda-core and fastjsonschema.
309
- Credentials are read from the environment variables.
320
+ Internally, it connects with DuckDB, Spark, or a native connection and executes the most tests with _soda-core_ and _fastjsonschema_.
321
+
322
+ Credentials are provided with environment variables.
310
323
 
311
324
  Supported server types:
312
325
 
313
- | Type | Format | Status |
314
- |--------------|------------|---------------------------------------------------------------------------------|
315
- | `s3` | `parquet` | ✅ |
316
- | `s3` | `json` | ✅ |
317
- | `s3` | `csv` | ✅ |
318
- | `s3` | `delta` | Coming soon ([#24](https://github.com/datacontract/datacontract-cli/issues/24)) |
319
- | `s3` | `iceberg` | Coming soon |
320
- | `postgres` | n/a | ✅ |
321
- | `snowflake` | n/a | ✅ |
322
- | `bigquery` | n/a | ✅ |
323
- | `redshift` | n/a | Coming soon |
324
- | `databricks` | n/a | ✅ |
325
- | `kafka` | `json` | ✅ |
326
- | `kafka` | `avro` | Coming soon |
327
- | `kafka` | `protobuf` | Coming soon |
328
- | `local` | `parquet` | ✅ |
329
- | `local` | `json` | ✅ |
330
- | `local` | `csv` | ✅ |
331
-
332
- Feel free to create an issue, if you need support for an additional type.
326
+ - [s3](#S3)
327
+ - [bigquery](#bigquery)
328
+ - [azure](#azure)
329
+ - [databricks](#databricks)
330
+ - [databricks (programmatic)](#databricks-programmatic)
331
+ - [snowflake](#snowflake)
332
+ - [kafka](#kafka)
333
+ - [postgres](#postgres)
334
+ - [local](#local)
335
+
336
+ Supported formats:
337
+
338
+ - parquet
339
+ - json
340
+ - csv
341
+ - delta
342
+ - iceberg (coming soon)
343
+
344
+ Feel free to create an [issue](https://github.com/datacontract/datacontract-cli/issues), if you need support for an additional type and formats.
333
345
 
334
346
  ### S3
335
347
 
336
348
  Data Contract CLI can test data that is stored in S3 buckets or any S3-compliant endpoints in various formats.
337
349
 
338
- #### Example
350
+ #### Examples
351
+
352
+ ##### JSON
339
353
 
340
354
  datacontract.yaml
341
355
  ```yaml
@@ -348,6 +362,18 @@ servers:
348
362
  delimiter: new_line # new_line, array, or none
349
363
  ```
350
364
 
365
+ ##### Delta Tables
366
+
367
+ datacontract.yaml
368
+ ```yaml
369
+ servers:
370
+ production:
371
+ type: s3
372
+ endpointUrl: https://minio.example.com # not needed with AWS S3
373
+ location: s3://bucket-name/path/table.delta # path to the Delta table folder containing parquet data files and the _delta_log
374
+ format: delta
375
+ ```
376
+
351
377
  #### Environment Variables
352
378
 
353
379
  | Environment Variable | Example | Description |
@@ -357,76 +383,40 @@ servers:
357
383
  | `DATACONTRACT_S3_SECRET_ACCESS_KEY` | `93S7LRrJcqLaaaa/XXXXXXXXXXXXX` | AWS Secret Access Key |
358
384
 
359
385
 
360
- ### Postgres
361
-
362
- Data Contract CLI can test data in Postgres or Postgres-compliant databases (e.g., RisingWave).
363
-
364
- #### Example
365
-
366
- datacontract.yaml
367
- ```yaml
368
- servers:
369
- postgres:
370
- type: postgres
371
- host: localhost
372
- port: 5432
373
- database: postgres
374
- schema: public
375
- models:
376
- my_table_1: # corresponds to a table
377
- type: table
378
- fields:
379
- my_column_1: # corresponds to a column
380
- type: varchar
381
- ```
382
-
383
- #### Environment Variables
384
-
385
- | Environment Variable | Example | Description |
386
- |----------------------------------|--------------------|-------------|
387
- | `DATACONTRACT_POSTGRES_USERNAME` | `postgres` | Username |
388
- | `DATACONTRACT_POSTGRES_PASSWORD` | `mysecretpassword` | Password |
389
386
 
387
+ ### BigQuery
390
388
 
391
- ### Snowflake
389
+ We support authentication to BigQuery using Service Account Key. The used Service Account should include the roles:
390
+ * BigQuery Job User
391
+ * BigQuery Data Viewer
392
392
 
393
- Data Contract CLI can test data in Snowflake.
394
393
 
395
394
  #### Example
396
395
 
397
396
  datacontract.yaml
398
397
  ```yaml
399
-
400
398
  servers:
401
- snowflake:
402
- type: snowflake
403
- account: abcdefg-xn12345
404
- database: ORDER_DB
405
- schema: ORDERS_PII_V2
399
+ production:
400
+ type: bigquery
401
+ project: datameshexample-product
402
+ dataset: datacontract_cli_test_dataset
406
403
  models:
407
- my_table_1: # corresponds to a table
404
+ datacontract_cli_test_table: # corresponds to a BigQuery table
408
405
  type: table
409
- fields:
410
- my_column_1: # corresponds to a column
411
- type: varchar
406
+ fields: ...
412
407
  ```
413
408
 
414
409
  #### Environment Variables
415
410
 
416
- | Environment Variable | Example | Description |
417
- |------------------------------------|--------------------|-----------------------------------------------------|
418
- | `DATACONTRACT_SNOWFLAKE_USERNAME` | `datacontract` | Username |
419
- | `DATACONTRACT_SNOWFLAKE_PASSWORD` | `mysecretpassword` | Password |
420
- | `DATACONTRACT_SNOWFLAKE_ROLE` | `DATAVALIDATION` | The snowflake role to use. |
421
- | `DATACONTRACT_SNOWFLAKE_WAREHOUSE` | `COMPUTE_WH` | The Snowflake Warehouse to use executing the tests. |
411
+ | Environment Variable | Example | Description |
412
+ |----------------------------------------------|---------------------------|---------------------------------------------------------|
413
+ | `DATACONTRACT_BIGQUERY_ACCOUNT_INFO_JSON_PATH` | `~/service-access-key.json` | Service Access key as saved on key creation by BigQuery |
422
414
 
423
415
 
424
- ### BigQuery
425
416
 
426
- We support authentication to BigQuery using Service Account Key. The used Service Account should include the roles:
427
- * BigQuery Job User
428
- * BigQuery Data Viewer
417
+ ### Azure
429
418
 
419
+ Data Contract CLI can test data that is stored in Azure Blob storage or Azure Data Lake Storage (Gen2) (ADLS) in various formats.
430
420
 
431
421
  #### Example
432
422
 
@@ -434,20 +424,21 @@ datacontract.yaml
434
424
  ```yaml
435
425
  servers:
436
426
  production:
437
- type: bigquery
438
- project: datameshexample-product
439
- dataset: datacontract_cli_test_dataset
440
- models:
441
- datacontract_cli_test_table: # corresponds to a BigQuery table
442
- type: table
443
- fields: ...
427
+ type: azure
428
+ location: abfss://datameshdatabricksdemo.dfs.core.windows.net/dataproducts/inventory_events/*.parquet
429
+ format: parquet
444
430
  ```
445
431
 
446
432
  #### Environment Variables
447
433
 
448
- | Environment Variable | Example | Description |
449
- |----------------------------------------------|---------------------------|---------------------------------------------------------|
450
- | `DATACONTRACT_BIGQUERY_ACCOUNT_INFO_JSON_PATH` | `~/service-access-key.json` | Service Access key as saved on key creation by BigQuery |
434
+ Authentication works with an Azure Service Principal (SPN) aka App Registration with a secret.
435
+
436
+ | Environment Variable | Example | Description |
437
+ |-----------------------------------|-------------------------------|------------------------------------------------------|
438
+ | `DATACONTRACT_AZURE_TENANT_ID` | `79f5b80f-10ff-40b9-9d1f-774b42d605fc` | The Azure Tenant ID |
439
+ | `DATACONTRACT_AZURE_CLIENT_ID` | `3cf7ce49-e2e9-4cbc-a922-4328d4a58622` | The ApplicationID / ClientID of the app registration |
440
+ | `DATACONTRACT_AZURE_CLIENT_SECRET` | `yZK8Q~GWO1MMXXXXXXXXXXXXX` | The Client Secret value |
441
+
451
442
 
452
443
 
453
444
  ### Databricks
@@ -518,6 +509,41 @@ run = data_contract.test()
518
509
  run.result
519
510
  ```
520
511
 
512
+
513
+ ### Snowflake
514
+
515
+ Data Contract CLI can test data in Snowflake.
516
+
517
+ #### Example
518
+
519
+ datacontract.yaml
520
+ ```yaml
521
+
522
+ servers:
523
+ snowflake:
524
+ type: snowflake
525
+ account: abcdefg-xn12345
526
+ database: ORDER_DB
527
+ schema: ORDERS_PII_V2
528
+ models:
529
+ my_table_1: # corresponds to a table
530
+ type: table
531
+ fields:
532
+ my_column_1: # corresponds to a column
533
+ type: varchar
534
+ ```
535
+
536
+ #### Environment Variables
537
+
538
+ | Environment Variable | Example | Description |
539
+ |------------------------------------|--------------------|-----------------------------------------------------|
540
+ | `DATACONTRACT_SNOWFLAKE_USERNAME` | `datacontract` | Username |
541
+ | `DATACONTRACT_SNOWFLAKE_PASSWORD` | `mysecretpassword` | Password |
542
+ | `DATACONTRACT_SNOWFLAKE_ROLE` | `DATAVALIDATION` | The snowflake role to use. |
543
+ | `DATACONTRACT_SNOWFLAKE_WAREHOUSE` | `COMPUTE_WH` | The Snowflake Warehouse to use executing the tests. |
544
+
545
+
546
+
521
547
  ### Kafka
522
548
 
523
549
  Kafka support is currently considered experimental.
@@ -542,13 +568,44 @@ servers:
542
568
  | `DATACONTRACT_KAFKA_SASL_PASSWORD` | `xxx` | The SASL password (secret). |
543
569
 
544
570
 
571
+ ### Postgres
572
+
573
+ Data Contract CLI can test data in Postgres or Postgres-compliant databases (e.g., RisingWave).
574
+
575
+ #### Example
576
+
577
+ datacontract.yaml
578
+ ```yaml
579
+ servers:
580
+ postgres:
581
+ type: postgres
582
+ host: localhost
583
+ port: 5432
584
+ database: postgres
585
+ schema: public
586
+ models:
587
+ my_table_1: # corresponds to a table
588
+ type: table
589
+ fields:
590
+ my_column_1: # corresponds to a column
591
+ type: varchar
592
+ ```
593
+
594
+ #### Environment Variables
595
+
596
+ | Environment Variable | Example | Description |
597
+ |----------------------------------|--------------------|-------------|
598
+ | `DATACONTRACT_POSTGRES_USERNAME` | `postgres` | Username |
599
+ | `DATACONTRACT_POSTGRES_PASSWORD` | `mysecretpassword` | Password |
600
+
601
+
545
602
 
546
603
  ### export
547
604
 
548
605
  ```
549
606
  Usage: datacontract export [OPTIONS] [LOCATION]
550
607
 
551
- Convert data contract to a specific format. console.prints to stdout.
608
+ Convert data contract to a specific format. Prints to stdout or to the specified output file.
552
609
 
553
610
  ╭─ Arguments ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
554
611
  │ location [LOCATION] The location (url or path) of the data contract yaml. [default: datacontract.yaml] │
@@ -641,15 +698,15 @@ data products, find the true domain owner of a field attribute)
641
698
  ### import
642
699
 
643
700
  ```
644
- Usage: datacontract import [OPTIONS]
645
-
646
- Create a data contract from the given source file. Prints to stdout.
647
-
648
- ╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
649
- │ * --format [sql|avro] The format of the source file. [default: None] [required]
650
- │ * --source TEXT The path to the file that should be imported. [default: None] [required]
651
- │ --help Show this message and exit.
652
- ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
701
+ Usage: datacontract import [OPTIONS]
702
+
703
+ Create a data contract from the given source location. Prints to stdout.
704
+
705
+ ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
706
+ │ * --format [sql|avro|glue] The format of the source file. [default: None] [required]
707
+ │ * --source TEXT The path to the file or Glue Database that should be imported. [default: None] [required]
708
+ │ --help Show this message and exit.
709
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
653
710
  ```
654
711
 
655
712
  Example:
@@ -664,6 +721,7 @@ Available import options:
664
721
  |--------------------|------------------------------------------------|---------|
665
722
  | `sql` | Import from SQL DDL | ✅ |
666
723
  | `avro` | Import from AVRO schemas | ✅ |
724
+ | `glue` | Import from AWS Glue DataCatalog | ✅ |
667
725
  | `protobuf` | Import from Protobuf schemas | TBD |
668
726
  | `jsonschema` | Import from JSON Schemas | TBD |
669
727
  | `bigquery` | Import from BigQuery Schemas | TBD |
@@ -720,6 +778,21 @@ Available import options:
720
778
  ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
721
779
  ```
722
780
 
781
+ ### catalog
782
+
783
+ ```
784
+
785
+ Usage: datacontract catalog [OPTIONS]
786
+
787
+ Create an html catalog of data contracts.
788
+
789
+ ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
790
+ │ --files TEXT Glob pattern for the data contract files to include in the catalog. [default: *.yaml] │
791
+ │ --output TEXT Output directory for the catalog html files. [default: catalog/] │
792
+ │ --help Show this message and exit. │
793
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
794
+ ```
795
+
723
796
 
724
797
  ## Integrations
725
798
 
@@ -887,7 +960,7 @@ source venv/bin/activate
887
960
  pip install --upgrade pip setuptools wheel
888
961
  pip install -e '.[dev]'
889
962
  ruff check --fix
890
- ruff format --check
963
+ ruff format
891
964
  pytest
892
965
  ```
893
966
 
@@ -938,6 +1011,11 @@ This command runs the container momentarily to check the version of the `datacon
938
1011
 
939
1012
  We are happy to receive your contributions. Propose your change in an issue or directly create a pull request with your improvements.
940
1013
 
1014
+ ## Companies using this tool
1015
+
1016
+ - [INNOQ](https://innoq.com)
1017
+ - And many more. To add your company, please create a pull request.
1018
+
941
1019
  ## License
942
1020
 
943
1021
  [MIT License](LICENSE)