datacontract-cli 0.11.7__tar.gz → 0.11.8__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.
Files changed (238) hide show
  1. {datacontract_cli-0.11.7/datacontract_cli.egg-info → datacontract_cli-0.11.8}/PKG-INFO +326 -138
  2. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/README.md +313 -125
  3. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/api.py +51 -1
  4. datacontract_cli-0.11.8/datacontract/changelog/__init__.py +3 -0
  5. datacontract_cli-0.11.8/datacontract/changelog/changelog.py +191 -0
  6. datacontract_cli-0.11.8/datacontract/changelog/normalize.py +208 -0
  7. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/cli.py +125 -5
  8. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/data_contract.py +53 -1
  9. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/bigquery_exporter.py +1 -90
  10. datacontract_cli-0.11.8/datacontract/export/custom_exporter.py +49 -0
  11. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/markdown_exporter.py +12 -3
  12. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/sql_exporter.py +17 -4
  13. datacontract_cli-0.11.8/datacontract/export/sql_type_converter.py +818 -0
  14. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/avro_importer.py +11 -0
  15. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/dbt_importer.py +1 -1
  16. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/sql_importer.py +5 -1
  17. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/lint/resolve.py +37 -22
  18. datacontract_cli-0.11.8/datacontract/model/changelog.py +29 -0
  19. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/model/exceptions.py +16 -0
  20. datacontract_cli-0.11.8/datacontract/output/ci_output.py +153 -0
  21. datacontract_cli-0.11.8/datacontract/output/text_changelog_results.py +93 -0
  22. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8/datacontract_cli.egg-info}/PKG-INFO +326 -138
  23. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract_cli.egg-info/SOURCES.txt +14 -0
  24. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract_cli.egg-info/requires.txt +12 -12
  25. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/pyproject.toml +13 -13
  26. datacontract_cli-0.11.8/tests/test_api.py +124 -0
  27. datacontract_cli-0.11.8/tests/test_changelog.py +58 -0
  28. datacontract_cli-0.11.8/tests/test_changelog_engine.py +837 -0
  29. datacontract_cli-0.11.8/tests/test_changelog_normalize.py +1054 -0
  30. datacontract_cli-0.11.8/tests/test_changelog_output_text.py +183 -0
  31. datacontract_cli-0.11.8/tests/test_ci_output.py +342 -0
  32. datacontract_cli-0.11.8/tests/test_cli.py +40 -0
  33. datacontract_cli-0.11.8/tests/test_data_contract.py +15 -0
  34. datacontract_cli-0.11.8/tests/test_export_custom_model.py +36 -0
  35. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_html.py +10 -0
  36. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_markdown.py +25 -0
  37. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_spark.py +2 -3
  38. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_sql.py +38 -0
  39. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_avro.py +9 -0
  40. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_lint.py +22 -0
  41. datacontract_cli-0.11.8/tests/test_sql_type_converter_physicaltype.py +289 -0
  42. datacontract_cli-0.11.7/datacontract/export/custom_exporter.py +0 -37
  43. datacontract_cli-0.11.7/datacontract/export/sql_type_converter.py +0 -663
  44. datacontract_cli-0.11.7/tests/test_api.py +0 -35
  45. datacontract_cli-0.11.7/tests/test_cli.py +0 -18
  46. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/LICENSE +0 -0
  47. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/MANIFEST.in +0 -0
  48. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/__init__.py +0 -0
  49. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/catalog/catalog.py +0 -0
  50. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/__init__.py +0 -0
  51. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/data_contract_checks.py +0 -0
  52. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/data_contract_test.py +0 -0
  53. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py +0 -0
  54. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/datacontract/check_that_datacontract_file_exists.py +0 -0
  55. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/fastjsonschema/check_jsonschema.py +0 -0
  56. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/fastjsonschema/s3/s3_read_files.py +0 -0
  57. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/soda/__init__.py +0 -0
  58. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/soda/check_soda_execute.py +0 -0
  59. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/soda/connections/athena.py +0 -0
  60. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/soda/connections/bigquery.py +0 -0
  61. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/soda/connections/databricks.py +0 -0
  62. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/soda/connections/duckdb_connection.py +0 -0
  63. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/soda/connections/impala.py +0 -0
  64. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/soda/connections/kafka.py +0 -0
  65. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/soda/connections/mysql.py +0 -0
  66. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/soda/connections/oracle.py +0 -0
  67. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/soda/connections/postgres.py +0 -0
  68. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/soda/connections/snowflake.py +0 -0
  69. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/soda/connections/sqlserver.py +0 -0
  70. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/engines/soda/connections/trino.py +0 -0
  71. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/__init__.py +0 -0
  72. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/avro_exporter.py +0 -0
  73. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/avro_idl_exporter.py +0 -0
  74. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/data_caterer_exporter.py +0 -0
  75. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/dbml_exporter.py +0 -0
  76. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/dbt_exporter.py +0 -0
  77. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/dcs_exporter.py +0 -0
  78. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/dqx_exporter.py +0 -0
  79. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/duckdb_type_converter.py +0 -0
  80. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/excel_exporter.py +0 -0
  81. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/exporter.py +0 -0
  82. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/exporter_factory.py +0 -0
  83. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/go_exporter.py +0 -0
  84. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/great_expectations_exporter.py +0 -0
  85. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/html_exporter.py +0 -0
  86. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/iceberg_exporter.py +0 -0
  87. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/jsonschema_exporter.py +0 -0
  88. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/mermaid_exporter.py +0 -0
  89. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/odcs_export_helper.py +0 -0
  90. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/odcs_v3_exporter.py +0 -0
  91. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/pandas_type_converter.py +0 -0
  92. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/protobuf_exporter.py +0 -0
  93. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/pydantic_exporter.py +0 -0
  94. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/rdf_exporter.py +0 -0
  95. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/sodacl_exporter.py +0 -0
  96. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/spark_exporter.py +0 -0
  97. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/export/sqlalchemy_exporter.py +0 -0
  98. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/bigquery_importer.py +0 -0
  99. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/csv_importer.py +0 -0
  100. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/dbml_importer.py +0 -0
  101. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/dcs_importer.py +0 -0
  102. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/excel_importer.py +0 -0
  103. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/glue_importer.py +0 -0
  104. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/iceberg_importer.py +0 -0
  105. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/importer.py +0 -0
  106. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/importer_factory.py +0 -0
  107. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/json_importer.py +0 -0
  108. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/jsonschema_importer.py +0 -0
  109. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/odcs_helper.py +0 -0
  110. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/odcs_importer.py +0 -0
  111. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/parquet_importer.py +0 -0
  112. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/protobuf_importer.py +0 -0
  113. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/spark_importer.py +0 -0
  114. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/imports/unity_importer.py +0 -0
  115. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/init/init_template.py +0 -0
  116. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/integration/entropy_data.py +0 -0
  117. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/lint/files.py +0 -0
  118. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/lint/resources.py +0 -0
  119. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/lint/schema.py +0 -0
  120. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/lint/urls.py +0 -0
  121. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/model/odcs.py +0 -0
  122. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/model/run.py +0 -0
  123. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/output/__init__.py +0 -0
  124. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/output/json_test_results.py +0 -0
  125. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/output/junit_test_results.py +0 -0
  126. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/output/output_format.py +0 -0
  127. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/output/test_results_writer.py +0 -0
  128. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/py.typed +0 -0
  129. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/schemas/datacontract-1.1.0.init.yaml +0 -0
  130. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/schemas/datacontract-1.1.0.schema.json +0 -0
  131. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/schemas/datacontract-1.2.0.init.yaml +0 -0
  132. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/schemas/datacontract-1.2.0.schema.json +0 -0
  133. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/schemas/datacontract-1.2.1.init.yaml +0 -0
  134. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/schemas/datacontract-1.2.1.schema.json +0 -0
  135. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/schemas/odcs-3.0.1.schema.json +0 -0
  136. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/schemas/odcs-3.0.2.schema.json +0 -0
  137. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/schemas/odcs-3.1.0.init.yaml +0 -0
  138. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/schemas/odcs-3.1.0.schema.json +0 -0
  139. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/templates/datacontract.html +0 -0
  140. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/templates/datacontract_odcs.html +0 -0
  141. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/templates/index.html +0 -0
  142. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/templates/partials/datacontract_information.html +0 -0
  143. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/templates/partials/datacontract_servicelevels.html +0 -0
  144. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/templates/partials/datacontract_terms.html +0 -0
  145. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/templates/partials/definition.html +0 -0
  146. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/templates/partials/example.html +0 -0
  147. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/templates/partials/model_field.html +0 -0
  148. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/templates/partials/quality.html +0 -0
  149. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/templates/partials/server.html +0 -0
  150. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract/templates/style/output.css +0 -0
  151. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract_cli.egg-info/dependency_links.txt +0 -0
  152. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract_cli.egg-info/entry_points.txt +0 -0
  153. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/datacontract_cli.egg-info/top_level.txt +0 -0
  154. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/setup.cfg +0 -0
  155. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_bigquery_soda_connection.py +0 -0
  156. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_catalog.py +0 -0
  157. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_data_contract_checks.py +0 -0
  158. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_data_contract_specification.py +0 -0
  159. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_description_linter.py +0 -0
  160. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_download_datacontract_file.py +0 -0
  161. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_duckdb_json.py +0 -0
  162. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_avro.py +0 -0
  163. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_avro_idl.py +0 -0
  164. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_bigquery.py +0 -0
  165. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_complex_data_contract.py +0 -0
  166. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_custom.py +0 -0
  167. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_custom_exporter.py +0 -0
  168. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_data_caterer.py +0 -0
  169. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_dbml.py +0 -0
  170. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_dbt_models.py +0 -0
  171. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_dbt_sources.py +0 -0
  172. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_dbt_staging_sql.py +0 -0
  173. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_dqx.py +0 -0
  174. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_excel.py +0 -0
  175. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_go.py +0 -0
  176. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_great_expectations.py +0 -0
  177. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_iceberg.py +0 -0
  178. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_jsonschema.py +0 -0
  179. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_mermaid.py +0 -0
  180. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_odcs_v3.py +0 -0
  181. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_protobuf.py +0 -0
  182. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_pydantic.py +0 -0
  183. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_rdf.py +0 -0
  184. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_sodacl.py +0 -0
  185. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_sql_query.py +0 -0
  186. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_export_sqlalchemy.py +0 -0
  187. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_bigquery.py +0 -0
  188. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_csv.py +0 -0
  189. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_dbml.py +0 -0
  190. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_dbt.py +0 -0
  191. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_excel.py +0 -0
  192. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_glue.py +0 -0
  193. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_iceberg.py +0 -0
  194. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_json.py +0 -0
  195. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_jsonschema.py +0 -0
  196. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_odcs_v3.py +0 -0
  197. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_parquet.py +0 -0
  198. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_protobuf.py +0 -0
  199. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_spark.py +0 -0
  200. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_sql_oracle.py +0 -0
  201. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_sql_postgres.py +0 -0
  202. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_sql_snowflake.py +0 -0
  203. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_sql_sqlserver.py +0 -0
  204. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_import_unity_file.py +0 -0
  205. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_integration_entropydata.py +0 -0
  206. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_resolve.py +0 -0
  207. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_roundtrip_jsonschema.py +0 -0
  208. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_sqlserver_soda_connection.py +0 -0
  209. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_api.py +0 -0
  210. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_athena_iceberg.py +0 -0
  211. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_azure_remote.py +0 -0
  212. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_bigquery.py +0 -0
  213. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_databricks.py +0 -0
  214. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_dataframe.py +0 -0
  215. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_delta.py +0 -0
  216. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_gcs_csv_remote.py +0 -0
  217. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_gcs_json_remote.py +0 -0
  218. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_kafka.py +0 -0
  219. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_kafka_remote.py +0 -0
  220. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_local_json.py +0 -0
  221. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_local_json_nd.py +0 -0
  222. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_mysql.py +0 -0
  223. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_oracle.py +0 -0
  224. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_output_json.py +0 -0
  225. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_output_junit.py +0 -0
  226. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_parquet.py +0 -0
  227. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_postgres.py +0 -0
  228. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_quality.py +0 -0
  229. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_s3_csv.py +0 -0
  230. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_s3_delta.py +0 -0
  231. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_s3_json.py +0 -0
  232. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_s3_json_complex.py +0 -0
  233. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_s3_json_multiple_models.py +0 -0
  234. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_s3_json_remote.py +0 -0
  235. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_schema_evolution.py +0 -0
  236. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_snowflake.py +0 -0
  237. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_sqlserver.py +0 -0
  238. {datacontract_cli-0.11.7 → datacontract_cli-0.11.8}/tests/test_test_trino.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datacontract-cli
