datacontract-cli 0.10.12__tar.gz → 0.10.14__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 (198) hide show
  1. {datacontract_cli-0.10.12/datacontract_cli.egg-info → datacontract_cli-0.10.14}/PKG-INFO +106 -52
  2. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/README.md +88 -37
  3. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/cli.py +5 -0
  4. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/data_contract.py +9 -1
  5. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/kafka.py +28 -6
  6. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/avro_converter.py +8 -1
  7. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/avro_idl_converter.py +1 -0
  8. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/bigquery_converter.py +30 -23
  9. datacontract_cli-0.10.14/datacontract/export/data_caterer_converter.py +148 -0
  10. datacontract_cli-0.10.14/datacontract/export/dcs_exporter.py +6 -0
  11. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/exporter.py +5 -1
  12. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/exporter_factory.py +19 -1
  13. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/jsonschema_converter.py +13 -2
  14. datacontract_cli-0.10.12/datacontract/export/odcs_converter.py → datacontract_cli-0.10.14/datacontract/export/odcs_v2_exporter.py +4 -4
  15. datacontract_cli-0.10.14/datacontract/export/odcs_v3_exporter.py +294 -0
  16. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/sodacl_converter.py +82 -2
  17. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/spark_converter.py +3 -1
  18. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/sql_type_converter.py +56 -21
  19. datacontract_cli-0.10.14/datacontract/imports/iceberg_importer.py +162 -0
  20. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/imports/importer.py +1 -0
  21. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/imports/importer_factory.py +5 -0
  22. datacontract_cli-0.10.14/datacontract/imports/odcs_importer.py +57 -0
  23. datacontract_cli-0.10.12/datacontract/imports/odcs_importer.py → datacontract_cli-0.10.14/datacontract/imports/odcs_v2_importer.py +5 -28
  24. datacontract_cli-0.10.14/datacontract/imports/odcs_v3_importer.py +309 -0
  25. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/imports/spark_importer.py +5 -1
  26. datacontract_cli-0.10.14/datacontract/imports/unity_importer.py +173 -0
  27. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/integration/datamesh_manager.py +1 -1
  28. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/lint/resolve.py +24 -10
  29. datacontract_cli-0.10.14/datacontract/lint/resources.py +21 -0
  30. datacontract_cli-0.10.14/datacontract/lint/urls.py +56 -0
  31. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/model/data_contract_specification.py +72 -8
  32. datacontract_cli-0.10.14/datacontract/model/odcs.py +11 -0
  33. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14/datacontract_cli.egg-info}/PKG-INFO +106 -52
  34. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract_cli.egg-info/SOURCES.txt +16 -4
  35. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract_cli.egg-info/requires.txt +18 -14
  36. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/pyproject.toml +21 -16
  37. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_avro.py +11 -0
  38. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_custom_exporter.py +2 -2
  39. datacontract_cli-0.10.14/tests/test_export_data_caterer.py +90 -0
  40. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_jsonschema.py +4 -4
  41. datacontract_cli-0.10.12/tests/test_export_odcs.py → datacontract_cli-0.10.14/tests/test_export_odcs_v2.py +4 -5
  42. datacontract_cli-0.10.14/tests/test_export_odcs_v3.py +114 -0
  43. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_sodacl.py +24 -13
  44. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_import_dbt.py +10 -2
  45. datacontract_cli-0.10.14/tests/test_import_iceberg.py +145 -0
  46. datacontract_cli-0.10.14/tests/test_import_odcs_v2.py +50 -0
  47. datacontract_cli-0.10.12/tests/test_import_odcs.py → datacontract_cli-0.10.14/tests/test_import_odcs_v3.py +5 -5
  48. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_import_unity_file.py +30 -0
  49. datacontract_cli-0.10.14/tests/test_integration_datameshmanager.py +27 -0
  50. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_examples_inline.py +1 -2
  51. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_kafka.py +13 -26
  52. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_parquet.py +7 -0
  53. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_postgres.py +17 -1
  54. datacontract_cli-0.10.14/tests/test_test_quality.py +94 -0
  55. datacontract_cli-0.10.14/tests/test_web.py +37 -0
  56. datacontract_cli-0.10.12/datacontract/engines/datacontract/check_that_datacontract_str_is_valid.py +0 -48
  57. datacontract_cli-0.10.12/datacontract/imports/unity_importer.py +0 -152
  58. datacontract_cli-0.10.12/datacontract/lint/urls.py +0 -40
  59. datacontract_cli-0.10.12/tests/test_integration_datameshmanager.py +0 -21
  60. datacontract_cli-0.10.12/tests/test_web.py +0 -34
  61. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/LICENSE +0 -0
  62. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/MANIFEST.in +0 -0
  63. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/__init__.py +0 -0
  64. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/breaking/breaking.py +0 -0
  65. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/breaking/breaking_rules.py +0 -0
  66. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/catalog/catalog.py +0 -0
  67. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/__init__.py +0 -0
  68. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py +0 -0
  69. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/datacontract/check_that_datacontract_file_exists.py +0 -0
  70. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/fastjsonschema/check_jsonschema.py +0 -0
  71. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/fastjsonschema/s3/s3_read_files.py +0 -0
  72. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/soda/__init__.py +0 -0
  73. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/soda/check_soda_execute.py +0 -0
  74. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/bigquery.py +0 -0
  75. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/dask.py +0 -0
  76. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/databricks.py +0 -0
  77. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/duckdb.py +0 -0
  78. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/postgres.py +0 -0
  79. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/snowflake.py +0 -0
  80. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/sqlserver.py +0 -0
  81. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/trino.py +0 -0
  82. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/__init__.py +0 -0
  83. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/csv_type_converter.py +0 -0
  84. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/dbml_converter.py +0 -0
  85. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/dbt_converter.py +0 -0
  86. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/go_converter.py +0 -0
  87. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/great_expectations_converter.py +0 -0
  88. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/html_export.py +0 -0
  89. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/protobuf_converter.py +0 -0
  90. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/pydantic_converter.py +0 -0
  91. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/rdf_converter.py +0 -0
  92. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/sql_converter.py +0 -0
  93. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/sqlalchemy_converter.py +0 -0
  94. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/export/terraform_converter.py +0 -0
  95. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/imports/avro_importer.py +0 -0
  96. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/imports/bigquery_importer.py +0 -0
  97. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/imports/dbml_importer.py +0 -0
  98. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/imports/dbt_importer.py +0 -0
  99. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/imports/glue_importer.py +0 -0
  100. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/imports/jsonschema_importer.py +0 -0
  101. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/imports/sql_importer.py +0 -0
  102. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/init/download_datacontract_file.py +0 -0
  103. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/integration/opentelemetry.py +0 -0
  104. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/lint/files.py +0 -0
  105. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/lint/lint.py +0 -0
  106. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/lint/linters/__init__.py +0 -0
  107. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/lint/linters/description_linter.py +0 -0
  108. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/lint/linters/example_model_linter.py +0 -0
  109. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/lint/linters/field_pattern_linter.py +0 -0
  110. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/lint/linters/field_reference_linter.py +0 -0
  111. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/lint/linters/notice_period_linter.py +0 -0
  112. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/lint/linters/quality_schema_linter.py +0 -0
  113. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/lint/linters/valid_constraints_linter.py +0 -0
  114. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/lint/schema.py +0 -0
  115. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/model/breaking_change.py +0 -0
  116. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/model/exceptions.py +0 -0
  117. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/model/run.py +0 -0
  118. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/py.typed +0 -0
  119. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/templates/datacontract.html +0 -0
  120. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/templates/index.html +0 -0
  121. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/templates/partials/datacontract_information.html +0 -0
  122. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/templates/partials/datacontract_servicelevels.html +0 -0
  123. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/templates/partials/datacontract_terms.html +0 -0
  124. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/templates/partials/definition.html +0 -0
  125. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/templates/partials/example.html +0 -0
  126. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/templates/partials/model_field.html +0 -0
  127. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/templates/partials/server.html +0 -0
  128. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/templates/style/output.css +0 -0
  129. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract/web.py +0 -0
  130. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract_cli.egg-info/dependency_links.txt +0 -0
  131. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract_cli.egg-info/entry_points.txt +0 -0
  132. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/datacontract_cli.egg-info/top_level.txt +0 -0
  133. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/setup.cfg +0 -0
  134. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_breaking.py +0 -0
  135. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_catalog.py +0 -0
  136. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_changelog.py +0 -0
  137. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_cli.py +0 -0
  138. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_description_linter.py +0 -0
  139. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_documentation_linter.py +0 -0
  140. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_download_datacontract_file.py +0 -0
  141. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_example_model_linter.py +0 -0
  142. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_avro_idl.py +0 -0
  143. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_bigquery.py +0 -0
  144. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_complex_data_contract.py +0 -0
  145. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_dbml.py +0 -0
  146. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_dbt_models.py +0 -0
  147. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_dbt_sources.py +0 -0
  148. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_dbt_staging_sql.py +0 -0
  149. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_go.py +0 -0
  150. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_great_expectations.py +0 -0
  151. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_html.py +0 -0
  152. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_protobuf.py +0 -0
  153. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_pydantic.py +0 -0
  154. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_rdf.py +0 -0
  155. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_spark.py +0 -0
  156. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_sql.py +0 -0
  157. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_sql_query.py +0 -0
  158. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_sqlalchemy.py +0 -0
  159. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_export_terraform.py +0 -0
  160. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_field_constraint_linter.py +0 -0
  161. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_field_pattern_linter.py +0 -0
  162. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_field_reference_linter.py +0 -0
  163. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_import_avro.py +0 -0
  164. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_import_bigquery.py +0 -0
  165. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_import_dbml.py +0 -0
  166. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_import_glue.py +0 -0
  167. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_import_jsonschema.py +0 -0
  168. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_import_spark.py +0 -0
  169. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_import_sql.py +0 -0
  170. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_integration_opentelemetry.py +0 -0
  171. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_lint.py +0 -0
  172. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_notice_period_linter.py +0 -0
  173. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_quality_schema_linter.py +0 -0
  174. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_resolve.py +0 -0
  175. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_roundtrip_jsonschema.py +0 -0
  176. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_spec_fields_field.py +0 -0
  177. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_spec_ref.py +0 -0
  178. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_azure_parquet_remote.py +0 -0
  179. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_bigquery.py +0 -0
  180. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_databricks.py +0 -0
  181. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_dataframe.py +0 -0
  182. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_delta.py +0 -0
  183. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_examples_csv.py +0 -0
  184. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_examples_formats_valid.py +0 -0
  185. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_examples_json.py +0 -0
  186. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_examples_missing.py +0 -0
  187. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_gcs_json_remote.py +0 -0
  188. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_kafka_remote.py +0 -0
  189. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_local_json.py +0 -0
  190. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_s3_csv.py +0 -0
  191. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_s3_delta.py +0 -0
  192. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_s3_json.py +0 -0
  193. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_s3_json_complex.py +0 -0
  194. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_s3_json_multiple_models.py +0 -0
  195. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_s3_json_remote.py +0 -0
  196. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_snowflake.py +0 -0
  197. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_sqlserver.py +0 -0
  198. {datacontract_cli-0.10.12 → datacontract_cli-0.10.14}/tests/test_test_trino.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datacontract-cli
