datacontract-cli 0.10.16__tar.gz → 0.10.18__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 (202) hide show
  1. {datacontract_cli-0.10.16/datacontract_cli.egg-info → datacontract_cli-0.10.18}/PKG-INFO +51 -67
  2. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/README.md +28 -44
  3. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/breaking/breaking_rules.py +4 -0
  4. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/cli.py +31 -7
  5. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/data_contract.py +14 -10
  6. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/fastjsonschema/check_jsonschema.py +15 -4
  7. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/soda/check_soda_execute.py +9 -4
  8. datacontract_cli-0.10.18/datacontract/engines/soda/connections/databricks.py +29 -0
  9. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/dbml_converter.py +2 -2
  10. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/dbt_converter.py +41 -16
  11. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/exporter.py +6 -2
  12. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/exporter_factory.py +48 -14
  13. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/iceberg_converter.py +3 -3
  14. datacontract_cli-0.10.18/datacontract/export/markdown_converter.py +208 -0
  15. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/odcs_v3_exporter.py +6 -0
  16. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/sodacl_converter.py +1 -1
  17. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/sql_converter.py +1 -1
  18. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/sql_type_converter.py +21 -0
  19. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/sqlalchemy_converter.py +3 -1
  20. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/dbml_importer.py +1 -1
  21. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/dbt_importer.py +94 -12
  22. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/odcs_v2_importer.py +1 -1
  23. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/odcs_v3_importer.py +1 -1
  24. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/sql_importer.py +1 -1
  25. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/integration/datamesh_manager.py +14 -3
  26. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/lint/resolve.py +26 -13
  27. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/model/data_contract_specification.py +11 -4
  28. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/model/run.py +1 -0
  29. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/templates/partials/model_field.html +1 -1
  30. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18/datacontract_cli.egg-info}/PKG-INFO +51 -67
  31. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract_cli.egg-info/SOURCES.txt +2 -2
  32. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract_cli.egg-info/requires.txt +21 -21
  33. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/pyproject.toml +22 -23
  34. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_changelog.py +8 -8
  35. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_dbt_sources.py +15 -0
  36. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_dbt_staging_sql.py +6 -3
  37. datacontract_cli-0.10.18/tests/test_export_markdown.py +30 -0
  38. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_sqlalchemy.py +18 -2
  39. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_import_dbt.py +24 -0
  40. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_import_sql.py +2 -2
  41. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_resolve.py +58 -0
  42. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_bigquery.py +14 -0
  43. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_examples_missing.py +3 -1
  44. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_sqlserver.py +7 -0
  45. datacontract_cli-0.10.16/datacontract/engines/soda/connections/databricks.py +0 -20
  46. datacontract_cli-0.10.16/datacontract/integration/opentelemetry.py +0 -103
  47. datacontract_cli-0.10.16/tests/test_integration_opentelemetry.py +0 -72
  48. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/LICENSE +0 -0
  49. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/MANIFEST.in +0 -0
  50. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/__init__.py +0 -0
  51. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/breaking/breaking.py +0 -0
  52. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/catalog/catalog.py +0 -0
  53. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/__init__.py +0 -0
  54. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py +0 -0
  55. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/datacontract/check_that_datacontract_file_exists.py +0 -0
  56. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/fastjsonschema/s3/s3_read_files.py +0 -0
  57. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/soda/__init__.py +0 -0
  58. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/bigquery.py +0 -0
  59. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/dask.py +0 -0
  60. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/duckdb.py +0 -0
  61. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/kafka.py +0 -0
  62. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/postgres.py +0 -0
  63. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/snowflake.py +0 -0
  64. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/sqlserver.py +0 -0
  65. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/trino.py +0 -0
  66. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/__init__.py +0 -0
  67. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/avro_converter.py +0 -0
  68. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/avro_idl_converter.py +0 -0
  69. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/bigquery_converter.py +0 -0
  70. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/csv_type_converter.py +0 -0
  71. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/data_caterer_converter.py +0 -0
  72. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/dcs_exporter.py +0 -0
  73. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/go_converter.py +0 -0
  74. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/great_expectations_converter.py +0 -0
  75. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/html_export.py +0 -0
  76. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/jsonschema_converter.py +0 -0
  77. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/odcs_v2_exporter.py +0 -0
  78. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/pandas_type_converter.py +0 -0
  79. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/protobuf_converter.py +0 -0
  80. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/pydantic_converter.py +0 -0
  81. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/rdf_converter.py +0 -0
  82. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/spark_converter.py +0 -0
  83. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/export/terraform_converter.py +0 -0
  84. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/avro_importer.py +0 -0
  85. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/bigquery_importer.py +0 -0
  86. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/glue_importer.py +0 -0
  87. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/iceberg_importer.py +0 -0
  88. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/importer.py +0 -0
  89. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/importer_factory.py +0 -0
  90. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/jsonschema_importer.py +0 -0
  91. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/odcs_importer.py +0 -0
  92. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/parquet_importer.py +0 -0
  93. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/spark_importer.py +0 -0
  94. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/imports/unity_importer.py +0 -0
  95. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/init/download_datacontract_file.py +0 -0
  96. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/lint/files.py +0 -0
  97. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/lint/lint.py +0 -0
  98. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/lint/linters/__init__.py +0 -0
  99. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/lint/linters/description_linter.py +0 -0
  100. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/lint/linters/example_model_linter.py +0 -0
  101. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/lint/linters/field_pattern_linter.py +0 -0
  102. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/lint/linters/field_reference_linter.py +0 -0
  103. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/lint/linters/notice_period_linter.py +0 -0
  104. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/lint/linters/quality_schema_linter.py +0 -0
  105. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/lint/linters/valid_constraints_linter.py +0 -0
  106. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/lint/resources.py +0 -0
  107. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/lint/schema.py +0 -0
  108. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/lint/urls.py +0 -0
  109. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/model/breaking_change.py +0 -0
  110. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/model/exceptions.py +0 -0
  111. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/model/odcs.py +0 -0
  112. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/py.typed +0 -0
  113. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/templates/datacontract.html +0 -0
  114. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/templates/index.html +0 -0
  115. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/templates/partials/datacontract_information.html +0 -0
  116. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/templates/partials/datacontract_servicelevels.html +0 -0
  117. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/templates/partials/datacontract_terms.html +0 -0
  118. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/templates/partials/definition.html +0 -0
  119. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/templates/partials/example.html +0 -0
  120. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/templates/partials/server.html +0 -0
  121. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/templates/style/output.css +0 -0
  122. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract/web.py +0 -0
  123. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract_cli.egg-info/dependency_links.txt +0 -0
  124. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract_cli.egg-info/entry_points.txt +0 -0
  125. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/datacontract_cli.egg-info/top_level.txt +0 -0
  126. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/setup.cfg +0 -0
  127. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_breaking.py +0 -0
  128. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_catalog.py +0 -0
  129. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_cli.py +0 -0
  130. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_data_contract_specification.py +0 -0
  131. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_description_linter.py +0 -0
  132. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_documentation_linter.py +0 -0
  133. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_download_datacontract_file.py +0 -0
  134. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_example_model_linter.py +0 -0
  135. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_avro.py +0 -0
  136. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_avro_idl.py +0 -0
  137. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_bigquery.py +0 -0
  138. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_complex_data_contract.py +0 -0
  139. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_custom_exporter.py +0 -0
  140. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_data_caterer.py +0 -0
  141. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_dbml.py +0 -0
  142. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_dbt_models.py +0 -0
  143. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_go.py +0 -0
  144. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_great_expectations.py +0 -0
  145. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_html.py +0 -0
  146. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_iceberg.py +0 -0
  147. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_jsonschema.py +0 -0
  148. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_odcs_v2.py +0 -0
  149. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_odcs_v3.py +0 -0
  150. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_protobuf.py +0 -0
  151. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_pydantic.py +0 -0
  152. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_rdf.py +0 -0
  153. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_sodacl.py +0 -0
  154. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_spark.py +0 -0
  155. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_sql.py +0 -0
  156. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_sql_query.py +0 -0
  157. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_export_terraform.py +0 -0
  158. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_field_constraint_linter.py +0 -0
  159. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_field_pattern_linter.py +0 -0
  160. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_field_reference_linter.py +0 -0
  161. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_import_avro.py +0 -0
  162. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_import_bigquery.py +0 -0
  163. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_import_dbml.py +0 -0
  164. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_import_glue.py +0 -0
  165. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_import_iceberg.py +0 -0
  166. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_import_jsonschema.py +0 -0
  167. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_import_odcs_v2.py +0 -0
  168. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_import_odcs_v3.py +0 -0
  169. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_import_parquet.py +0 -0
  170. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_import_spark.py +0 -0
  171. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_import_unity_file.py +0 -0
  172. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_integration_datameshmanager.py +0 -0
  173. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_lint.py +0 -0
  174. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_notice_period_linter.py +0 -0
  175. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_quality_schema_linter.py +0 -0
  176. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_roundtrip_jsonschema.py +0 -0
  177. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_spec_fields_field.py +0 -0
  178. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_spec_ref.py +0 -0
  179. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_azure_parquet_remote.py +0 -0
  180. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_databricks.py +0 -0
  181. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_dataframe.py +0 -0
  182. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_delta.py +0 -0
  183. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_examples_csv.py +0 -0
  184. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_examples_formats_valid.py +0 -0
  185. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_examples_inline.py +0 -0
  186. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_examples_json.py +0 -0
  187. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_gcs_json_remote.py +0 -0
  188. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_kafka.py +0 -0
  189. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_kafka_remote.py +0 -0
  190. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_local_json.py +0 -0
  191. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_parquet.py +0 -0
  192. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_postgres.py +0 -0
  193. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_quality.py +0 -0
  194. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_s3_csv.py +0 -0
  195. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_s3_delta.py +0 -0
  196. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_s3_json.py +0 -0
  197. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_s3_json_complex.py +0 -0
  198. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_s3_json_multiple_models.py +0 -0
  199. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_s3_json_remote.py +0 -0
  200. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_snowflake.py +0 -0
  201. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_test_trino.py +0 -0
  202. {datacontract_cli-0.10.16 → datacontract_cli-0.10.18}/tests/test_web.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: datacontract-cli