3
- Version: 0.11.7
3
+ Version: 0.11.8
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
  License-Expression: MIT
@@ -14,12 +14,13 @@ License-File: LICENSE
14
14
  Requires-Dist: typer<0.25,>=0.18.0
15
15
  Requires-Dist: pydantic<2.13.0,>=2.8.2
16
16
  Requires-Dist: pyyaml~=6.0.1
17
- Requires-Dist: requests<2.33,>=2.31
17
+ Requires-Dist: requests<2.34,>=2.31
18
18
  Requires-Dist: fastjsonschema<2.22.0,>=2.19.1
19
+ Requires-Dist: jsonschema<5.0.0,>=4.23.0
19
20
  Requires-Dist: pytz>=2024.1
20
21
  Requires-Dist: python-multipart<1.0.0,>=0.0.20
21
22
  Requires-Dist: rich<15.0,>=13.7
22
- Requires-Dist: sqlglot<29.0.0,>=26.6.0
23
+ Requires-Dist: sqlglot<31.0.0,>=26.6.0
23
24
  Requires-Dist: setuptools>=60
24
25
  Requires-Dist: python-dotenv<2.0.0,>=1.0.0
25
26
  Requires-Dist: boto3<2.0.0,>=1.34.41
@@ -27,6 +28,7 @@ Requires-Dist: Jinja2<4.0.0,>=3.1.5
27
28
  Requires-Dist: jinja_partials<1.0.0,>=0.2.1