3
- Version: 0.10.12
3
+ Version: 0.10.14
4
4
  Summary: The datacontract CLI is an open source command-line tool for working with Data Contracts. It uses data contract YAML files to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
5
5
  Author-email: Jochen Christ <jochen.christ@innoq.com>, Stefan Negele <stefan.negele@innoq.com>, Simon Harrer <simon.harrer@innoq.com>
6
6
  Project-URL: Homepage, https://cli.datacontract.com
@@ -12,24 +12,24 @@ Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: typer<0.13,>=0.12
15
- Requires-Dist: pydantic<2.9.0,>=2.8.2
15
+ Requires-Dist: pydantic<2.10.0,>=2.8.2
16
16
  Requires-Dist: pyyaml~=6.0.1
17
17
  Requires-Dist: requests<2.33,>=2.31
18
- Requires-Dist: fastapi==0.112.0
19
- Requires-Dist: uvicorn==0.30.5
18
+ Requires-Dist: fastapi==0.115.2
19
+ Requires-Dist: uvicorn==0.30.6
20
20
  Requires-Dist: fastjsonschema<2.21.0,>=2.19.1
21
21
  Requires-Dist: fastparquet==2024.5.0
22
- Requires-Dist: python-multipart==0.0.9
23
- Requires-Dist: rich~=13.7.0
24
- Requires-Dist: simple-ddl-parser==1.6.0
25
- Requires-Dist: duckdb==1.0.0
22
+ Requires-Dist: python-multipart==0.0.12
23
+ Requires-Dist: rich<13.10,>=13.7
24
+ Requires-Dist: simple-ddl-parser==1.7.1
25
+ Requires-Dist: duckdb==1.1.2
26
26
  Requires-Dist: soda-core-duckdb<3.4.0,>=3.3.1