3
- Version: 0.10.16
3
+ Version: 0.10.18
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
@@ -11,64 +11,64 @@ Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: typer<0.15,>=0.12
14
+ Requires-Dist: typer<0.16,>=0.15.1
15
15
  Requires-Dist: pydantic<2.11.0,>=2.8.2
16
16
  Requires-Dist: pyyaml~=6.0.1
17
17
  Requires-Dist: requests<2.33,>=2.31
18
18
  Requires-Dist: fastapi==0.115.6
19
- Requires-Dist: uvicorn==0.32.1
19
+ Requires-Dist: uvicorn==0.34.0
20
20
  Requires-Dist: fastjsonschema<2.22.0,>=2.19.1
21
21
  Requires-Dist: fastparquet==2024.11.0
22
- Requires-Dist: python-multipart==0.0.19
22
+ Requires-Dist: numpy<2.0.0,>=1.26.4
23
+ Requires-Dist: python-multipart==0.0.20
23
24
  Requires-Dist: rich<13.10,>=13.7
24
25
  Requires-Dist: simple-ddl-parser==1.7.1
25
26
  Requires-Dist: duckdb==1.1.2
26
- Requires-Dist: soda-core-duckdb<3.5.0,>=3.3.1
27
+ Requires-Dist: soda-core-duckdb<3.4.0,>=3.3.20
27
28
  Requires-Dist: setuptools>=60