28
29
  Requires-Dist: datacontract-specification<2.0.0,>=1.2.3
29
30
  Requires-Dist: open-data-contract-standard<4.0.0,>=3.1.2
31
+ Requires-Dist: deepdiff<9.0.0,>=6.0.0
30
32
  Provides-Extra: avro
31
33
  Requires-Dist: avro==1.12.1; extra == "avro"
32
34
  Provides-Extra: bigquery
@@ -39,16 +41,14 @@ Provides-Extra: databricks
39
41
  Requires-Dist: soda-core-spark-df<3.6.0,>=3.3.20; extra == "databricks"
40
42
  Requires-Dist: soda-core-spark[databricks]<3.6.0,>=3.3.20; extra == "databricks"
41
43
  Requires-Dist: databricks-sql-connector<4.3.0,>=3.7.0; extra == "databricks"
42
- Requires-Dist: databricks-sdk<0.86.0; extra == "databricks"
44
+ Requires-Dist: databricks-sdk<0.103.0; extra == "databricks"
43
45
  Requires-Dist: pyspark<5.0.0,>=3.5.0; extra == "databricks"
44
- Requires-Dist: numpy<2.0.0,>=1.26.4; extra == "databricks"
45
46
  Provides-Extra: iceberg
46
- Requires-Dist: pyiceberg==0.11.0; extra == "iceberg"
47
+ Requires-Dist: pyiceberg==0.11.1; extra == "iceberg"
47
48
  Provides-Extra: kafka
48
49
  Requires-Dist: datacontract-cli[avro]; extra == "kafka"
49
50
  Requires-Dist: soda-core-spark-df<3.6.0,>=3.3.20; extra == "kafka"
50
51
  Requires-Dist: pyspark<5.0.0,>=3.5.0; extra == "kafka"
51
- Requires-Dist: numpy<2.0.0,>=1.26.4; extra == "kafka"
52
52
  Provides-Extra: mysql
53
53
  Requires-Dist: soda-core-mysql<3.6.0,>=3.3.20; extra == "mysql"
54
54
  Requires-Dist: mysql-connector-python<10.0.0,>=8.0.30; extra == "mysql"
@@ -56,7 +56,7 @@ Provides-Extra: postgres
56
56
  Requires-Dist: soda-core-postgres<3.6.0,>=3.3.20; extra == "postgres"
57
57
  Provides-Extra: s3
58
58
  Requires-Dist: s3fs<2027.0.0,>=2025.2.0; extra == "s3"
59
- Requires-Dist: aiobotocore<3.2.0,>=2.17.0; extra == "s3"
59
+ Requires-Dist: aiobotocore<3.4.0,>=2.17.0; extra == "s3"
60
60
  Provides-Extra: snowflake
61
61
  Requires-Dist: snowflake-connector-python[pandas]<4.4,>=3.6; extra == "snowflake"
62
62
  Requires-Dist: soda-core-snowflake<3.6.0,>=3.3.20; extra == "snowflake"
@@ -73,15 +73,15 @@ Requires-Dist: dbt-core>=1.8.0; extra == "dbt"
73
73
  Provides-Extra: dbml
74
74
  Requires-Dist: pydbml>=1.1.1; extra == "dbml"
75
75
  Provides-Extra: duckdb
76
- Requires-Dist: duckdb<1.5.0,>=1.0.0; extra == "duckdb"
76
+ Requires-Dist: duckdb<1.6.0,>=1.0.0; extra == "duckdb"
77
77
  Requires-Dist: soda-core-duckdb<3.6.0,>=3.3.20; extra == "duckdb"
78
78
  Provides-Extra: parquet
79
79
  Requires-Dist: pyarrow>=18.1.0; extra == "parquet"
80
80
  Provides-Extra: rdf
81
81
  Requires-Dist: rdflib==7.6.0; extra == "rdf"
82
82
  Provides-Extra: api
83
- Requires-Dist: fastapi==0.129.0; extra == "api"
84
- Requires-Dist: uvicorn==0.40.0; extra == "api"
83
+ Requires-Dist: fastapi==0.135.3; extra == "api"
84
+ Requires-Dist: uvicorn==0.44.0; extra == "api"
85
85
  Provides-Extra: protobuf
86
86
  Requires-Dist: grpcio-tools>=1.53; extra == "protobuf"
87
87
  Provides-Extra: all
@@ -97,9 +97,9 @@ Requires-Dist: pre-commit<4.6.0,>=3.7.1; extra == "dev"
97
97
  Requires-Dist: pytest; extra == "dev"
98
98
  Requires-Dist: pytest-xdist; extra == "dev"
99
99
  Requires-Dist: pymssql==2.3.13; extra == "dev"
100
- Requires-Dist: ruff==0.15.2; extra == "dev"
100
+ Requires-Dist: ruff==0.15.7; extra == "dev"
101
101
  Requires-Dist: testcontainers[kafka,minio,mssql,mysql,postgres]==4.14.1; extra == "dev"
102
- Requires-Dist: trino==0.336.0; extra == "dev"
102
+ Requires-Dist: trino==0.337.0; extra == "dev"
103
103
  Dynamic: license-file
104
104
 
105
105
  # Data Contract CLI
@@ -107,6 +107,8 @@ Dynamic: license-file
107
107
  <p>
108
108
  <a href="https://github.com/datacontract/datacontract-cli/actions/workflows/ci.yaml?query=branch%3Amain">
109
109
  <img alt="Test Workflow" src="https://img.shields.io/github/actions/workflow/status/datacontract/datacontract-cli/ci.yaml?branch=main"></a>
110
+ <a href="https://pypi.org/project/datacontract-cli/">
111
+ <img alt="PyPI Version" src="https://img.shields.io/pypi/v/datacontract-cli" /></a>
110
112
  <a href="https://github.com/datacontract/datacontract-cli">
111
113
  <img alt="Stars" src="https://img.shields.io/github/stars/datacontract/datacontract-cli" /></a>
112
114
  <a href="https://datacontract.com/slack" rel="nofollow"><img src="https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&amp;style=social" alt="Slack Status" data-canonical-src="https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&amp;style=social" style="max-width: 100%;"></a>
@@ -119,6 +121,7 @@ It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a P
119
121
 
120
122
  ![Main features of the Data Contract CLI](datacontractcli.png)
121
123
 