27
27
  Requires-Dist: setuptools>=60
28
28
  Requires-Dist: python-dotenv~=1.0.0
29
29
  Requires-Dist: rdflib==7.0.0
30
30
  Requires-Dist: opentelemetry-exporter-otlp-proto-grpc~=1.16
31
31
  Requires-Dist: opentelemetry-exporter-otlp-proto-http~=1.16
32
- Requires-Dist: boto3<1.35.6,>=1.34.41
32
+ Requires-Dist: boto3<1.35.45,>=1.34.41
33
33
  Requires-Dist: jinja_partials>=0.2.1
34
34
  Provides-Extra: avro
35
35
  Requires-Dist: avro==1.12.0; extra == "avro"
@@ -37,15 +37,18 @@ Provides-Extra: bigquery
37
37
  Requires-Dist: soda-core-bigquery<3.4.0,>=3.3.1; extra == "bigquery"
38
38
  Provides-Extra: databricks
39
39
  Requires-Dist: soda-core-spark-df<3.4.0,>=3.3.1; extra == "databricks"
40
- Requires-Dist: databricks-sql-connector<3.4.0,>=3.1.2; extra == "databricks"
40
+ Requires-Dist: databricks-sql-connector<3.6.0,>=3.1.2; extra == "databricks"
41
+ Requires-Dist: databricks-sdk<0.36.0,>=0.32.0; extra == "databricks"
41
42
  Requires-Dist: soda-core-spark[databricks]<3.4.0,>=3.3.1; extra == "databricks"
43
+ Provides-Extra: iceberg
44
+ Requires-Dist: pyiceberg==0.7.1; extra == "iceberg"
42
45
  Provides-Extra: kafka
43
46
  Requires-Dist: datacontract-cli[avro]; extra == "kafka"
44
47
  Requires-Dist: soda-core-spark-df<3.4.0,>=3.3.1; extra == "kafka"
45
48
  Provides-Extra: postgres
46
49
  Requires-Dist: soda-core-postgres<3.4.0,>=3.3.1; extra == "postgres"
47
50
  Provides-Extra: s3
48
- Requires-Dist: s3fs==2024.6.1; extra == "s3"
51
+ Requires-Dist: s3fs==2024.9.0; extra == "s3"
49
52
  Provides-Extra: snowflake
50
53
  Requires-Dist: snowflake-connector-python[pandas]<3.13,>=3.6; extra == "snowflake"
51
54
  Requires-Dist: soda-core-snowflake<3.4.0,>=3.3.1; extra == "snowflake"
@@ -58,12 +61,12 @@ Requires-Dist: dbt-core>=1.8.0; extra == "dbt"
58
61
  Provides-Extra: dbml
59
62
  Requires-Dist: pydbml>=1.1.1; extra == "dbml"
60
63
  Provides-Extra: all
61
- Requires-Dist: datacontract-cli[bigquery,databricks,dbml,dbt,kafka,postgres,s3,snowflake,sqlserver,trino]; extra == "all"
64
+ Requires-Dist: datacontract-cli[bigquery,databricks,dbml,dbt,iceberg,kafka,postgres,s3,snowflake,sqlserver,trino]; extra == "all"
62
65
  Provides-Extra: dev
63
66
  Requires-Dist: datacontract-cli[all]; extra == "dev"
64
67
  Requires-Dist: httpx==0.27.2; extra == "dev"
65
68
  Requires-Dist: kafka-python; extra == "dev"
66
- Requires-Dist: moto==5.0.13; extra == "dev"
69
+ Requires-Dist: moto==5.0.18; extra == "dev"
67
70
  Requires-Dist: pandas>=2.1.0; extra == "dev"
68
71
  Requires-Dist: pre-commit<3.9.0,>=3.7.1; extra == "dev"
69
72
  Requires-Dist: pyarrow>=12.0.0; extra == "dev"
@@ -71,8 +74,8 @@ Requires-Dist: pytest; extra == "dev"
71
74
  Requires-Dist: pytest-xdist; extra == "dev"
72
75
  Requires-Dist: pymssql==2.3.1; extra == "dev"
73
76
  Requires-Dist: ruff; extra == "dev"
74
- Requires-Dist: testcontainers[kafka,minio,mssql,postgres]==4.8.1; extra == "dev"
75
- Requires-Dist: trino==0.329.0; extra == "dev"
77
+ Requires-Dist: testcontainers[kafka,minio,mssql,postgres]==4.8.2; extra == "dev"
78
+ Requires-Dist: trino==0.330.0; extra == "dev"
76
79
 
77
80
  # Data Contract CLI
78
81
 
@@ -84,8 +87,8 @@ Requires-Dist: trino==0.329.0; extra == "dev"
84
87
  <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>
85
88
  </p>
86
89
 