28
29
  Requires-Dist: python-dotenv~=1.0.0
29
30
  Requires-Dist: rdflib==7.0.0
30
- Requires-Dist: opentelemetry-exporter-otlp-proto-grpc~=1.16
31
- Requires-Dist: opentelemetry-exporter-otlp-proto-http~=1.16
32
- Requires-Dist: boto3<1.35.69,>=1.34.41
31
+ Requires-Dist: boto3<1.35.98,>=1.34.41
33
32
  Requires-Dist: jinja_partials>=0.2.1
34
33
  Provides-Extra: avro
35
34
  Requires-Dist: avro==1.12.0; extra == "avro"
36
35
  Provides-Extra: bigquery
37
- Requires-Dist: soda-core-bigquery<3.5.0,>=3.3.1; extra == "bigquery"
36
+ Requires-Dist: soda-core-bigquery<3.4.0,>=3.3.20; extra == "bigquery"
38
37
  Provides-Extra: databricks
39
- Requires-Dist: soda-core-spark-df<3.5.0,>=3.3.1; extra == "databricks"
40
- Requires-Dist: databricks-sql-connector<3.6.0,>=3.1.2; extra == "databricks"
41
- Requires-Dist: databricks-sdk<0.39.0,>=0.32.0; extra == "databricks"
42
- Requires-Dist: soda-core-spark[databricks]<3.5.0,>=3.3.1; extra == "databricks"
38
+ Requires-Dist: soda-core-spark-df<3.4.0,>=3.3.20; extra == "databricks"
39
+ Requires-Dist: soda-core-spark[databricks]<3.4.0,>=3.3.20; extra == "databricks"
40
+ Requires-Dist: databricks-sql-connector<3.8.0,>=3.7.0; extra == "databricks"
41
+ Requires-Dist: databricks-sdk<0.41.0; extra == "databricks"
43
42
  Provides-Extra: iceberg
44
43
  Requires-Dist: pyiceberg==0.8.1; extra == "iceberg"
45
44
  Provides-Extra: kafka
46
45
  Requires-Dist: datacontract-cli[avro]; extra == "kafka"
47
- Requires-Dist: soda-core-spark-df<3.5.0,>=3.3.1; extra == "kafka"
46
+ Requires-Dist: soda-core-spark-df<3.4.0,>=3.3.20; extra == "kafka"
48
47
  Provides-Extra: postgres
49
- Requires-Dist: soda-core-postgres<3.5.0,>=3.3.1; extra == "postgres"
48
+ Requires-Dist: soda-core-postgres<3.4.0,>=3.3.20; extra == "postgres"
50
49
  Provides-Extra: s3
51
- Requires-Dist: s3fs==2024.10.0; extra == "s3"
50
+ Requires-Dist: s3fs==2024.12.0; extra == "s3"
51
+ Requires-Dist: aiobotocore<2.18.0,>=2.17.0; extra == "s3"
52
52
  Provides-Extra: snowflake
53
53
  Requires-Dist: snowflake-connector-python[pandas]<3.13,>=3.6; extra == "snowflake"
54
- Requires-Dist: soda-core-snowflake<3.5.0,>=3.3.1; extra == "snowflake"
54
+ Requires-Dist: soda-core-snowflake<3.4.0,>=3.3.20; extra == "snowflake"
55
55
  Provides-Extra: sqlserver
56
- Requires-Dist: soda-core-sqlserver<3.5.0,>=3.3.1; extra == "sqlserver"
56
+ Requires-Dist: soda-core-sqlserver<3.4.0,>=3.3.20; extra == "sqlserver"
57
57
  Provides-Extra: trino
58
- Requires-Dist: soda-core-trino<3.5.0,>=3.3.1; extra == "trino"
58
+ Requires-Dist: soda-core-trino<3.4.0,>=3.3.20; extra == "trino"
59
59
  Provides-Extra: dbt
60
60
  Requires-Dist: dbt-core>=1.8.0; extra == "dbt"
61
61
  Provides-Extra: dbml
62
62
  Requires-Dist: pydbml>=1.1.1; extra == "dbml"
63
63
  Provides-Extra: parquet
64
- Requires-Dist: pyarrow>=12.0.0; extra == "parquet"
64
+ Requires-Dist: pyarrow>=18.1.0; extra == "parquet"
65
65
  Provides-Extra: all
66
66
  Requires-Dist: datacontract-cli[bigquery,databricks,dbml,dbt,iceberg,kafka,parquet,postgres,s3,snowflake,sqlserver,trino]; extra == "all"
67
67
  Provides-Extra: dev
68
68
  Requires-Dist: datacontract-cli[all]; extra == "dev"
69
69
  Requires-Dist: httpx==0.28.1; extra == "dev"
70
70
  Requires-Dist: kafka-python; extra == "dev"
71
- Requires-Dist: moto==5.0.22; extra == "dev"
71
+ Requires-Dist: moto==5.0.26; extra == "dev"
72
72
  Requires-Dist: pandas>=2.1.0; extra == "dev"
73
73
  Requires-Dist: pre-commit<4.1.0,>=3.7.1; extra == "dev"
74
74
  Requires-Dist: pytest; extra == "dev"
@@ -76,7 +76,7 @@ Requires-Dist: pytest-xdist; extra == "dev"
76
76
  Requires-Dist: pymssql==2.3.2; extra == "dev"
77
77
  Requires-Dist: ruff; extra == "dev"
78
78
  Requires-Dist: testcontainers[kafka,minio,mssql,postgres]==4.9.0; extra == "dev"
79
- Requires-Dist: trino==0.330.0; extra == "dev"
79
+ Requires-Dist: trino==0.331.0; extra == "dev"
80
80
 
81
81
  # Data Contract CLI
82
82
 
@@ -105,7 +105,7 @@ This data contract contains all information to connect to S3 and check that the
105
105
 
106
106
  Let's use [pip](https://pip.pypa.io/en/stable/getting-started/) to install the CLI (or use the [Docker image](#docker)),
107
107
  ```bash
108
- $ python3 -m pip install datacontract-cli[all]
108
+ $ python3 -m pip install 'datacontract-cli[all]'
109
109
  ```
110
110
 
111
111
 
@@ -230,13 +230,13 @@ Choose the most appropriate installation method for your needs:
230
230
  Python 3.10, 3.11, and 3.12 are supported. We recommend to use Python 3.11.
231
231
 
232
232
  ```bash
233
- python3 -m pip install datacontract-cli[all]
233
+ python3 -m pip install 'datacontract-cli[all]'
234
234
  ```
235
235
 
236
236
  ### pipx
237
237
  pipx installs into an isolated environment.
238
238
  ```bash
239
- pipx install datacontract-cli[all]
239
+ pipx install 'datacontract-cli[all]'
240
240
  ```
241
241
 
242
242
  ### Docker
@@ -301,6 +301,7 @@ Commands
301
301
  - [diff](#diff)
302
302
  - [catalog](#catalog)
303
303
  - [publish](#publish)
304
+ - [serve](#serve)
304
305
 
305
306
  ### init
306
307
 
@@ -365,9 +366,6 @@ Commands
365
366
  │ [default: no-examples] │
366
367
  │ --publish TEXT The url to publish the results after the test │
367
368
  │ [default: None] │
368
- │ --publish-to-opentelemetry --no-publish-to-opentelemetry Publish the results to opentelemetry. Use environment │
369
- │ variables to configure the OTLP endpoint, headers, etc. │
370
- │ [default: no-publish-to-opentelemetry] │
371
369
  │ --logs --no-logs Print logs [default: no-logs] │
372
370
  │ --help Show this message and exit. │
373
371
  ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -592,7 +590,6 @@ datacontract.yaml
592
590
  servers:
593
591
  production:
594
592
  type: databricks
595
- host: dbc-abcdefgh-1234.cloud.databricks.com
596
593
  catalog: acme_catalog_prod
597
594
  schema: orders_latest
598
595
  models:
@@ -603,10 +600,11 @@ models:
603
600
 
604
601
  #### Environment Variables
605
602
 
606
- | Environment Variable | Example | Description |
607
- |----------------------------------------------|--------------------------------------|-------------------------------------------------------|
608
- | `DATACONTRACT_DATABRICKS_TOKEN` | `dapia00000000000000000000000000000` | The personal access token to authenticate |
609
- | `DATACONTRACT_DATABRICKS_HTTP_PATH` | `/sql/1.0/warehouses/b053a3ffffffff` | The HTTP path to the SQL warehouse or compute cluster |
603
+ | Environment Variable | Example | Description |
604
+ |-------------------------------------------|--------------------------------------|-----------------------------------------------------------|
605
+ | `DATACONTRACT_DATABRICKS_TOKEN` | `dapia00000000000000000000000000000` | The personal access token to authenticate |
606
+ | `DATACONTRACT_DATABRICKS_HTTP_PATH` | `/sql/1.0/warehouses/b053a3ffffffff` | The HTTP path to the SQL warehouse or compute cluster |
607
+ | `DATACONTRACT_DATABRICKS_SERVER_HOSTNAME` | `dbc-abcdefgh-1234.cloud.databricks.com` | The host name of the SQL warehouse or compute cluster |
610
608
 
611
609
 
612
610
  ### Databricks (programmatic)
@@ -841,7 +839,7 @@ models:
841
839
  │ t-staging-sql|odcs|odcs_v2|odcs_v3|rdf|avro|protobuf │
842
840
  │ |great-expectations|terraform|avro-idl|sql|sql-query │
843
841
  │ |html|go|bigquery|dbml|spark|sqlalchemy|data-caterer │
844
- │ |dcs|iceberg]
842
+ │ |dcs|markdown|iceberg]
845
843
  │ --output PATH Specify the file path where the exported data will be │
846
844
  │ saved. If no path is provided, the output will be │
847
845
  │ printed to stdout. │
@@ -902,6 +900,7 @@ Available export options:
902
900
  | `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
903
901
  | `data-caterer` | Export to Data Caterer in YAML format | ✅ |
904
902
  | `dcs` | Export to Data Contract Specification in YAML format | ✅ |
903
+ | `markdown` | Export to Markdown | ✅ |
905
904
  | `iceberg` | Export to an Iceberg JSON Schema Definition | partial |
906
905
  | Missing something? | Please create an issue on GitHub | TBD |
907
906
 
@@ -1389,13 +1388,28 @@ datacontract catalog --files "*.odcs.yaml"
1389
1388
  ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
1390
1389
  ```
1391
1390
 
1391
+ ### Serve
1392
+
1393
+ ```
1394
+
1395
+ Usage: datacontract serve [OPTIONS]
1396
+
1397
+ Start the datacontract web server.
1398
+
1399
+ ╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
1400
+ │ --port INTEGER Bind socket to this port. [default: 4242] │
1401
+ │ --host TEXT Bind socket to this host. [default: 127.0.0.1] │
1402
+ │ --help Show this message and exit. │
1403
+ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
1404
+
1405
+ ```
1406
+
1392
1407
  ## Integrations
1393
1408
 
1394
1409
  | Integration | Option | Description |
1395
1410
  |-----------------------|------------------------------|---------------------------------------------------------------------------------------------------------------|
1396
1411
  | Data Mesh Manager | `--publish` | Push full results to the [Data Mesh Manager API](https://api.datamesh-manager.com/swagger/index.html) |
1397
1412
  | Data Contract Manager | `--publish` | Push full results to the [Data Contract Manager API](https://api.datacontract-manager.com/swagger/index.html) |
1398
- | OpenTelemetry | `--publish-to-opentelemetry` | Push result as gauge metrics |
1399
1413
 
1400
1414
  ### Integration with Data Mesh Manager
1401
1415
 
@@ -1409,36 +1423,6 @@ $ datacontract test https://demo.datamesh-manager.com/demo279750347121/datacontr
1409
1423
  --publish https://api.datamesh-manager.com/api/test-results
1410
1424
  ```
1411
1425
 
1412
- ### Integration with OpenTelemetry
1413
-
1414
- If you use OpenTelemetry, you can use the data contract URL and append the `--publish-to-opentelemetry` option to send the test results to your OLTP-compatible instance, e.g., Prometheus.
1415
-
1416
- The metric name is "datacontract.cli.test.result" and it uses the following encoding for the result:
1417
-
1418
- | datacontract.cli.test.result | Description |
1419
- |------------------------------|---------------------------------------|
1420
- | 0 | test run passed, no warnings |
1421
- | 1 | test run has warnings |
1422
- | 2 | test run failed |
1423
- | 3 | test run not possible due to an error |
1424
- | 4 | test status unknown |
1425
-
1426
-
1427
- ```bash
1428
- # Fetch current data contract, execute tests on production, and publish result to open telemetry
1429
- $ EXPORT OTEL_SERVICE_NAME=datacontract-cli
1430
- $ EXPORT OTEL_EXPORTER_OTLP_ENDPOINT=https://YOUR_ID.apm.westeurope.azure.elastic-cloud.com:443
1431
- $ EXPORT OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer%20secret # Optional, when using SaaS Products
1432
- $ EXPORT OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf # Optional, default is http/protobuf - use value grpc to use the gRPC protocol instead
1433
- # Send to OpenTelemetry
1434
- $ datacontract test https://demo.datamesh-manager.com/demo279750347121/datacontracts/4df9d6ee-e55d-4088-9598-b635b2fdcbbc/datacontract.yaml --server production --publish-to-opentelemetry
1435
- ```
1436
-
1437
- Current limitations:
1438
- - currently, only ConsoleExporter and OTLP Exporter
1439
- - Metrics only, no logs yet (but loosely planned)
1440
-
1441
-
1442
1426
  ## Best Practices
1443
1427
 
1444
1428
  We share best practices in using the Data Contract CLI.
@@ -1470,7 +1454,7 @@ Create a data contract based on the actual data. This is the fastest way to get
1470
1454
  $ datacontract lint
1471
1455
  ```
1472
1456
 
1473
- 5. Set up a CI pipeline that executes daily and reports the results to the [Data Mesh Manager](https://datamesh-manager.com). Or to some place else. You can even publish to any opentelemetry compatible system.
1457
+ 5. Set up a CI pipeline that executes daily for continuous quality checks. You can also report the test results to tools like [Data Mesh Manager](https://datamesh-manager.com)
1474
1458
  ```bash
1475
1459
  $ datacontract test --publish https://api.datamesh-manager.com/api/test-results
1476
1460
  ```
@@ -25,7 +25,7 @@ This data contract contains all information to connect to S3 and check that the
25
25
 
26
26
  Let's use [pip](https://pip.pypa.io/en/stable/getting-started/) to install the CLI (or use the [Docker image](#docker)),
27
27
  ```bash
28
- $ python3 -m pip install datacontract-cli[all]
28
+ $ python3 -m pip install 'datacontract-cli[all]'
29
29
  ```
30
30
 
31
31
 
@@ -150,13 +150,13 @@ Choose the most appropriate installation method for your needs:
150
150
  Python 3.10, 3.11, and 3.12 are supported. We recommend to use Python 3.11.
151
151
 
152
152
  ```bash
153
- python3 -m pip install datacontract-cli[all]
153
+ python3 -m pip install 'datacontract-cli[all]'
154
154
  ```
155
155
 
156
156
  ### pipx
157
157
  pipx installs into an isolated environment.
158
158
  ```bash
159
- pipx install datacontract-cli[all]
159
+ pipx install 'datacontract-cli[all]'
160
160
  ```
161
161
 
162
162
  ### Docker
@@ -221,6 +221,7 @@ Commands
221
221
  - [diff](#diff)
222
222
  - [catalog](#catalog)
223
223
  - [publish](#publish)
224
+ - [serve](#serve)
224
225
 
225
226
  ### init
226
227
 
@@ -285,9 +286,6 @@ Commands
285
286
  │ [default: no-examples] │
286
287
  │ --publish TEXT The url to publish the results after the test │
287
288
  │ [default: None] │
288
- │ --publish-to-opentelemetry --no-publish-to-opentelemetry Publish the results to opentelemetry. Use environment │
289
- │ variables to configure the OTLP endpoint, headers, etc. │
290
- │ [default: no-publish-to-opentelemetry] │
291
289
  │ --logs --no-logs Print logs [default: no-logs] │
292
290
  │ --help Show this message and exit. │
293
291
  ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -512,7 +510,6 @@ datacontract.yaml
512
510
  servers:
513
511
  production:
514
512
  type: databricks
515
- host: dbc-abcdefgh-1234.cloud.databricks.com
516
513
  catalog: acme_catalog_prod
517
514
  schema: orders_latest
518
515
  models:
@@ -523,10 +520,11 @@ models:
523
520
 
524
521
  #### Environment Variables
525
522
 
526
- | Environment Variable | Example | Description |
527
- |----------------------------------------------|--------------------------------------|-------------------------------------------------------|
528
- | `DATACONTRACT_DATABRICKS_TOKEN` | `dapia00000000000000000000000000000` | The personal access token to authenticate |
529
- | `DATACONTRACT_DATABRICKS_HTTP_PATH` | `/sql/1.0/warehouses/b053a3ffffffff` | The HTTP path to the SQL warehouse or compute cluster |
523
+ | Environment Variable | Example | Description |
524
+ |-------------------------------------------|--------------------------------------|-----------------------------------------------------------|
525
+ | `DATACONTRACT_DATABRICKS_TOKEN` | `dapia00000000000000000000000000000` | The personal access token to authenticate |
526
+ | `DATACONTRACT_DATABRICKS_HTTP_PATH` | `/sql/1.0/warehouses/b053a3ffffffff` | The HTTP path to the SQL warehouse or compute cluster |
527
+ | `DATACONTRACT_DATABRICKS_SERVER_HOSTNAME` | `dbc-abcdefgh-1234.cloud.databricks.com` | The host name of the SQL warehouse or compute cluster |
530
528
 
531
529
 
532
530
  ### Databricks (programmatic)
@@ -761,7 +759,7 @@ models:
761
759
  │ t-staging-sql|odcs|odcs_v2|odcs_v3|rdf|avro|protobuf │
762
760
  │ |great-expectations|terraform|avro-idl|sql|sql-query │
763
761
  │ |html|go|bigquery|dbml|spark|sqlalchemy|data-caterer │
764
- │ |dcs|iceberg]
762
+ │ |dcs|markdown|iceberg]
765
763
  │ --output PATH Specify the file path where the exported data will be │
766
764
  │ saved. If no path is provided, the output will be │
767
765
  │ printed to stdout. │
@@ -822,6 +820,7 @@ Available export options:
822
820
  | `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
823
821
  | `data-caterer` | Export to Data Caterer in YAML format | ✅ |
824
822
  | `dcs` | Export to Data Contract Specification in YAML format | ✅ |
823
+ | `markdown` | Export to Markdown | ✅ |
825
824
  | `iceberg` | Export to an Iceberg JSON Schema Definition | partial |
826
825
  | Missing something? | Please create an issue on GitHub | TBD |
827
826
 
@@ -1309,13 +1308,28 @@ datacontract catalog --files "*.odcs.yaml"
1309
1308
  ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
1310
1309
  ```
1311
1310
 
1311
+ ### Serve
1312
+
1313
+ ```
1314
+
1315
+ Usage: datacontract serve [OPTIONS]
1316
+
1317
+ Start the datacontract web server.
1318
+
1319
+ ╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
1320
+ │ --port INTEGER Bind socket to this port. [default: 4242] │
1321
+ │ --host TEXT Bind socket to this host. [default: 127.0.0.1] │
1322
+ │ --help Show this message and exit. │
1323
+ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
1324
+
1325
+ ```
1326
+
1312
1327
  ## Integrations
1313
1328
 
1314
1329
  | Integration | Option | Description |
1315
1330
  |-----------------------|------------------------------|---------------------------------------------------------------------------------------------------------------|
1316
1331
  | Data Mesh Manager | `--publish` | Push full results to the [Data Mesh Manager API](https://api.datamesh-manager.com/swagger/index.html) |
1317
1332
  | Data Contract Manager | `--publish` | Push full results to the [Data Contract Manager API](https://api.datacontract-manager.com/swagger/index.html) |
1318
- | OpenTelemetry | `--publish-to-opentelemetry` | Push result as gauge metrics |
1319
1333
 
1320
1334
  ### Integration with Data Mesh Manager
1321
1335
 
@@ -1329,36 +1343,6 @@ $ datacontract test https://demo.datamesh-manager.com/demo279750347121/datacontr
1329
1343
  --publish https://api.datamesh-manager.com/api/test-results
1330
1344
  ```
1331
1345
 
1332
- ### Integration with OpenTelemetry
1333
-
1334
- If you use OpenTelemetry, you can use the data contract URL and append the `--publish-to-opentelemetry` option to send the test results to your OLTP-compatible instance, e.g., Prometheus.
1335
-
1336
- The metric name is "datacontract.cli.test.result" and it uses the following encoding for the result:
1337
-
1338
- | datacontract.cli.test.result | Description |
1339
- |------------------------------|---------------------------------------|
1340
- | 0 | test run passed, no warnings |
1341
- | 1 | test run has warnings |
1342
- | 2 | test run failed |
1343
- | 3 | test run not possible due to an error |
1344
- | 4 | test status unknown |
1345
-
1346
-
1347
- ```bash
1348
- # Fetch current data contract, execute tests on production, and publish result to open telemetry
1349
- $ EXPORT OTEL_SERVICE_NAME=datacontract-cli
1350
- $ EXPORT OTEL_EXPORTER_OTLP_ENDPOINT=https://YOUR_ID.apm.westeurope.azure.elastic-cloud.com:443
1351
- $ EXPORT OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer%20secret # Optional, when using SaaS Products
1352
- $ EXPORT OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf # Optional, default is http/protobuf - use value grpc to use the gRPC protocol instead
1353
- # Send to OpenTelemetry
1354
- $ datacontract test https://demo.datamesh-manager.com/demo279750347121/datacontracts/4df9d6ee-e55d-4088-9598-b635b2fdcbbc/datacontract.yaml --server production --publish-to-opentelemetry
1355
- ```
1356
-
1357
- Current limitations:
1358
- - currently, only ConsoleExporter and OTLP Exporter
1359
- - Metrics only, no logs yet (but loosely planned)
1360
-
1361
-
1362
1346
  ## Best Practices
1363
1347
 
1364
1348
  We share best practices in using the Data Contract CLI.
@@ -1390,7 +1374,7 @@ Create a data contract based on the actual data. This is the fastest way to get
1390
1374
  $ datacontract lint
1391
1375
  ```
1392
1376
 
1393
- 5. Set up a CI pipeline that executes daily and reports the results to the [Data Mesh Manager](https://datamesh-manager.com). Or to some place else. You can even publish to any opentelemetry compatible system.
1377
+ 5. Set up a CI pipeline that executes daily for continuous quality checks. You can also report the test results to tools like [Data Mesh Manager](https://datamesh-manager.com)
1394
1378
  ```bash
1395
1379
  $ datacontract test --publish https://api.datamesh-manager.com/api/test-results
1396
1380
  ```
@@ -42,6 +42,10 @@ class BreakingRules:
42
42
  field_primary_removed = Severity.WARNING
43
43
  field_primary_updated = Severity.WARNING
44
44
 
45
+ field_primary_key_added = Severity.WARNING
46
+ field_primary_key_removed = Severity.WARNING
47
+ field_primary_key_updated = Severity.WARNING
48
+
45
49
  field_references_added = Severity.WARNING
46
50
  field_references_removed = Severity.WARNING
47
51
  field_references_updated = Severity.WARNING
@@ -132,13 +132,11 @@ def test(
132
132
  typer.Option(help="Run the schema and quality tests on the example data within the data contract."),
133
133
  ] = None,
134
134
  publish: Annotated[str, typer.Option(help="The url to publish the results after the test")] = None,
135
- publish_to_opentelemetry: Annotated[
136
- bool,
137
- typer.Option(
138
- help="Publish the results to opentelemetry. Use environment variables to configure the OTLP endpoint, headers, etc."
139
- ),
140
- ] = False,
141
135
  logs: Annotated[bool, typer.Option(help="Print logs")] = False,
136
+ ssl_verification: Annotated[
137
+ bool,
138
+ typer.Option(help="SSL verification when publishing the test results."),
139
+ ] = True,
142
140
  ):
143
141
  """
144
142
  Run schema and quality tests on configured servers.
@@ -150,7 +148,6 @@ def test(
150
148
  data_contract_file=location,
151
149
  schema_location=schema,
152
150
  publish_url=publish,
153
- publish_to_opentelemetry=publish_to_opentelemetry,
154
151
  server=server,
155
152
  examples=examples,
156
153
  ).test()
@@ -280,6 +277,14 @@ def import_(
280
277
  Optional[str],
281
278
  typer.Option(help="Table name to assign to the model created from the Iceberg schema."),
282
279
  ] = None,
280
+ template: Annotated[
281
+ Optional[str],
282
+ typer.Option(help="The location (url or path) of the Data Contract Specification Template"),
283
+ ] = None,
284
+ schema: Annotated[
285
+ str,
286
+ typer.Option(help="The location (url or path) of the Data Contract Specification JSON Schema"),
287
+ ] = DEFAULT_DATA_CONTRACT_SCHEMA_URL,
283
288
  ):
284
289
  """
285
290
  Create a data contract from the given source location. Saves to file specified by `output` option if present, otherwise prints to stdout.
@@ -287,6 +292,8 @@ def import_(
287
292
  result = DataContract().import_from_source(
288
293
  format=format,
289
294
  source=source,
295
+ template=template,
296
+ schema=schema,
290
297
  glue_table=glue_table,
291
298
  bigquery_table=bigquery_table,
292
299
  bigquery_project=bigquery_project,
@@ -315,6 +322,10 @@ def publish(
315
322
  str,
316
323
  typer.Option(help="The location (url or path) of the Data Contract Specification JSON Schema"),
317
324
  ] = DEFAULT_DATA_CONTRACT_SCHEMA_URL,
325
+ ssl_verification: Annotated[
326
+ bool,
327
+ typer.Option(help="SSL verification when publishing the data contract."),
328
+ ] = True,
318
329
  ):
319
330
  """
320
331
  Publish the data contract to the Data Mesh Manager.
@@ -323,6 +334,7 @@ def publish(
323
334
  data_contract_specification=DataContract(
324
335
  data_contract_file=location, schema_location=schema
325
336
  ).get_data_contract_specification(),
337
+ ssl_verification=ssl_verification,
326
338
  )
327
339
 
328
340
 
@@ -447,6 +459,18 @@ def _handle_result(run):
447
459
  console.print(
448
460
  f"🟢 data contract is valid. Run {len(run.checks)} checks. Took {(run.timestampEnd - run.timestampStart).total_seconds()} seconds."
449
461
  )
462
+ elif run.result == "warning":
463
+ console.print("🟠 data contract has warnings. Found the following warnings:")
464
+ i = 1
465
+ for check in run.checks:
466
+ if check.result != "passed":
467
+ field = to_field(run, check)
468
+ if field:
469
+ field = field + " "
470
+ else:
471
+ field = ""
472
+ console.print(f"{i}) {field}{check.name}: {check.reason}")
473
+ i += 1
450
474
  else:
451
475
  console.print("🔴 data contract is invalid, found the following errors:")
452
476
  i = 1
@@ -23,7 +23,6 @@ from datacontract.export.exporter import ExportFormat
23
23
  from datacontract.export.exporter_factory import exporter_factory
24
24
  from datacontract.imports.importer_factory import importer_factory
25
25
  from datacontract.integration.datamesh_manager import publish_test_results_to_datamesh_manager
26
- from datacontract.integration.opentelemetry import publish_test_results_to_opentelemetry
27
26
  from datacontract.lint import resolve
28
27
  from datacontract.lint.linters.description_linter import DescriptionLinter
29
28
  from datacontract.lint.linters.example_model_linter import ExampleModelLinter
@@ -37,6 +36,8 @@ from datacontract.model.data_contract_specification import DataContractSpecifica
37
36
  from datacontract.model.exceptions import DataContractException
38
37
  from datacontract.model.run import Check, Run
39
38
 
39
+ DEFAULT_DATA_CONTRACT_TEMPLATE_URL = "https://datacontract.com/datacontract.init.yaml"
40
+
40
41
 
41
42
  class DataContract:
42
43
  def __init__(
@@ -48,7 +49,6 @@ class DataContract:
48
49
  server: str = None,
49
50
  examples: bool = False,
50
51
  publish_url: str = None,
51
- publish_to_opentelemetry: bool = False,
52
52
  spark: "SparkSession" = None,
53
53
  inline_definitions: bool = True,
54
54
  inline_quality: bool = True,
@@ -60,7 +60,6 @@ class DataContract:
60
60
  self._server = server
61
61
  self._examples = examples
62
62
  self._publish_url = publish_url
63
- self._publish_to_opentelemetry = publish_to_opentelemetry
64
63
  self._spark = spark
65
64
  self._inline_definitions = inline_definitions
66
65
  self._inline_quality = inline_quality
@@ -75,8 +74,10 @@ class DataContract:
75
74
  }
76
75
 
77
76
  @classmethod
78
- def init(cls, template: str = "https://datacontract.com/datacontract.init.yaml") -> DataContractSpecification:
79
- return resolve.resolve_data_contract(data_contract_location=template)
77
+ def init(
78
+ cls, template: str = DEFAULT_DATA_CONTRACT_TEMPLATE_URL, schema: typing.Optional[str] = None
79
+ ) -> DataContractSpecification:
80
+ return resolve.resolve_data_contract(data_contract_location=template, schema_location=schema)
80
81
 
81
82
  def lint(self, enabled_linters: typing.Union[str, set[str]] = "all") -> Run:
82
83
  """Lint the data contract by deserializing the contract and checking the schema, as well as calling the configured linters.
@@ -232,9 +233,6 @@ class DataContract:
232
233
  if self._publish_url is not None:
233
234
  publish_test_results_to_datamesh_manager(run, self._publish_url)
234
235
 
235
- if self._publish_to_opentelemetry:
236
- publish_test_results_to_opentelemetry(run)
237
-
238
236
  return run
239
237
 
240
238
  def _get_examples_server(self, data_contract, run, tmp_dir):
@@ -347,9 +345,15 @@ class DataContract:
347
345
  )
348
346
 
349
347
  def import_from_source(
350
- self, format: str, source: typing.Optional[str] = None, **kwargs
348
+ self,
349
+ format: str,
350
+ source: typing.Optional[str] = None,
351
+ template: typing.Optional[str] = None,
352
+ schema: typing.Optional[str] = None,
353
+ **kwargs,
351
354
  ) -> DataContractSpecification:
352
- data_contract_specification_initial = DataContract.init()
355
+ template = DEFAULT_DATA_CONTRACT_TEMPLATE_URL if template is None else template
356
+ data_contract_specification_initial = DataContract.init(template=template, schema=schema)
353
357
 
354
358
  return importer_factory.create(format).import_source(
355
359
  data_contract_specification=data_contract_specification_initial, source=source, import_args=kwargs
@@ -11,7 +11,7 @@ from datacontract.engines.fastjsonschema.s3.s3_read_files import yield_s3_files
11
11
  from datacontract.export.jsonschema_converter import to_jsonschema
12
12
  from datacontract.model.data_contract_specification import DataContractSpecification, Server
13
13
  from datacontract.model.exceptions import DataContractException
14
- from datacontract.model.run import Check, Run
14
+ from datacontract.model.run import Check, ResultEnum, Run
15
15
 
16
16
  # Thread-safe cache for primaryKey fields.
17
17
  _primary_key_cache = {}
@@ -256,18 +256,29 @@ def check_jsonschema(run: Run, data_contract: DataContractSpecification, server:
256
256
  type="schema",
257
257
  name="Check that JSON has valid schema",
258
258
  model=model_name,
259
- result="info",
259
+ result=ResultEnum.info,
260
260
  reason="JSON Schema check skipped for GCS, as GCS is currently not supported",
261
261
  engine="jsonschema",
262
262
  )
263
263
  )
264
+ elif server.type == "azure":
265
+ run.checks.append(
266
+ Check(
267
+ type="schema",
268
+ name="Check that JSON has valid schema",
269
+ model=model_name,
270
+ result=ResultEnum.info,
271
+ reason="JSON Schema check skipped for azure, as azure is currently not supported",
272
+ engine="jsonschema",
273
+ )
274
+ )
264
275
  else:
265
276
  run.checks.append(
266
277
  Check(
267
278
  type="schema",
268
279
  name="Check that JSON has valid schema",
269
280
  model=model_name,
270
- result="warn",
281
+ result=ResultEnum.warning,
271
282
  reason=f"Server type {server.type} not supported",
272
283
  engine="jsonschema",
273
284
  )
@@ -279,7 +290,7 @@ def check_jsonschema(run: Run, data_contract: DataContractSpecification, server:
279
290
  type="schema",
280
291
  name="Check that JSON has valid schema",
281
292
  model=model_name,
282
- result="passed",
293
+ result=ResultEnum.passed,
283
294
  reason="All JSON entries are valid.",
284
295
  engine="jsonschema",
285
296
  )