124
+ > **Quick navigation:** [Documentation](#documentation) · [Best Practices](#best-practices) · [Custom Export and Import](#customizing-exporters-and-importers) · [Development Setup](#development-setup)
122
125
 
123
126
  ## Getting started
124
127
 
@@ -218,9 +221,12 @@ $ datacontract export --format html --output orders-v1.odcs.html https://datacon
218
221
  # create a new data contract from example and write it to odcs.yaml
219
222
  $ datacontract init odcs.yaml
220
223
 
221
- # lint the odcs.yaml
224
+ # lint the odcs.yaml and stop after the first validation error (default).
222
225
  $ datacontract lint odcs.yaml
223
226
 
227
+ # show a changelog between two data contracts
228
+ $ datacontract changelog v1.odcs.yaml v2.odcs.yaml
229
+
224
230
  # execute schema and quality checks (define credentials as environment variables)
225
231
  $ datacontract test odcs.yaml
226
232
 
@@ -364,7 +370,9 @@ Commands
364
370
 
365
371
  - [init](#init)
366
372
  - [lint](#lint)
373
+ - [changelog](#changelog)
367
374
  - [test](#test)
375
+ - [ci](#ci)
368
376
  - [export](#export)
369
377
  - [import](#import)
370
378
  - [catalog](#catalog)
@@ -394,37 +402,64 @@ Commands
394
402
  ```
395
403
 
396
404
  ### lint
405
+ ```
406
+
407
+ Usage: datacontract lint [OPTIONS] [LOCATION]
408
+
409
+ Validate that the datacontract.yaml is correctly formatted.
410
+
411
+ ╭─ Arguments ──────────────────────────────────────────────────────────────────╮
412
+ │ location [LOCATION] The location (url or path) of the data contract │
413
+ │ yaml. │
414
+ │ [default: datacontract.yaml] │
415
+ ╰──────────────────────────────────────────────────────────────────────────────╯
416
+ ╭─ Options ────────────────────────────────────────────────────────────────────╮
417
+ │ --schema TEXT The location (url or path) of │
418
+ │ the ODCS JSON Schema │
419
+ │ --output PATH Specify the file path where │
420
+ │ the test results should be │
421
+ │ written to (e.g., │
422
+ │ './test-results/TEST-datacon… │
423
+ │ If no path is provided, the │
424
+ │ output will be printed to │
425
+ │ stdout. │
426
+ │ --output-format [json|junit] The target format for the │
427
+ │ test results. │
428
+ │ --all-errors Report all JSON Schema │
429
+ │ validation errors instead of │
430
+ │ stopping after the first one. │
431
+ │ --debug --no-debug Enable debug logging │
432
+ │ --help Show this message and exit. │
433
+ ╰──────────────────────────────────────────────────────────────────────────────╯
434
+
435
+ ```
436
+
437
+ ### changelog
397
438
  ```
398
439
 
399
- Usage: datacontract lint [OPTIONS] [LOCATION]
400
-
401
- Validate that the datacontract.yaml is correctly formatted.
440
+ Usage: datacontract changelog [OPTIONS] V1 V2
402
441
 
442
+ Show a changelog between two data contracts.
403
443
 
404
444
  ╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────╮
405
- location [LOCATION] The location (url or path) of the data contract yaml.
406
- [default: datacontract.yaml]
445
+ * v1 TEXT The location (path) of the source (before) data contract YAML. [required]
446
+ * v2 TEXT The location (path) of the target (after) data contract YAML. [required]
407
447
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
408
448
  ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
409
- │ --schema TEXT The location (url or path) of the ODCS JSON Schema
410
- [default: None]
411
- │ --output PATH Specify the file path where the test results should be │
412
- │ written to (e.g., │
413
- │ './test-results/TEST-datacontract.xml'). If no path is │
414
- │ provided, the output will be printed to stdout. │
415
- │ [default: None] │
416
- │ --output-format [junit] The target format for the test results. │
417
- │ [default: None] │
418
- │ --debug --no-debug Enable debug logging [default: no-debug] │
419
- │ --help Show this message and exit. │
449
+ │ --debug --no-debug Enable debug logging
450
+ --help Show this message and exit.
420
451
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
421
452
 
422
453
  ```
423
454
 
455
+ ```bash
456
+ $ datacontract changelog v1.odcs.yaml v2.odcs.yaml
457
+ ```
458
+
424
459
  ### test
425
460
  ```
426
461
 
427
- Usage: datacontract test [OPTIONS] [LOCATION]
462
+ Usage: datacontract test [OPTIONS] [LOCATION]
428
463
 
429
464
  Run schema and quality tests on configured servers.
430
465
 
@@ -478,45 +513,20 @@ Data Contract CLI connects to a data source and runs schema and quality tests to
478
513
  $ datacontract test --server production datacontract.yaml
479
514
  ```
480
515
 
481
- To connect to the databases the `server` block in the datacontract.yaml is used to set up the connection.
482
- In addition, credentials, such as username and passwords, may be defined with environment variables.
516
+ For CI/CD pipelines, see [`ci`](#ci).
483
517
 
484
518
  The application uses different engines, based on the server `type`.
485
519
  Internally, it connects with DuckDB, Spark, or a native connection and executes the most tests with _soda-core_ and _fastjsonschema_.
486
520
 
487
- Credentials are provided with environment variables.
488
-
489
- Supported server types:
490
-
491
- - [s3](#S3)
492
- - [athena](#athena)
493
- - [bigquery](#bigquery)
494
- - [azure](#azure)
495
- - [sqlserver](#sqlserver)
496
- - [oracle](#oracle)
497
- - [databricks](#databricks)
498
- - [databricks (programmatic)](#databricks-programmatic)
499
- - [dataframe (programmatic)](#dataframe-programmatic)
500
- - [snowflake](#snowflake)
501
- - [kafka](#kafka)
502
- - [postgres](#postgres)
503
- - [mysql](#mysql)
504
- - [trino](#trino)
505
- - [impala](#impala)
506
- - [api](#api)
507
- - [local](#local)
508
-
509
- Supported formats:
521
+ #### Supported Data Sources
510
522
 
511
- - parquet
512
- - json
513
- - csv
514
- - delta
515
- - iceberg (coming soon)
523
+ The `server` block in the datacontract.yaml is used to set up the connection.
524
+ In addition, credentials, such as username and passwords, are provided with environment variables.
516
525
 
517
- Feel free to create an [issue](https://github.com/datacontract/datacontract-cli/issues), if you need support for an additional type and formats.
526
+ Feel free to create an [issue](https://github.com/datacontract/datacontract-cli/issues), if you need support for additional types and formats.
518
527
 
519
- #### S3
528
+ <details markdown="1">
529
+ <summary><strong>S3</strong></summary>
520
530
 
521
531
  Data Contract CLI can test data that is stored in S3 buckets or any S3-compliant endpoints in various formats.
522
532
 
@@ -562,8 +572,10 @@ servers:
562
572
  | `DATACONTRACT_S3_SECRET_ACCESS_KEY` | `93S7LRrJcqLaaaa/XXXXXXXXXXXXX` | AWS Secret Access Key |
563
573
  | `DATACONTRACT_S3_SESSION_TOKEN` | `AQoDYXdzEJr...` | AWS temporary session token (optional) |
564
574
 
575
+ </details>
565
576
 
566
- #### Athena
577
+ <details markdown="1">
578
+ <summary><strong>Athena</strong></summary>
567
579
 
568
580
  Data Contract CLI can test data in AWS Athena stored in S3.
569
581
  Supports different file formats, such as Iceberg, Parquet, JSON, CSV...
@@ -598,8 +610,10 @@ models:
598
610
  | `DATACONTRACT_S3_SECRET_ACCESS_KEY` | `93S7LRrJcqLaaaa/XXXXXXXXXXXXX` | AWS Secret Access Key |
599
611
  | `DATACONTRACT_S3_SESSION_TOKEN` | `AQoDYXdzEJr...` | AWS temporary session token (optional) |
600
612
 
613
+ </details>
601
614
 
602
- #### Google Cloud Storage (GCS)
615
+ <details markdown="1">
616
+ <summary><strong>Google Cloud Storage (GCS)</strong></summary>
603
617
 
604
618
  The [S3](#S3) integration also works with files on Google Cloud Storage through its [interoperability](https://cloud.google.com/storage/docs/interoperability).
605
619
  Use `https://storage.googleapis.com` as the endpoint URL.
@@ -624,8 +638,10 @@ servers:
624
638
  | `DATACONTRACT_S3_ACCESS_KEY_ID` | `GOOG1EZZZ...` | The GCS [HMAC Key](https://cloud.google.com/storage/docs/authentication/hmackeys) Key ID |
625
639
  | `DATACONTRACT_S3_SECRET_ACCESS_KEY` | `PDWWpb...` | The GCS [HMAC Key](https://cloud.google.com/storage/docs/authentication/hmackeys) Secret |
626
640
 
641
+ </details>
627
642
 
628
- #### BigQuery
643
+ <details markdown="1">
644
+ <summary><strong>BigQuery</strong></summary>
629
645
 
630
646
  We support authentication to BigQuery using Service Account Key or Application Default Credentials (ADC). ADC supports Workload Identity Federation (WIF), GCE metadata server, and `gcloud auth application-default login`. The used Service Account should include the roles:
631
647
  * BigQuery Job User
@@ -655,8 +671,10 @@ models:
655
671
  | `DATACONTRACT_BIGQUERY_ACCOUNT_INFO_JSON_PATH` | `~/service-access-key.json` | Service Account key JSON file. If not set, ADC/WIF is used automatically. |
656
672
  | `DATACONTRACT_BIGQUERY_IMPERSONATION_ACCOUNT` | `sa@project.iam.gserviceaccount.com` | Optional. Service account to impersonate. Works with both key file and ADC auth. |
657
673
 
674
+ </details>
658
675
 
659
- #### Azure
676
+ <details markdown="1">
677
+ <summary><strong>Azure</strong></summary>
660
678
 
661
679
  Data Contract CLI can test data that is stored in Azure Blob storage or Azure Data Lake Storage (Gen2) (ADLS) in various formats.
662
680
 
@@ -681,9 +699,10 @@ Authentication works with an Azure Service Principal (SPN) aka App Registration
681
699
  | `DATACONTRACT_AZURE_CLIENT_ID` | `3cf7ce49-e2e9-4cbc-a922-4328d4a58622` | The ApplicationID / ClientID of the app registration |
682
700
  | `DATACONTRACT_AZURE_CLIENT_SECRET` | `yZK8Q~GWO1MMXXXXXXXXXXXXX` | The Client Secret value |
683
701
 
702
+ </details>
684
703
 
685
-
686
- #### Sqlserver
704
+ <details markdown="1">
705
+ <summary><strong>SQL Server</strong></summary>
687
706
 
688
707
  Data Contract CLI can test data in MS SQL Server (including Azure SQL, Synapse Analytics SQL Pool, and Microsoft Fabric).
689
708
 
@@ -721,10 +740,10 @@ models:
721
740
  | `DATACONTRACT_SQLSERVER_DRIVER` | `ODBC Driver 18 for SQL Server` | ODBC driver name |
722
741
  | `DATACONTRACT_SQLSERVER_TRUSTED_CONNECTION` | `True` | Deprecated. Equivalent to `AUTHENTICATION=windows` |
723
742
 
743
+ </details>
724
744
 
725
-
726
-
727
- #### Oracle
745
+ <details markdown="1">
746
+ <summary><strong>Oracle</strong></summary>
728
747
 
729
748
  Data Contract CLI can test data in Oracle Database.
730
749
 
@@ -770,10 +789,10 @@ installed on the system and specify the path to the installation within the envi
770
789
  | `DATACONTRACT_ORACLE_PASSWORD` | `0x162e53` | Password |
771
790
  | `DATACONTRACT_ORACLE_CLIENT_DIR` | `C:\oracle\client` | Path to Oracle Instant Client installation |
772
791
 
792
+ </details>
773
793
 
774
-
775
-
776
- #### Databricks
794
+ <details markdown="1">
795
+ <summary><strong>Databricks</strong></summary>
777
796
 
778
797
  Works with Unity Catalog and Hive metastore.
779
798
 
@@ -802,8 +821,10 @@ models:
802
821
  | `DATACONTRACT_DATABRICKS_HTTP_PATH` | `/sql/1.0/warehouses/b053a3ffffffff` | The HTTP path to the SQL warehouse or compute cluster |
803
822
  | `DATACONTRACT_DATABRICKS_SERVER_HOSTNAME` | `dbc-abcdefgh-1234.cloud.databricks.com` | The host name of the SQL warehouse or compute cluster |
804
823
 
824
+ </details>
805
825
 
806
- #### Databricks (programmatic)
826
+ <details markdown="1">
827
+ <summary><strong>Databricks (programmatic)</strong></summary>
807
828
 
808
829
  Works with Unity Catalog and Hive metastore.
809
830
  When running in a notebook or pipeline, the provided `spark` session can be used.
@@ -859,7 +880,10 @@ models:
859
880
 
860
881
  Databricks' library management properly resolves dependencies during cluster initialization, rather than at runtime in the notebook.
861
882
 
862
- #### Dataframe (programmatic)
883
+ </details>
884
+
885
+ <details markdown="1">
886
+ <summary><strong>Dataframe (programmatic)</strong></summary>
863
887
 
864
888
  Works with Spark DataFrames.
865
889
  DataFrames need to be created as named temporary views.
@@ -894,8 +918,10 @@ run = data_contract.test()
894
918
  assert run.result == "passed"
895
919
  ```
896
920
 
921
+ </details>
897
922
 
898
- #### Snowflake
923
+ <details markdown="1">
924
+ <summary><strong>Snowflake</strong></summary>
899
925
 
900
926
  Data Contract CLI can test data in Snowflake.
901
927
 
@@ -945,8 +971,10 @@ servers:
945
971
  schema: ORDERS_PII_V2
946
972
  ```
947
973
 
974
+ </details>
948
975
 
949
- #### Kafka
976
+ <details markdown="1">
977
+ <summary><strong>Kafka</strong></summary>
950
978
 
951
979
  Kafka support is currently considered experimental.
952
980
 
@@ -970,8 +998,10 @@ servers:
970
998
  | `DATACONTRACT_KAFKA_SASL_PASSWORD` | `xxx` | The SASL password (secret). |
971
999
  | `DATACONTRACT_KAFKA_SASL_MECHANISM` | `PLAIN` | Default `PLAIN`. Other supported mechanisms: `SCRAM-SHA-256` and `SCRAM-SHA-512` |
972
1000
 
1001
+ </details>
973
1002
 
974
- #### Postgres
1003
+ <details markdown="1">
1004
+ <summary><strong>Postgres</strong></summary>
975
1005
 
976
1006
  Data Contract CLI can test data in Postgres or Postgres-compliant databases (e.g., RisingWave).
977
1007
 
@@ -1001,8 +1031,10 @@ models:
1001
1031
  | `DATACONTRACT_POSTGRES_USERNAME` | `postgres` | Username |
1002
1032
  | `DATACONTRACT_POSTGRES_PASSWORD` | `mysecretpassword` | Password |
1003
1033
 
1034
+ </details>
1004
1035
 
1005
- #### MySQL
1036
+ <details markdown="1">
1037
+ <summary><strong>MySQL</strong></summary>
1006
1038
 
1007
1039
  Data Contract CLI can test data in MySQL or MySQL-compliant databases (e.g., MariaDB).
1008
1040
 
@@ -1031,8 +1063,10 @@ models:
1031
1063
  | `DATACONTRACT_MYSQL_USERNAME` | `root` | Username |
1032
1064
  | `DATACONTRACT_MYSQL_PASSWORD` | `mysecretpassword` | Password |
1033
1065
 
1066
+ </details>
1034
1067
 
1035
- #### Trino
1068
+ <details markdown="1">
1069
+ <summary><strong>Trino</strong></summary>
1036
1070
 
1037
1071
  Data Contract CLI can test data in Trino.
1038
1072
 
@@ -1066,8 +1100,10 @@ models:
1066
1100
  | `DATACONTRACT_TRINO_USERNAME` | `trino` | Username |
1067
1101
  | `DATACONTRACT_TRINO_PASSWORD` | `mysecretpassword` | Password |
1068
1102
 
1103
+ </details>
1069
1104
 
1070
- #### Impala
1105
+ <details markdown="1">
1106
+ <summary><strong>Impala</strong></summary>
1071
1107
 
1072
1108
  Data Contract CLI can run Soda checks against an Apache Impala cluster.
1073
1109
 
@@ -1114,7 +1150,10 @@ If `physicalType` is not specified in the schema, we recommend the following map
1114
1150
 
1115
1151
  This keeps the Impala schema compatible with the expectations of the Soda checks generated by datacontract-cli.
1116
1152
 
1117
- #### API
1153
+ </details>
1154
+
1155
+ <details markdown="1">
1156
+ <summary><strong>API</strong></summary>
1118
1157
 
1119
1158
  Data Contract CLI can test APIs that return data in JSON format.
1120
1159
  Currently, only GET requests are supported.
@@ -1145,8 +1184,10 @@ models:
1145
1184
  |-----------------------------------------|------------------|---------------------------------------------------|
1146
1185
  | `DATACONTRACT_API_HEADER_AUTHORIZATION` | `Bearer <token>` | The value for the `authorization` header. Optional. |
1147
1186
 
1187
+ </details>
1148
1188
 
1149
- #### Local
1189
+ <details markdown="1">
1190
+ <summary><strong>Local</strong></summary>
1150
1191
 
1151
1192
  Data Contract CLI can test local files in parquet, json, csv, or delta format.
1152
1193
 
@@ -1169,6 +1210,149 @@ models:
1169
1210
  type: string
1170
1211
  ```
1171
1212
 
1213
+ </details>
1214
+
1215
+ ### ci
1216
+ ```
1217
+
1218
+ Usage: datacontract ci [OPTIONS] [LOCATIONS]...
1219
+
1220
+ Run tests for CI/CD pipelines. Emits GitHub Actions annotations and step
1221
+ summary.
1222
+
1223
+ ╭─ Arguments ──────────────────────────────────────────────────────────────────╮
1224
+ │ locations [LOCATIONS]... The location(s) (url or path) of the data │
1225
+ │ contract yaml file(s). │
1226
+ ╰──────────────────────────────────────────────────────────────────────────────╯
1227
+ ╭─ Options ────────────────────────────────────────────────────────────────────╮
1228
+ │ --schema TEXT The location (url │
1229
+ │ or path) of the │
1230
+ │ ODCS JSON Schema │
1231
+ │ --server TEXT The server │
1232
+ │ configuration to │
1233
+ │ run the schema and │
1234
+ │ quality tests. Use │
1235
+ │ the key of the │
1236
+ │ server object in │
1237
+ │ the data contract │
1238
+ │ yaml file to refer │
1239
+ │ to a server, e.g., │
1240
+ │ `production`, or │
1241
+ │ `all` for all │
1242
+ │ servers (default). │
1243
+ │ [default: all] │
1244
+ │ --publish TEXT The url to publish │
1245
+ │ the results after │
1246
+ │ the test. │
1247
+ │ --output PATH Specify the file │
1248
+ │ path where the test │
1249
+ │ results should be │
1250
+ │ written to (e.g., │
1251
+ │ './test-results/TE… │
1252
+ │ --output-format [json|junit] The target format │
1253
+ │ for the test │
1254
+ │ results. │
1255
+ │ --logs --no-logs Print logs │
1256
+ │ [default: no-logs] │
1257
+ │ --json --no-json Print test results │
1258
+ │ as JSON to stdout. │
1259
+ │ [default: no-json] │
1260
+ │ --fail-on TEXT Minimum severity │
1261
+ │ that causes a │
1262
+ │ non-zero exit code: │
1263
+ │ 'warning', 'error', │
1264
+ │ or 'never'. │
1265
+ │ [default: error] │
1266
+ │ --ssl-verification --no-ssl-verific… SSL verification │
1267
+ │ when publishing the │
1268
+ │ data contract. │
1269
+ │ [default: │
1270
+ │ ssl-verification] │
1271
+ │ --debug --no-debug Enable debug │
1272
+ │ logging │
1273
+ │ --help Show this message │
1274
+ │ and exit. │
1275
+ ╰──────────────────────────────────────────────────────────────────────────────╯
1276
+
1277
+ ```
1278
+
1279
+ The `ci` command wraps [`test`](#test) with CI/CD-specific features:
1280
+
1281
+ - **Multiple contracts**: `datacontract ci contracts/*.yaml`
1282
+ - **CI annotations:** Inline annotations for failed checks (GitHub Actions and Azure DevOps)
1283
+ - **Markdown summary** of the test results (GitHub Actions)
1284
+ - **`--json`**: Print test results as JSON to stdout for machine-readable output
1285
+ - **`--fail-on`**: Control the minimum severity that causes a non-zero exit code. Default is `error`; set to `warning` to also fail on warnings, or `never` to always exit 0.
1286
+
1287
+ The [supported server types](#supported-data-sources) and their configuration are equivalent to the `test` command.
1288
+
1289
+ ```bash
1290
+ # Single contract
1291
+ $ datacontract ci datacontract.yaml
1292
+
1293
+ # Multiple contracts
1294
+ $ datacontract ci contracts/*.yaml
1295
+
1296
+ # Fail on warnings too
1297
+ $ datacontract ci --fail-on warning datacontract.yaml
1298
+
1299
+ # JSON output for scripting
1300
+ $ datacontract ci --json datacontract.yaml
1301
+ ```
1302
+
1303
+ <details markdown="1">
1304
+ <summary>GitHub Actions workflow example</summary>
1305
+
1306
+ ```yaml
1307
+ # .github/workflows/datacontract.yml
1308
+ name: Data Contract CI
1309
+
1310
+ on:
1311
+ push:
1312
+ branches: [main]
1313
+ pull_request:
1314
+
1315
+ jobs:
1316
+ datacontract-ci:
1317
+ runs-on: ubuntu-latest
1318
+ steps:
1319
+ - uses: actions/checkout@v4
1320
+ - uses: actions/setup-python@v5
1321
+ with:
1322
+ python-version: "3.11"
1323
+ - run: pip install datacontract-cli
1324
+ # Test one or more data contracts (supports globs, e.g. contracts/*.yaml)
1325
+ - run: datacontract ci datacontract.yaml
1326
+ ```
1327
+
1328
+ </details>
1329
+
1330
+ <details markdown="1">
1331
+ <summary>Azure DevOps pipeline example</summary>
1332
+
1333
+ ```yaml
1334
+ # azure-pipelines.yml
1335
+ trigger:
1336
+ branches:
1337
+ include:
1338
+ - main
1339
+
1340
+ pool:
1341
+ vmImage: "ubuntu-latest"
1342
+
1343
+ steps:
1344
+ - task: UsePythonVersion@0
1345
+ inputs:
1346
+ versionSpec: "3.11"
1347
+ - script: pip install datacontract-cli
1348
+ displayName: "Install datacontract-cli"
1349
+ # Test one or more data contracts (supports globs, e.g. contracts/*.yaml)
1350
+ - script: datacontract ci datacontract.yaml
1351
+ displayName: "Run data contract tests"
1352
+ ```
1353
+
1354
+ </details>
1355
+
1172
1356
 
1173
1357
  ### export
1174
1358
  ```
@@ -1477,67 +1661,65 @@ The export function converts the data contract specification into the custom for
1477
1661
  datacontract export --format custom --template template.txt datacontract.yaml
1478
1662
  ```
1479
1663
 
1480
- ##### Jinja variables
1664
+ ##### Jinja templates & variables
1481
1665
 
1482
1666
  You can directly use the Data Contract Specification as template variables.
1483
1667
 
1668
+ {% raw %}
1484
1669
  ```shell
1485
1670
  $ cat template.txt
1486
1671
  title: {{ data_contract.info.title }}
1672
+ models:
1673
+ {%- for model_name, model in data_contract.models.items() %}
1674
+ - name: {{ model.name }}
1675
+ {%- endfor %}
1487
1676
 
1488
1677
  $ datacontract export --format custom --template template.txt datacontract.yaml
1489
1678
  title: Orders Latest
1490
1679
  ```
1680
+ {% endraw %}
1491
1681
 
1492
- ##### Example Jinja Templates
1682
+ ##### Example Jinja Templates for a customized dbt model
1493
1683
 
1494
- ###### Customized dbt model
1684
+ You can export a given dbt model containing any logic by adding the `schema-name` filter/parameter (in ODCS, "schemas" are the equivalent of "models" in dbt).
1495
1685
 
1496
- You can export the dbt models containing any logic.
1686
+ It adds jinja variable passed to your template.file:
1687
+ - `schema_name`: str
1688
+ - `schema`: SchemaObject from ODCS
1497
1689
 
1498
1690
  Below is an example of a dbt staging layer that converts a field of `type: timestamp` to a `DATETIME` type with time zone conversion.
1499
1691
 
1500
- template.sql
1501
-
1502
- {% raw %}
1503
- ```sql
1504
- {%- for model_name, model in data_contract.models.items() %}
1505
- {#- Export only the first model #}
1506
- {%- if loop.first -%}
1507
- SELECT
1508
- {%- for field_name, field in model.fields.items() %}
1509
- {%- if field.type == "timestamp" %}
1510
- DATETIME({{ field_name }}, "Asia/Tokyo") AS {{ field_name }},
1511
- {%- else %}
1512
- {{ field_name }} AS {{ field_name }},
1513
- {%- endif %}
1514
- {%- endfor %}
1515
- FROM
1516
- {{ "{{" }} ref('{{ model_name }}') {{ "}}" }}
1517
- {%- endif %}
1518
- {%- endfor %}
1519
- ```
1520
- {% endraw %}
1521
-
1522
- command
1523
-
1524
- ```shell
1525
- datacontract export --format custom --template template.sql --output output.sql datacontract.yaml
1526
- ```
1527
-
1528
- output.sql
1529
-
1530
- ```sql
1531
- SELECT
1532
- order_id AS order_id,
1533
- DATETIME(order_timestamp, "Asia/Tokyo") AS order_timestamp,
1534
- order_total AS order_total,
1535
- customer_id AS customer_id,
1536
- customer_email_address AS customer_email_address,
1537
- DATETIME(processed_timestamp, "Asia/Tokyo") AS processed_timestamp,
1538
- FROM
1539
- {{ ref('orders') }}
1540
- ```
1692
+ - `template.sql`
1693
+ {% raw %}
1694
+ ```sql
1695
+ SELECT
1696
+ {%- for field in schema.properties %}
1697
+ {%- if field.physicalType == "timestamp" %}
1698
+ DATETIME({{ field.name }}, "Asia/Tokyo") AS {{ field.name }},
1699
+ {%- else %}
1700
+ {{ field.name }} AS {{ field.name }},
1701
+ {%- endif %}
1702
+ {%- endfor %}
1703
+ FROM {{ "{{" }} ref('{{ schema_name }}') {{ "}}" }}
1704
+ ```
1705
+ {% endraw %}
1706
+ - export command
1707
+ ```shell
1708
+ datacontract export datacontract.odcs.yaml --format custom --template template.sql --schema-name orders
1709
+ ```
1710
+ - `output.sql`
1711
+ {% raw %}
1712
+ ```sql
1713
+ SELECT
1714
+ order_id AS order_id,
1715
+ DATETIME(order_timestamp, "Asia/Tokyo") AS order_timestamp,
1716
+ order_total AS order_total,
1717
+ customer_id AS customer_id,
1718
+ customer_email_address AS customer_email_address,
1719
+ DATETIME(processed_timestamp, "Asia/Tokyo") AS processed_timestamp,
1720
+ FROM {{ ref('orders') }}
1721
+ ```
1722
+ {% endraw %}
1541
1723
 
1542
1724
  #### ODCS Excel Template
1543
1725
 
@@ -1985,10 +2167,11 @@ Create a data contract based on the actual data. This is the fastest way to get
1985
2167
  $ datacontract lint
1986
2168
  ```
1987
2169
 
1988
- 4. Set up a CI pipeline that executes daily for continuous quality checks. You can also report the
1989
- test results to tools like [Data Mesh Manager](https://datamesh-manager.com)
2170
+ 4. Set up a CI pipeline that executes daily for continuous quality checks. Use the [`ci`](#ci) command for
2171
+ CI-optimized output (GitHub Actions annotations and step summary, Azure DevOps annotations).
2172
+ You can also report the test results to tools like [Data Mesh Manager](https://datamesh-manager.com).
1990
2173
  ```bash
1991
- $ datacontract test --publish https://api.datamesh-manager.com/api/test-results
2174
+ $ datacontract ci --publish https://api.datamesh-manager.com/api/test-results
1992
2175
  ```
1993
2176
 
1994
2177
  ### Contract-First
@@ -2199,11 +2382,20 @@ uv run ruff check
2199
2382
  uv run pytest
2200
2383
  ```
2201
2384
 
2385
+ ## Contribution
2386
+
2387
+ We are happy to receive your contributions. Propose your change in an issue or directly create a
2388
+ pull request with your improvements.
2389
+
2390
+ Before creating a pull request, please make sure that all tests are passing (`uv run pytest`) and
2391
+ your code is properly formatted (`ruff format`). Create a changelog entry and reference fixed
2392
+ issues (if any).
2393
+
2202
2394
  ### Troubleshooting
2203
2395
 
2204
2396
  #### Windows: Some tests fail
2205
2397
 
2206
- Run in wsl. (We need to fix the paths in the tests so that normal Windows will work, contributions are appreciated)
2398
+ Run in WSL. (We need to fix the paths in the tests so that normal Windows will work, contributions are appreciated)
2207
2399
 
2208
2400
  #### PyCharm does not pick up the `.venv`
2209
2401
 
@@ -2265,10 +2457,6 @@ This command runs the container momentarily to check the version of the `datacon
2265
2457
  5. Wait until GitHub Release is created
2266
2458
  6. Add the release notes to the GitHub Release
2267
2459
 
2268
- ## Contribution
2269
-
2270
- We are happy to receive your contributions. Propose your change in an issue or directly create a pull request with your improvements.
2271
-
2272
2460
  ## Companies using this tool
2273
2461
 
2274
2462
  - [Entropy Data](https://www.entropy-data.com)