87
- The `datacontract` CLI is an open source command-line tool for working with [Data Contracts](https://datacontract.com/).
88
- It uses data contract YAML files to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
90
+ The `datacontract` CLI is an open-source command-line tool for working with data contracts.
91
+ It uses data contract YAML files as [Data Contract Specification](https://datacontract.com/) or [ODCS](https://bitol-io.github.io/open-data-contract-standard/latest/) to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
89
92
 
90
93
  ![Main features of the Data Contract CLI](datacontractcli.png)
91
94
 
@@ -97,15 +100,15 @@ Let's look at this data contract:
97
100
 
98
101
  We have a _servers_ section with endpoint details to the S3 bucket, _models_ for the structure of the data, _servicelevels_ and _quality_ attributes that describe the expected freshness and number of rows.
99
102
 
100
- This data contract contains all information to connect to S3 and check that the actual data meets the defined schema and quality requirements. We can use this information to test if the actual data set in S3 is compliant to the data contract.
103
+ This data contract contains all information to connect to S3 and check that the actual data meets the defined schema and quality requirements. We can use this information to test if the actual data product in S3 is compliant to the data contract.
101
104
 
102
- Let's use [pip](https://pip.pypa.io/en/stable/getting-started/) to install the CLI (or use the [Docker image](#docker), if you prefer).
105
+ Let's use [pip](https://pip.pypa.io/en/stable/getting-started/) to install the CLI (or use the [Docker image](#docker)),
103
106
  ```bash
104
107
  $ python3 -m pip install datacontract-cli[all]
105
108
  ```
106
109
 
107
110
 
108
- We run the tests:
111
+ now, let's run the tests:
109
112
 
110
113
  ```bash
111
114
  $ datacontract test https://datacontract.com/examples/orders-latest/datacontract.yaml
@@ -143,7 +146,7 @@ Testing https://datacontract.com/examples/orders-latest/datacontract.yaml
143
146
 
144
147
  Voilà, the CLI tested that the _datacontract.yaml_ itself is valid, all records comply with the schema, and all quality attributes are met.
145
148
 
146
- We can also use the datacontract.yaml to export in many [formats](#format), e.g., to SQL:
149
+ We can also use the datacontract.yaml to export in many [formats](#format), e.g., to generate a SQL DDL:
147
150
 
148
151
  ```bash
149
152
  $ datacontract export --format sql https://datacontract.com/examples/orders-latest/datacontract.yaml
@@ -190,7 +193,7 @@ $ datacontract test datacontract.yaml
190
193
  # execute schema and quality checks on the examples within the contract
191
194
  $ datacontract test --examples datacontract.yaml
192
195
 
193
- # export data contract as html (other formats: avro, dbt, dbt-sources, dbt-staging-sql, jsonschema, odcs, rdf, sql, sodacl, terraform, ...)
196
+ # export data contract as html (other formats: avro, dbt, dbt-sources, dbt-staging-sql, jsonschema, odcs_v2, odcs_v3, rdf, sql, sodacl, terraform, ...)
194
197
  $ datacontract export --format html datacontract.yaml > datacontract.html
195
198
 
196
199
  # import avro (other formats: sql, glue, bigquery...)
@@ -223,8 +226,7 @@ if not run.has_passed():
223
226
  Choose the most appropriate installation method for your needs:
224
227
 
225
228
  ### pip
226
- Python 3.11 recommended.
227
- Python 3.12 available as pre-release release candidate for 0.9.3
229
+ Python 3.10, 3.11, and 3.12 are supported. We recommend to use Python 3.11.
228
230
 
229
231
  ```bash
230
232
  python3 -m pip install datacontract-cli[all]
@@ -238,17 +240,22 @@ pipx install datacontract-cli[all]
238
240
 
239
241
  ### Docker
240
242
 
243
+ You can also use our Docker image to run the CLI tool. It is also convenient for CI/CD pipelines.
244
+
241
245
  ```bash
242
246
  docker pull datacontract/cli
243
247
  docker run --rm -v ${PWD}:/home/datacontract datacontract/cli
244
248
  ```
245
249
 
246
- Or via an alias that automatically uses the latest version:
250
+ You can create an alias for the Docker command to make it easier to use:
247
251
 
248
252
  ```bash
249
253
  alias datacontract='docker run --rm -v "${PWD}:/home/datacontract" datacontract/cli:latest'
250
254
  ```
251
255
 
256
+ _Note:_ The output of Docker command line messages is limited to 80 columns and may include line breaks. Don't pipe docker output to files if you want to export code. Use the `--output` option instead.
257
+
258
+
252
259
 
253
260
  ## Optional Dependencies
254
261
 
@@ -741,10 +748,11 @@ servers:
741
748
 
742
749
  #### Environment Variables
743
750
 
744
- | Environment Variable | Example | Description |
745
- |------------------------------------|---------|-----------------------------|
746
- | `DATACONTRACT_KAFKA_SASL_USERNAME` | `xxx` | The SASL username (key). |
747
- | `DATACONTRACT_KAFKA_SASL_PASSWORD` | `xxx` | The SASL password (secret). |
751
+ | Environment Variable | Example | Description |
752
+ |-------------------------------------|---------|----------------------------------------------------------------------------------|
753
+ | `DATACONTRACT_KAFKA_SASL_USERNAME` | `xxx` | The SASL username (key). |
754
+ | `DATACONTRACT_KAFKA_SASL_PASSWORD` | `xxx` | The SASL password (secret). |
755
+ | `DATACONTRACT_KAFKA_SASL_MECHANISM` | `PLAIN` | Default `PLAIN`. Other supported mechanisms: `SCRAM-SHA-256` and `SCRAM-SHA-512` |
748
756
 
749
757
 
750
758
  ### Postgres
@@ -799,6 +807,10 @@ models:
799
807
  fields:
800
808
  my_column_1: # corresponds to a column
801
809
  type: varchar
810
+ my_column_2: # corresponds to a column with custom trino type
811
+ type: object
812
+ config:
813
+ trinoType: row(en_us varchar, pt_br varchar)
802
814
  ```
803
815
 
804
816
  #### Environment Variables
@@ -825,7 +837,7 @@ models:
825
837
  │ * --format [jsonschema|pydantic-model|sodacl|dbt|dbt-sources|db The export format. [default: None] [required] │
826
838
  │ t-staging-sql|odcs|rdf|avro|protobuf|great-expectati │
827
839
  │ ons|terraform|avro-idl|sql|sql-query|html|go|bigquer │
828
- │ y|dbml|spark|sqlalchemy]
840
+ │ y|dbml|spark|sqlalchemy|data-caterer|dcs]
829
841
  │ --output PATH Specify the file path where the exported data will be │
830
842
  │ saved. If no path is provided, the output will be │
831
843
  │ printed to stdout. │
@@ -857,26 +869,30 @@ Available export options:
857
869
 
858
870
  | Type | Description | Status |
859
871
  |----------------------|---------------------------------------------------------|--------|
860
- | `html` | Export to HTML | ✅ |
861
- | `jsonschema` | Export to JSON Schema | ✅ |
862
- | `odcs` | Export to Open Data Contract Standard (ODCS) | ✅ |
863
- | `sodacl` | Export to SodaCL quality checks in YAML format | ✅ |
864
- | `dbt` | Export to dbt models in YAML format | ✅ |
865
- | `dbt-sources` | Export to dbt sources in YAML format | ✅ |
866
- | `dbt-staging-sql` | Export to dbt staging SQL models | ✅ |
867
- | `rdf` | Export data contract to RDF representation in N3 format | ✅ |
868
- | `avro` | Export to AVRO models | ✅ |
869
- | `protobuf` | Export to Protobuf | ✅ |
870
- | `terraform` | Export to terraform resources | ✅ |
871
- | `sql` | Export to SQL DDL | ✅ |
872
- | `sql-query` | Export to SQL Query | ✅ |
873
- | `great-expectations` | Export to Great Expectations Suites in JSON Format | ✅ |
874
- | `bigquery` | Export to BigQuery Schemas | ✅ |
875
- | `go` | Export to Go types | ✅ |
876
- | `pydantic-model` | Export to pydantic models | ✅ |
877
- | `DBML` | Export to a DBML Diagram description | ✅ |
878
- | `spark` | Export to a Spark StructType | ✅ |
879
- | `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
872
+ | `html` | Export to HTML | ✅ |
873
+ | `jsonschema` | Export to JSON Schema | ✅ |
874
+ | `odcs_v2` | Export to Open Data Contract Standard (ODCS) V2 | ✅ |
875
+ | `odcs_v3` | Export to Open Data Contract Standard (ODCS) V3 | ✅ |
876
+ | `odcs` | Export to Open Data Contract Standard (ODCS) V3 | ✅ |
877
+ | `sodacl` | Export to SodaCL quality checks in YAML format | ✅ |
878
+ | `dbt` | Export to dbt models in YAML format | ✅ |
879
+ | `dbt-sources` | Export to dbt sources in YAML format | ✅ |
880
+ | `dbt-staging-sql` | Export to dbt staging SQL models | ✅ |
881
+ | `rdf` | Export data contract to RDF representation in N3 format | ✅ |
882
+ | `avro` | Export to AVRO models | ✅ |
883
+ | `protobuf` | Export to Protobuf | ✅ |
884
+ | `terraform` | Export to terraform resources | ✅ |
885
+ | `sql` | Export to SQL DDL | ✅ |
886
+ | `sql-query` | Export to SQL Query | ✅ |
887
+ | `great-expectations` | Export to Great Expectations Suites in JSON Format | ✅ |
888
+ | `bigquery` | Export to BigQuery Schemas | ✅ |
889
+ | `go` | Export to Go types | ✅ |
890
+ | `pydantic-model` | Export to pydantic models | ✅ |
891
+ | `DBML` | Export to a DBML Diagram description | ✅ |
892
+ | `spark` | Export to a Spark StructType | ✅ |
893
+ | `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
894
+ | `data-caterer` | Export to Data Caterer in YAML format | ✅ |
895
+ | `dcs` | Export to Data Contract Specification in YAML format | ✅ |
880
896
  | Missing something? | Please create an issue on GitHub | TBD |
881
897
 
882
898
  #### Great Expectations
@@ -940,6 +956,20 @@ To specify custom Avro properties in your data contract, you can define them wit
940
956
 
941
957
  >NOTE: At this moment, we just support [logicalType](https://avro.apache.org/docs/1.11.0/spec.html#Logical+Types) and [default](https://avro.apache.org/docs/1.11.0/spec.htm)
942
958
 
959
+ #### Data Caterer
960
+
961
+ The export function converts the data contract to a data generation task in YAML format that can be
962
+ ingested by [Data Caterer](https://github.com/data-catering/data-caterer). This gives you the
963
+ ability to generate production-like data in any environment based off your data contract.
964
+
965
+ ```shell
966
+ datacontract export datacontract.yaml --format data-caterer --model orders
967
+ ```
968
+
969
+ You can further customise the way data is generated via adding
970
+ [additional metadata in the YAML](https://data.catering/setup/generator/data-generator/)
971
+ to suit your needs.
972
+
943
973
  #### Example Configuration
944
974
 
945
975
  ```yaml
@@ -980,7 +1010,7 @@ models:
980
1010
 
981
1011
  ╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
982
1012
  │ * --format [sql|avro|dbt|glue|jsonschema|bigquery|odcs The format of the source file. │
983
- │ |unity|spark] [default: None] │
1013
+ │ |unity|spark|iceberg] [default: None] │
984
1014
  │ [required] │
985
1015
  │ --source TEXT The path to the file or Glue Database that │
986
1016
  │ should be imported. │
@@ -1010,6 +1040,8 @@ models:
1010
1040
  │ file (repeat for multiple table names, leave │
1011
1041
  │ empty for all tables in the file). │
1012
1042
  │ [default: None] │
1043
+ │ --iceberg-table TEXT Table name to assign to the model created │
1044
+ │ from the Iceberg schema. [default: None] │
1013
1045
  │ --help Show this message and exit. │
1014
1046
  ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
1015
1047
  ```
@@ -1035,12 +1067,25 @@ Available import options:
1035
1067
  | `spark` | Import from Spark StructTypes | ✅ |
1036
1068
  | `dbml` | Import from DBML models | ✅ |
1037
1069
  | `protobuf` | Import from Protobuf schemas | TBD |
1070
+ | `iceberg` | Import from an Iceberg JSON Schema Definition | partial |
1038
1071
  | Missing something? | Please create an issue on GitHub | TBD |
1039
1072
 
1040
1073
 
1074
+ #### ODCS
1075
+
1076
+ Import from Open Data Contract Standard (ODCS) v2 or v3.
1077
+ The importer automatically detects the ODCS version and imports the data contract.
1078
+
1079
+ Examples:
1080
+
1081
+ ```bash
1082
+ # Example import from ODCS
1083
+ datacontract import --format odcs --source my_data_contract.odcs.yaml
1084
+ ```
1085
+
1041
1086
  #### BigQuery
1042
1087
 
1043
- Bigquery data can either be imported off of JSON Files generated from the table descriptions or directly from the Bigquery API. In case you want to use JSON Files, specify the `source` parameter with a path to the JSON File.
1088
+ BigQuery data can either be imported off of JSON Files generated from the table descriptions or directly from the Bigquery API. In case you want to use JSON Files, specify the `source` parameter with a path to the JSON File.
1044
1089
 
1045
1090
  To import from the Bigquery API, you have to _omit_ `source` and instead need to provide `bigquery-project` and `bigquery-dataset`. Additionally you may specify `bigquery-table` to enumerate the tables that should be imported. If no tables are given, _all_ available tables of the dataset will be imported.
1046
1091
 
@@ -1152,6 +1197,15 @@ datacontract import --format dbml --source <file_path> --dbml-table <table_name_
1152
1197
  datacontract import --format dbml --source <file_path> --dbml-table <table_name_1> --dbml-schema <schema_1>
1153
1198
  ```
1154
1199
 
1200
+ #### Iceberg
1201
+
1202
+ Importing from an [Iceberg Table Json Schema Definition](https://iceberg.apache.org/spec/#appendix-c-json-serialization). Specify location of json files using the `source` parameter.
1203
+
1204
+ Examples:
1205
+
1206
+ ```bash
1207
+ datacontract import --format iceberg --source ./tests/fixtures/iceberg/simple_schema.json --iceberg-table test-table
1208
+ ```
1155
1209
 
1156
1210
  ### breaking
1157
1211
 
@@ -8,8 +8,8 @@
8
8
  <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>
9
9
  </p>
10
10
 
11
- The `datacontract` CLI is an open source command-line tool for working with [Data Contracts](https://datacontract.com/).
12
- 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.
11
+ The `datacontract` CLI is an open-source command-line tool for working with data contracts.
12
+ It uses data contract YAML files as [Data Contract Specification](https://datacontract.com/) or [ODCS](https://bitol-io.github.io/open-data-contract-standard/latest/) to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
13
13
 
14
14
  ![Main features of the Data Contract CLI](datacontractcli.png)
15
15
 
@@ -21,15 +21,15 @@ Let's look at this data contract:
21
21
 
22
22
  We have a _servers_ section with endpoint details to the S3 bucket, _models_ for the structure of the data, _servicelevels_ and _quality_ attributes that describe the expected freshness and number of rows.
23
23
 
24
- This data contract contains all information to connect to S3 and check that the actual data meets the defined schema and quality requirements. We can use this information to test if the actual data set in S3 is compliant to the data contract.
24
+ This data contract contains all information to connect to S3 and check that the actual data meets the defined schema and quality requirements. We can use this information to test if the actual data product in S3 is compliant to the data contract.
25
25
 
26
- Let's use [pip](https://pip.pypa.io/en/stable/getting-started/) to install the CLI (or use the [Docker image](#docker), if you prefer).
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
28
  $ python3 -m pip install datacontract-cli[all]
29
29
  ```
30
30
 
31
31
 
32
- We run the tests:
32
+ now, let's run the tests:
33
33
 
34
34
  ```bash
35
35
  $ datacontract test https://datacontract.com/examples/orders-latest/datacontract.yaml
@@ -67,7 +67,7 @@ Testing https://datacontract.com/examples/orders-latest/datacontract.yaml
67
67
 
68
68
  Voilà, the CLI tested that the _datacontract.yaml_ itself is valid, all records comply with the schema, and all quality attributes are met.
69
69
 
70
- We can also use the datacontract.yaml to export in many [formats](#format), e.g., to SQL:
70
+ We can also use the datacontract.yaml to export in many [formats](#format), e.g., to generate a SQL DDL:
71
71
 
72
72
  ```bash
73
73
  $ datacontract export --format sql https://datacontract.com/examples/orders-latest/datacontract.yaml
@@ -114,7 +114,7 @@ $ datacontract test datacontract.yaml
114
114
  # execute schema and quality checks on the examples within the contract
115
115
  $ datacontract test --examples datacontract.yaml
116
116
 
117
- # export data contract as html (other formats: avro, dbt, dbt-sources, dbt-staging-sql, jsonschema, odcs, rdf, sql, sodacl, terraform, ...)
117
+ # export data contract as html (other formats: avro, dbt, dbt-sources, dbt-staging-sql, jsonschema, odcs_v2, odcs_v3, rdf, sql, sodacl, terraform, ...)
118
118
  $ datacontract export --format html datacontract.yaml > datacontract.html
119
119
 
120
120
  # import avro (other formats: sql, glue, bigquery...)
@@ -147,8 +147,7 @@ if not run.has_passed():
147
147
  Choose the most appropriate installation method for your needs:
148
148
 
149
149
  ### pip
150
- Python 3.11 recommended.
151
- Python 3.12 available as pre-release release candidate for 0.9.3
150
+ Python 3.10, 3.11, and 3.12 are supported. We recommend to use Python 3.11.
152
151
 
153
152
  ```bash
154
153
  python3 -m pip install datacontract-cli[all]
@@ -162,17 +161,22 @@ pipx install datacontract-cli[all]
162
161
 
163
162
  ### Docker
164
163
 
164
+ You can also use our Docker image to run the CLI tool. It is also convenient for CI/CD pipelines.
165
+
165
166
  ```bash
166
167
  docker pull datacontract/cli
167
168
  docker run --rm -v ${PWD}:/home/datacontract datacontract/cli
168
169
  ```
169
170
 
170
- Or via an alias that automatically uses the latest version:
171
+ You can create an alias for the Docker command to make it easier to use:
171
172
 
172
173
  ```bash
173
174
  alias datacontract='docker run --rm -v "${PWD}:/home/datacontract" datacontract/cli:latest'
174
175
  ```
175
176
 
177
+ _Note:_ The output of Docker command line messages is limited to 80 columns and may include line breaks. Don't pipe docker output to files if you want to export code. Use the `--output` option instead.
178
+
179
+
176
180
 
177
181
  ## Optional Dependencies
178
182
 
@@ -665,10 +669,11 @@ servers:
665
669
 
666
670
  #### Environment Variables
667
671
 
668
- | Environment Variable | Example | Description |
669
- |------------------------------------|---------|-----------------------------|
670
- | `DATACONTRACT_KAFKA_SASL_USERNAME` | `xxx` | The SASL username (key). |
671
- | `DATACONTRACT_KAFKA_SASL_PASSWORD` | `xxx` | The SASL password (secret). |
672
+ | Environment Variable | Example | Description |
673
+ |-------------------------------------|---------|----------------------------------------------------------------------------------|
674
+ | `DATACONTRACT_KAFKA_SASL_USERNAME` | `xxx` | The SASL username (key). |
675
+ | `DATACONTRACT_KAFKA_SASL_PASSWORD` | `xxx` | The SASL password (secret). |
676
+ | `DATACONTRACT_KAFKA_SASL_MECHANISM` | `PLAIN` | Default `PLAIN`. Other supported mechanisms: `SCRAM-SHA-256` and `SCRAM-SHA-512` |
672
677
 
673
678
 
674
679
  ### Postgres
@@ -723,6 +728,10 @@ models:
723
728
  fields:
724
729
  my_column_1: # corresponds to a column
725
730
  type: varchar
731
+ my_column_2: # corresponds to a column with custom trino type
732
+ type: object
733
+ config:
734
+ trinoType: row(en_us varchar, pt_br varchar)
726
735
  ```
727
736
 
728
737
  #### Environment Variables
@@ -749,7 +758,7 @@ models:
749
758
  │ * --format [jsonschema|pydantic-model|sodacl|dbt|dbt-sources|db The export format. [default: None] [required] │
750
759
  │ t-staging-sql|odcs|rdf|avro|protobuf|great-expectati │
751
760
  │ ons|terraform|avro-idl|sql|sql-query|html|go|bigquer │
752
- │ y|dbml|spark|sqlalchemy]
761
+ │ y|dbml|spark|sqlalchemy|data-caterer|dcs]
753
762
  │ --output PATH Specify the file path where the exported data will be │
754
763
  │ saved. If no path is provided, the output will be │
755
764
  │ printed to stdout. │
@@ -781,26 +790,30 @@ Available export options:
781
790
 
782
791
  | Type | Description | Status |
783
792
  |----------------------|---------------------------------------------------------|--------|
784
- | `html` | Export to HTML | ✅ |
785
- | `jsonschema` | Export to JSON Schema | ✅ |
786
- | `odcs` | Export to Open Data Contract Standard (ODCS) | ✅ |
787
- | `sodacl` | Export to SodaCL quality checks in YAML format | ✅ |
788
- | `dbt` | Export to dbt models in YAML format | ✅ |
789
- | `dbt-sources` | Export to dbt sources in YAML format | ✅ |
790
- | `dbt-staging-sql` | Export to dbt staging SQL models | ✅ |
791
- | `rdf` | Export data contract to RDF representation in N3 format | ✅ |
792
- | `avro` | Export to AVRO models | ✅ |
793
- | `protobuf` | Export to Protobuf | ✅ |
794
- | `terraform` | Export to terraform resources | ✅ |
795
- | `sql` | Export to SQL DDL | ✅ |
796
- | `sql-query` | Export to SQL Query | ✅ |
797
- | `great-expectations` | Export to Great Expectations Suites in JSON Format | ✅ |
798
- | `bigquery` | Export to BigQuery Schemas | ✅ |
799
- | `go` | Export to Go types | ✅ |
800
- | `pydantic-model` | Export to pydantic models | ✅ |
801
- | `DBML` | Export to a DBML Diagram description | ✅ |
802
- | `spark` | Export to a Spark StructType | ✅ |
803
- | `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
793
+ | `html` | Export to HTML | ✅ |
794
+ | `jsonschema` | Export to JSON Schema | ✅ |
795
+ | `odcs_v2` | Export to Open Data Contract Standard (ODCS) V2 | ✅ |
796
+ | `odcs_v3` | Export to Open Data Contract Standard (ODCS) V3 | ✅ |
797
+ | `odcs` | Export to Open Data Contract Standard (ODCS) V3 | ✅ |
798
+ | `sodacl` | Export to SodaCL quality checks in YAML format | ✅ |
799
+ | `dbt` | Export to dbt models in YAML format | ✅ |
800
+ | `dbt-sources` | Export to dbt sources in YAML format | ✅ |
801
+ | `dbt-staging-sql` | Export to dbt staging SQL models | ✅ |
802
+ | `rdf` | Export data contract to RDF representation in N3 format | ✅ |
803
+ | `avro` | Export to AVRO models | ✅ |
804
+ | `protobuf` | Export to Protobuf | ✅ |
805
+ | `terraform` | Export to terraform resources | ✅ |
806
+ | `sql` | Export to SQL DDL | ✅ |
807
+ | `sql-query` | Export to SQL Query | ✅ |
808
+ | `great-expectations` | Export to Great Expectations Suites in JSON Format | ✅ |
809
+ | `bigquery` | Export to BigQuery Schemas | ✅ |
810
+ | `go` | Export to Go types | ✅ |
811
+ | `pydantic-model` | Export to pydantic models | ✅ |
812
+ | `DBML` | Export to a DBML Diagram description | ✅ |
813
+ | `spark` | Export to a Spark StructType | ✅ |
814
+ | `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
815
+ | `data-caterer` | Export to Data Caterer in YAML format | ✅ |
816
+ | `dcs` | Export to Data Contract Specification in YAML format | ✅ |
804
817
  | Missing something? | Please create an issue on GitHub | TBD |
805
818
 
806
819
  #### Great Expectations
@@ -864,6 +877,20 @@ To specify custom Avro properties in your data contract, you can define them wit
864
877
 
865
878
  >NOTE: At this moment, we just support [logicalType](https://avro.apache.org/docs/1.11.0/spec.html#Logical+Types) and [default](https://avro.apache.org/docs/1.11.0/spec.htm)
866
879
 
880
+ #### Data Caterer
881
+
882
+ The export function converts the data contract to a data generation task in YAML format that can be
883
+ ingested by [Data Caterer](https://github.com/data-catering/data-caterer). This gives you the
884
+ ability to generate production-like data in any environment based off your data contract.
885
+
886
+ ```shell
887
+ datacontract export datacontract.yaml --format data-caterer --model orders
888
+ ```
889
+
890
+ You can further customise the way data is generated via adding
891
+ [additional metadata in the YAML](https://data.catering/setup/generator/data-generator/)
892
+ to suit your needs.
893
+
867
894
  #### Example Configuration
868
895
 
869
896
  ```yaml
@@ -904,7 +931,7 @@ models:
904
931
 
905
932
  ╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
906
933
  │ * --format [sql|avro|dbt|glue|jsonschema|bigquery|odcs The format of the source file. │
907
- │ |unity|spark] [default: None] │
934
+ │ |unity|spark|iceberg] [default: None] │
908
935
  │ [required] │
909
936
  │ --source TEXT The path to the file or Glue Database that │
910
937
  │ should be imported. │
@@ -934,6 +961,8 @@ models:
934
961
  │ file (repeat for multiple table names, leave │
935
962
  │ empty for all tables in the file). │
936
963
  │ [default: None] │
964
+ │ --iceberg-table TEXT Table name to assign to the model created │
965
+ │ from the Iceberg schema. [default: None] │
937
966
  │ --help Show this message and exit. │
938
967
  ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
939
968
  ```
@@ -959,12 +988,25 @@ Available import options:
959
988
  | `spark` | Import from Spark StructTypes | ✅ |
960
989
  | `dbml` | Import from DBML models | ✅ |
961
990
  | `protobuf` | Import from Protobuf schemas | TBD |
991
+ | `iceberg` | Import from an Iceberg JSON Schema Definition | partial |
962
992
  | Missing something? | Please create an issue on GitHub | TBD |
963
993
 
964
994
 
995
+ #### ODCS
996
+
997
+ Import from Open Data Contract Standard (ODCS) v2 or v3.
998
+ The importer automatically detects the ODCS version and imports the data contract.
999
+
1000
+ Examples:
1001
+
1002
+ ```bash
1003
+ # Example import from ODCS
1004
+ datacontract import --format odcs --source my_data_contract.odcs.yaml
1005
+ ```
1006
+
965
1007
  #### BigQuery
966
1008
 
967
- Bigquery data can either be imported off of JSON Files generated from the table descriptions or directly from the Bigquery API. In case you want to use JSON Files, specify the `source` parameter with a path to the JSON File.
1009
+ BigQuery data can either be imported off of JSON Files generated from the table descriptions or directly from the Bigquery API. In case you want to use JSON Files, specify the `source` parameter with a path to the JSON File.
968
1010
 
969
1011
  To import from the Bigquery API, you have to _omit_ `source` and instead need to provide `bigquery-project` and `bigquery-dataset`. Additionally you may specify `bigquery-table` to enumerate the tables that should be imported. If no tables are given, _all_ available tables of the dataset will be imported.
970
1012
 
@@ -1076,6 +1118,15 @@ datacontract import --format dbml --source <file_path> --dbml-table <table_name_
1076
1118
  datacontract import --format dbml --source <file_path> --dbml-table <table_name_1> --dbml-schema <schema_1>
1077
1119
  ```
1078
1120
 
1121
+ #### Iceberg
1122
+
1123
+ Importing from an [Iceberg Table Json Schema Definition](https://iceberg.apache.org/spec/#appendix-c-json-serialization). Specify location of json files using the `source` parameter.
1124
+
1125
+ Examples:
1126
+
1127
+ ```bash
1128
+ datacontract import --format iceberg --source ./tests/fixtures/iceberg/simple_schema.json --iceberg-table test-table
1129
+ ```
1079
1130
 
1080
1131
  ### breaking
1081
1132
 
@@ -244,6 +244,10 @@ def import_(
244
244
  help="List of table names to import from the DBML file (repeat for multiple table names, leave empty for all tables in the file)."
245
245
  ),
246
246
  ] = None,
247
+ iceberg_table: Annotated[
248
+ Optional[str],
249
+ typer.Option(help="Table name to assign to the model created from the Iceberg schema."),
250
+ ] = None,
247
251
  ):
248
252
  """
249
253
  Create a data contract from the given source location. Prints to stdout.
@@ -259,6 +263,7 @@ def import_(
259
263
  dbt_model=dbt_model,
260
264
  dbml_schema=dbml_schema,
261
265
  dbml_table=dbml_table,
266
+ iceberg_table=iceberg_table,
262
267
  )
263
268
  console.print(result.to_yaml())
264
269
 
@@ -199,7 +199,15 @@ class DataContract:
199
199
 
200
200
  except DataContractException as e:
201
201
  run.checks.append(
202
- Check(type=e.type, result=e.result, name=e.name, reason=e.reason, engine=e.engine, details="")
202
+ Check(
203
+ type=e.type,
204
+ name=e.name,
205
+ result=e.result,
206
+ reason=e.reason,
207
+ model=e.model,
208
+ engine=e.engine,
209
+ details="",
210
+ )
203
211
  )
204
212
  run.log_error(str(e))
205
213
  except Exception as e: