datacontract-cli 0.10.11__tar.gz → 0.10.13__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 (190) hide show
  1. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/PKG-INFO +123 -32
  2. datacontract_cli-0.10.11/datacontract_cli.egg-info/PKG-INFO → datacontract_cli-0.10.13/README.md +95 -81
  3. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/cli.py +19 -3
  4. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/data_contract.py +5 -10
  5. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/fastjsonschema/check_jsonschema.py +11 -0
  6. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/fastjsonschema/s3/s3_read_files.py +2 -0
  7. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/soda/check_soda_execute.py +2 -8
  8. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/soda/connections/duckdb.py +23 -24
  9. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/soda/connections/kafka.py +84 -25
  10. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/avro_converter.py +12 -2
  11. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/bigquery_converter.py +30 -23
  12. datacontract_cli-0.10.13/datacontract/export/data_caterer_converter.py +148 -0
  13. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/dbml_converter.py +3 -2
  14. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/exporter.py +2 -0
  15. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/exporter_factory.py +12 -0
  16. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/jsonschema_converter.py +13 -2
  17. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/spark_converter.py +5 -1
  18. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/sql_type_converter.py +65 -39
  19. datacontract_cli-0.10.13/datacontract/export/sqlalchemy_converter.py +169 -0
  20. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/imports/avro_importer.py +1 -0
  21. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/imports/bigquery_importer.py +2 -2
  22. datacontract_cli-0.10.13/datacontract/imports/dbml_importer.py +112 -0
  23. datacontract_cli-0.10.13/datacontract/imports/dbt_importer.py +93 -0
  24. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/imports/glue_importer.py +62 -58
  25. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/imports/importer.py +2 -1
  26. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/imports/importer_factory.py +5 -0
  27. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/imports/odcs_importer.py +1 -1
  28. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/imports/spark_importer.py +34 -11
  29. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/imports/sql_importer.py +1 -1
  30. datacontract_cli-0.10.13/datacontract/imports/unity_importer.py +173 -0
  31. datacontract_cli-0.10.11/datacontract/integration/publish_datamesh_manager.py → datacontract_cli-0.10.13/datacontract/integration/datamesh_manager.py +33 -5
  32. datacontract_cli-0.10.11/datacontract/integration/publish_opentelemetry.py → datacontract_cli-0.10.13/datacontract/integration/opentelemetry.py +1 -1
  33. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/lint/resolve.py +10 -1
  34. datacontract_cli-0.10.13/datacontract/lint/urls.py +54 -0
  35. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/model/data_contract_specification.py +6 -2
  36. datacontract_cli-0.10.11/README.md → datacontract_cli-0.10.13/datacontract_cli.egg-info/PKG-INFO +172 -4
  37. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract_cli.egg-info/SOURCES.txt +11 -3
  38. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract_cli.egg-info/requires.txt +28 -27
  39. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/pyproject.toml +41 -35
  40. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_breaking.py +1 -3
  41. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_catalog.py +1 -2
  42. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_changelog.py +1 -3
  43. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_cli.py +1 -3
  44. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_avro.py +23 -2
  45. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_bigquery.py +1 -3
  46. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_complex_data_contract.py +3 -3
  47. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_custom_exporter.py +1 -2
  48. datacontract_cli-0.10.13/tests/test_export_data_caterer.py +90 -0
  49. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_dbml.py +5 -3
  50. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_dbt_models.py +1 -2
  51. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_dbt_sources.py +1 -3
  52. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_dbt_staging_sql.py +1 -3
  53. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_go.py +1 -3
  54. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_great_expectations.py +1 -2
  55. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_html.py +1 -2
  56. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_jsonschema.py +5 -6
  57. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_odcs.py +1 -2
  58. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_protobuf.py +1 -3
  59. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_rdf.py +1 -2
  60. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_spark.py +38 -3
  61. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_sql.py +1 -3
  62. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_sql_query.py +1 -3
  63. datacontract_cli-0.10.13/tests/test_export_sqlalchemy.py +91 -0
  64. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_terraform.py +1 -3
  65. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_import_avro.py +3 -3
  66. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_import_bigquery.py +1 -3
  67. datacontract_cli-0.10.13/tests/test_import_dbml.py +68 -0
  68. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_import_dbt.py +4 -6
  69. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_import_glue.py +55 -5
  70. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_import_jsonschema.py +1 -3
  71. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_import_odcs.py +1 -2
  72. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_import_spark.py +82 -1
  73. datacontract_cli-0.10.13/tests/test_import_unity_file.py +65 -0
  74. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_integration_datameshmanager.py +1 -3
  75. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_integration_opentelemetry.py +2 -3
  76. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_lint.py +1 -3
  77. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_resolve.py +1 -2
  78. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_roundtrip_jsonschema.py +1 -2
  79. datacontract_cli-0.10.13/tests/test_spec_fields_field.py +17 -0
  80. datacontract_cli-0.10.13/tests/test_spec_ref.py +15 -0
  81. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_azure_parquet_remote.py +1 -2
  82. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_bigquery.py +1 -2
  83. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_databricks.py +1 -2
  84. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_examples_csv.py +1 -3
  85. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_examples_formats_valid.py +1 -3
  86. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_examples_inline.py +2 -5
  87. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_examples_json.py +1 -3
  88. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_examples_missing.py +1 -3
  89. datacontract_cli-0.10.13/tests/test_test_gcs_json_remote.py +48 -0
  90. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_kafka.py +13 -27
  91. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_kafka_remote.py +1 -2
  92. datacontract_cli-0.10.13/tests/test_test_parquet.py +146 -0
  93. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_postgres.py +1 -3
  94. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_s3_csv.py +1 -2
  95. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_s3_delta.py +10 -2
  96. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_s3_json_multiple_models.py +1 -2
  97. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_s3_json_remote.py +1 -2
  98. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_snowflake.py +1 -3
  99. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_sqlserver.py +3 -4
  100. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_trino.py +1 -1
  101. datacontract_cli-0.10.13/tests/test_web.py +37 -0
  102. datacontract_cli-0.10.11/datacontract/imports/dbt_importer.py +0 -117
  103. datacontract_cli-0.10.11/datacontract/imports/unity_importer.py +0 -152
  104. datacontract_cli-0.10.11/datacontract/lint/urls.py +0 -40
  105. datacontract_cli-0.10.11/datacontract/publish/publish.py +0 -32
  106. datacontract_cli-0.10.11/tests/test_import_unity_file.py +0 -37
  107. datacontract_cli-0.10.11/tests/test_test_parquet.py +0 -59
  108. datacontract_cli-0.10.11/tests/test_web.py +0 -34
  109. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/LICENSE +0 -0
  110. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/MANIFEST.in +0 -0
  111. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/__init__.py +0 -0
  112. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/breaking/breaking.py +0 -0
  113. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/breaking/breaking_rules.py +0 -0
  114. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/catalog/catalog.py +0 -0
  115. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/__init__.py +0 -0
  116. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py +0 -0
  117. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/datacontract/check_that_datacontract_file_exists.py +0 -0
  118. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/datacontract/check_that_datacontract_str_is_valid.py +0 -0
  119. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/soda/__init__.py +0 -0
  120. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/soda/connections/bigquery.py +0 -0
  121. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/soda/connections/dask.py +0 -0
  122. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/soda/connections/databricks.py +0 -0
  123. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/soda/connections/postgres.py +0 -0
  124. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/soda/connections/snowflake.py +0 -0
  125. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/soda/connections/sqlserver.py +0 -0
  126. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/engines/soda/connections/trino.py +0 -0
  127. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/__init__.py +0 -0
  128. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/avro_idl_converter.py +0 -0
  129. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/csv_type_converter.py +0 -0
  130. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/dbt_converter.py +0 -0
  131. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/go_converter.py +0 -0
  132. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/great_expectations_converter.py +0 -0
  133. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/html_export.py +0 -0
  134. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/odcs_converter.py +0 -0
  135. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/protobuf_converter.py +0 -0
  136. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/pydantic_converter.py +0 -0
  137. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/rdf_converter.py +0 -0
  138. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/sodacl_converter.py +0 -0
  139. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/sql_converter.py +0 -0
  140. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/export/terraform_converter.py +0 -0
  141. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/imports/jsonschema_importer.py +0 -0
  142. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/init/download_datacontract_file.py +0 -0
  143. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/lint/files.py +0 -0
  144. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/lint/lint.py +0 -0
  145. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/lint/linters/__init__.py +0 -0
  146. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/lint/linters/description_linter.py +0 -0
  147. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/lint/linters/example_model_linter.py +0 -0
  148. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/lint/linters/field_pattern_linter.py +0 -0
  149. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/lint/linters/field_reference_linter.py +0 -0
  150. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/lint/linters/notice_period_linter.py +0 -0
  151. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/lint/linters/quality_schema_linter.py +0 -0
  152. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/lint/linters/valid_constraints_linter.py +0 -0
  153. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/lint/schema.py +0 -0
  154. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/model/breaking_change.py +0 -0
  155. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/model/exceptions.py +0 -0
  156. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/model/run.py +0 -0
  157. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/py.typed +0 -0
  158. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/templates/datacontract.html +0 -0
  159. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/templates/index.html +0 -0
  160. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/templates/partials/datacontract_information.html +0 -0
  161. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/templates/partials/datacontract_servicelevels.html +0 -0
  162. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/templates/partials/datacontract_terms.html +0 -0
  163. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/templates/partials/definition.html +0 -0
  164. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/templates/partials/example.html +0 -0
  165. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/templates/partials/model_field.html +0 -0
  166. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/templates/partials/server.html +0 -0
  167. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/templates/style/output.css +0 -0
  168. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract/web.py +0 -0
  169. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract_cli.egg-info/dependency_links.txt +0 -0
  170. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract_cli.egg-info/entry_points.txt +0 -0
  171. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/datacontract_cli.egg-info/top_level.txt +0 -0
  172. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/setup.cfg +0 -0
  173. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_description_linter.py +0 -0
  174. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_documentation_linter.py +0 -0
  175. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_download_datacontract_file.py +0 -0
  176. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_example_model_linter.py +0 -0
  177. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_avro_idl.py +0 -0
  178. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_pydantic.py +0 -0
  179. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_export_sodacl.py +0 -0
  180. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_field_constraint_linter.py +0 -0
  181. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_field_pattern_linter.py +0 -0
  182. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_field_reference_linter.py +0 -0
  183. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_import_sql.py +0 -0
  184. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_notice_period_linter.py +0 -0
  185. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_quality_schema_linter.py +0 -0
  186. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_dataframe.py +0 -0
  187. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_delta.py +0 -0
  188. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_local_json.py +0 -0
  189. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_s3_json.py +0 -0
  190. {datacontract_cli-0.10.11 → datacontract_cli-0.10.13}/tests/test_test_s3_json_complex.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datacontract-cli
3
- Version: 0.10.11
3
+ Version: 0.10.13
4
4
  Summary: The datacontract CLI is an open source command-line tool for working with Data Contracts. It uses data contract YAML files to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
5
5
  Author-email: Jochen Christ <jochen.christ@innoq.com>, Stefan Negele <stefan.negele@innoq.com>, Simon Harrer <simon.harrer@innoq.com>
6
6
  Project-URL: Homepage, https://cli.datacontract.com
@@ -11,69 +11,69 @@ Classifier: Operating System :: OS Independent
11
11
  Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: typer[all]<0.13,>=0.9
15
- Requires-Dist: pydantic<2.9.0,>=2.8.2
14
+ Requires-Dist: typer<0.13,>=0.12
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.111.1
18
+ Requires-Dist: fastapi==0.114.2
19
+ Requires-Dist: uvicorn==0.30.6
20
+ Requires-Dist: fastjsonschema<2.21.0,>=2.19.1
19
21
  Requires-Dist: fastparquet==2024.5.0
20
22
  Requires-Dist: python-multipart==0.0.9
21
- Requires-Dist: rich~=13.7.0
22
- Requires-Dist: simple-ddl-parser==1.5.2
23
+ Requires-Dist: rich<13.9,>=13.7
24
+ Requires-Dist: simple-ddl-parser==1.6.1
25
+ Requires-Dist: duckdb==1.0.0
23
26
  Requires-Dist: soda-core-duckdb<3.4.0,>=3.3.1
24
27
  Requires-Dist: setuptools>=60
25
- Requires-Dist: duckdb==1.0.0
26
- Requires-Dist: fastjsonschema<2.21.0,>=2.19.1
27
28
  Requires-Dist: python-dotenv~=1.0.0
28
29
  Requires-Dist: rdflib==7.0.0
29
30
  Requires-Dist: opentelemetry-exporter-otlp-proto-grpc~=1.16
30
31
  Requires-Dist: opentelemetry-exporter-otlp-proto-http~=1.16
31
- Requires-Dist: boto3<1.34.137,>=1.34.41
32
- Requires-Dist: botocore<1.34.137,>=1.34.41
32
+ Requires-Dist: boto3<1.35.20,>=1.34.41
33
33
  Requires-Dist: jinja_partials>=0.2.1
34
34
  Provides-Extra: avro
35
- Requires-Dist: avro==1.11.3; extra == "avro"
35
+ Requires-Dist: avro==1.12.0; extra == "avro"
36
36
  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.5.0,>=3.1.2; extra == "databricks"
41
+ Requires-Dist: databricks-sdk<0.33.0,>=0.32.0; extra == "databricks"
41
42
  Requires-Dist: soda-core-spark[databricks]<3.4.0,>=3.3.1; extra == "databricks"
42
- Provides-Extra: deltalake
43
- Requires-Dist: deltalake<0.19,>=0.17; extra == "deltalake"
44
43
  Provides-Extra: kafka
45
44
  Requires-Dist: datacontract-cli[avro]; extra == "kafka"
46
45
  Requires-Dist: soda-core-spark-df<3.4.0,>=3.3.1; extra == "kafka"
47
46
  Provides-Extra: postgres
48
47
  Requires-Dist: soda-core-postgres<3.4.0,>=3.3.1; extra == "postgres"
49
48
  Provides-Extra: s3
50
- Requires-Dist: s3fs==2024.6.1; extra == "s3"
49
+ Requires-Dist: s3fs==2024.9.0; extra == "s3"
51
50
  Provides-Extra: snowflake
52
- Requires-Dist: snowflake-connector-python[pandas]<3.12,>=3.6; extra == "snowflake"
51
+ Requires-Dist: snowflake-connector-python[pandas]<3.13,>=3.6; extra == "snowflake"
53
52
  Requires-Dist: soda-core-snowflake<3.4.0,>=3.3.1; extra == "snowflake"
54
53
  Provides-Extra: sqlserver
55
54
  Requires-Dist: soda-core-sqlserver<3.4.0,>=3.3.1; extra == "sqlserver"
56
55
  Provides-Extra: trino
57
56
  Requires-Dist: soda-core-trino<3.4.0,>=3.3.1; extra == "trino"
57
+ Provides-Extra: dbt
58
+ Requires-Dist: dbt-core>=1.8.0; extra == "dbt"
59
+ Provides-Extra: dbml
60
+ Requires-Dist: pydbml>=1.1.1; extra == "dbml"
58
61
  Provides-Extra: all
59
- Requires-Dist: datacontract-cli[bigquery,databricks,deltalake,kafka,postgres,s3,snowflake,sqlserver,trino]; extra == "all"
62
+ Requires-Dist: datacontract-cli[bigquery,databricks,dbml,dbt,kafka,postgres,s3,snowflake,sqlserver,trino]; extra == "all"
60
63
  Provides-Extra: dev
61
64
  Requires-Dist: datacontract-cli[all]; extra == "dev"
62
- Requires-Dist: httpx==0.27.0; extra == "dev"
63
- Requires-Dist: ruff; extra == "dev"
65
+ Requires-Dist: httpx==0.27.2; extra == "dev"
66
+ Requires-Dist: kafka-python; extra == "dev"
67
+ Requires-Dist: moto==5.0.14; extra == "dev"
68
+ Requires-Dist: pandas>=2.1.0; extra == "dev"
64
69
  Requires-Dist: pre-commit<3.9.0,>=3.7.1; extra == "dev"
70
+ Requires-Dist: pyarrow>=12.0.0; extra == "dev"
65
71
  Requires-Dist: pytest; extra == "dev"
66
72
  Requires-Dist: pytest-xdist; extra == "dev"
67
- Requires-Dist: moto==5.0.11; extra == "dev"
68
- Requires-Dist: pymssql==2.3.0; extra == "dev"
69
- Requires-Dist: kafka-python; extra == "dev"
73
+ Requires-Dist: pymssql==2.3.1; extra == "dev"
74
+ Requires-Dist: ruff; extra == "dev"
75
+ Requires-Dist: testcontainers[kafka,minio,mssql,postgres]==4.8.1; extra == "dev"
70
76
  Requires-Dist: trino==0.329.0; extra == "dev"
71
- Requires-Dist: testcontainers==4.7.2; extra == "dev"
72
- Requires-Dist: testcontainers[core]==4.7.2; extra == "dev"
73
- Requires-Dist: testcontainers[minio]==4.7.2; extra == "dev"
74
- Requires-Dist: testcontainers[postgres]==4.7.2; extra == "dev"
75
- Requires-Dist: testcontainers[kafka]==4.7.2; extra == "dev"
76
- Requires-Dist: testcontainers[mssql]==4.7.2; extra == "dev"
77
77
 
78
78
  # Data Contract CLI
79
79
 
@@ -82,7 +82,7 @@ Requires-Dist: testcontainers[mssql]==4.7.2; extra == "dev"
82
82
  <img alt="Test Workflow" src="https://img.shields.io/github/actions/workflow/status/datacontract/datacontract-cli/ci.yaml?branch=main"></a>
83
83
  <a href="https://github.com/datacontract/datacontract-cli">
84
84
  <img alt="Stars" src="https://img.shields.io/github/stars/datacontract/datacontract-cli" /></a>
85
- <a href="https://datacontract.com/slack" rel="nofollow"><img src="https://camo.githubusercontent.com/5ade1fd1e76a6ab860802cdd2941fe2501e2ca2cb534e5d8968dbf864c13d33d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736c61636b2d6a6f696e5f636861742d77686974652e7376673f6c6f676f3d736c61636b267374796c653d736f6369616c" 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
+ <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>
86
86
  </p>
87
87
 
88
88
  The `datacontract` CLI is an open source command-line tool for working with [Data Contracts](https://datacontract.com/).
@@ -267,13 +267,13 @@ A list of available extras:
267
267
  | Avro Support | `pip install datacontract-cli[avro]` |
268
268
  | Google BigQuery | `pip install datacontract-cli[bigquery]` |
269
269
  | Databricks Integration | `pip install datacontract-cli[databricks]` |
270
- | Deltalake Integration | `pip install datacontract-cli[deltalake]` |
271
270
  | Kafka Integration | `pip install datacontract-cli[kafka]` |
272
271
  | PostgreSQL Integration | `pip install datacontract-cli[postgres]` |
273
272
  | S3 Integration | `pip install datacontract-cli[s3]` |
274
273
  | Snowflake Integration | `pip install datacontract-cli[snowflake]` |
275
274
  | Microsoft SQL Server | `pip install datacontract-cli[sqlserver]` |
276
275
  | Trino | `pip install datacontract-cli[trino]` |
276
+ | Dbt | `pip install datacontract-cli[dbt]` |
277
277
 
278
278
 
279
279
 
@@ -406,6 +406,12 @@ Feel free to create an [issue](https://github.com/datacontract/datacontract-cli/
406
406
 
407
407
  Data Contract CLI can test data that is stored in S3 buckets or any S3-compliant endpoints in various formats.
408
408
 
409
+ - CSV
410
+ - JSON
411
+ - Delta
412
+ - Parquet
413
+ - Iceberg (coming soon)
414
+
409
415
  #### Examples
410
416
 
411
417
  ##### JSON
@@ -444,6 +450,32 @@ servers:
444
450
 
445
451
 
446
452
 
453
+ ### Google Cloud Storage (GCS)
454
+
455
+ The [S3](#S3) integration also works with files on Google Cloud Storage through its [interoperability](https://cloud.google.com/storage/docs/interoperability).
456
+ Use `https://storage.googleapis.com` as the endpoint URL.
457
+
458
+ #### Example
459
+
460
+ datacontract.yaml
461
+ ```yaml
462
+ servers:
463
+ production:
464
+ type: s3
465
+ endpointUrl: https://storage.googleapis.com
466
+ location: s3://bucket-name/path/*/*.json # use s3:// schema instead of gs://
467
+ format: json
468
+ delimiter: new_line # new_line, array, or none
469
+ ```
470
+
471
+ #### Environment Variables
472
+
473
+ | Environment Variable | Example | Description |
474
+ |-------------------------------------|----------------|------------------------------------------------------------------------------------------|
475
+ | `DATACONTRACT_S3_ACCESS_KEY_ID` | `GOOG1EZZZ...` | The GCS [HMAC Key](https://cloud.google.com/storage/docs/authentication/hmackeys) Key ID |
476
+ | `DATACONTRACT_S3_SECRET_ACCESS_KEY` | `PDWWpb...` | The GCS [HMAC Key](https://cloud.google.com/storage/docs/authentication/hmackeys) Secret |
477
+
478
+
447
479
  ### BigQuery
448
480
 
449
481
  We support authentication to BigQuery using Service Account Key. The used Service Account should include the roles:
@@ -794,7 +826,7 @@ models:
794
826
  │ * --format [jsonschema|pydantic-model|sodacl|dbt|dbt-sources|db The export format. [default: None] [required] │
795
827
  │ t-staging-sql|odcs|rdf|avro|protobuf|great-expectati │
796
828
  │ ons|terraform|avro-idl|sql|sql-query|html|go|bigquer │
797
- │ y|dbml|spark]
829
+ │ y|dbml|spark|sqlalchemy|data-caterer]
798
830
  │ --output PATH Specify the file path where the exported data will be │
799
831
  │ saved. If no path is provided, the output will be │
800
832
  │ printed to stdout. │
@@ -845,6 +877,8 @@ Available export options:
845
877
  | `pydantic-model` | Export to pydantic models | ✅ |
846
878
  | `DBML` | Export to a DBML Diagram description | ✅ |
847
879
  | `spark` | Export to a Spark StructType | ✅ |
880
+ | `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
881
+ | `data-caterer` | Export to Data Caterer in YAML format | ✅ |
848
882
  | Missing something? | Please create an issue on GitHub | TBD |
849
883
 
850
884
  #### Great Expectations
@@ -908,6 +942,20 @@ To specify custom Avro properties in your data contract, you can define them wit
908
942
 
909
943
  >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)
910
944
 
945
+ #### Data Caterer
946
+
947
+ The export function converts the data contract to a data generation task in YAML format that can be
948
+ ingested by [Data Caterer](https://github.com/data-catering/data-caterer). This gives you the
949
+ ability to generate production-like data in any environment based off your data contract.
950
+
951
+ ```shell
952
+ datacontract export datacontract.yaml --format data-caterer --model orders
953
+ ```
954
+
955
+ You can further customise the way data is generated via adding
956
+ [additional metadata in the YAML](https://data.catering/setup/generator/data-generator/)
957
+ to suit your needs.
958
+
911
959
  #### Example Configuration
912
960
 
913
961
  ```yaml
@@ -918,6 +966,7 @@ models:
918
966
  description: Example for AVRO with Timestamp (microsecond precision) https://avro.apache.org/docs/current/spec.html#Local+timestamp+%28microsecond+precision%29
919
967
  type: long
920
968
  example: 1672534861000000 # Equivalent to 2023-01-01 01:01:01 in microseconds
969
+ required: true
921
970
  config:
922
971
  avroLogicalType: local-timestamp-micros
923
972
  avroDefault: 1672534861000000
@@ -932,6 +981,7 @@ models:
932
981
  - **description**: A textual description of the field.
933
982
  - **type**: The data type of the field. In this example, it is `long`.
934
983
  - **example**: An example value for the field.
984
+ - **required**: Is this a required field (as opposed to optional/nullable).
935
985
  - **config**: Section to specify custom Avro properties.
936
986
  - **avroLogicalType**: Specifies the logical type of the field in Avro. In this example, it is `local-timestamp-micros`.
937
987
  - **avroDefault**: Specifies the default value for the field in Avro. In this example, it is 1672534861000000 which corresponds to ` 2023-01-01 01:01:01 UTC`.
@@ -968,6 +1018,14 @@ models:
968
1018
  │ names, leave empty for all models in the │
969
1019
  │ dataset). │
970
1020
  │ [default: None] │
1021
+ │ --dbml-schema TEXT List of schema names to import from the DBML │
1022
+ │ file (repeat for multiple schema names, │
1023
+ │ leave empty for all tables in the file). │
1024
+ │ [default: None] │
1025
+ │ --dbml-table TEXT List of table names to import from the DBML │
1026
+ │ file (repeat for multiple table names, leave │
1027
+ │ empty for all tables in the file). │
1028
+ │ [default: None] │
971
1029
  │ --help Show this message and exit. │
972
1030
  ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
973
1031
  ```
@@ -991,6 +1049,7 @@ Available import options:
991
1049
  | `dbt` | Import from dbt models | ✅ |
992
1050
  | `odcs` | Import from Open Data Contract Standard (ODCS) | ✅ |
993
1051
  | `spark` | Import from Spark StructTypes | ✅ |
1052
+ | `dbml` | Import from DBML models | ✅ |
994
1053
  | `protobuf` | Import from Protobuf schemas | TBD |
995
1054
  | Missing something? | Please create an issue on GitHub | TBD |
996
1055
 
@@ -1078,6 +1137,38 @@ Example:
1078
1137
  datacontract import --format spark --source "users,orders"
1079
1138
  ```
1080
1139
 
1140
+ #### DBML
1141
+
1142
+ Importing from DBML Documents.
1143
+ **NOTE:** Since DBML does _not_ have strict requirements on the types of columns, this import _may_ create non-valid datacontracts, as not all types of fields can be properly mapped. In this case you will have to adapt the generated document manually.
1144
+ We also assume, that the description for models and fields is stored in a Note within the DBML model.
1145
+
1146
+ You may give the `dbml-table` or `dbml-schema` parameter to enumerate the tables or schemas that should be imported.
1147
+ If no tables are given, _all_ available tables of the source will be imported. Likewise, if no schema is given, _all_ schemas are imported.
1148
+
1149
+ Examples:
1150
+
1151
+ ```bash
1152
+ # Example import from DBML file, importing everything
1153
+ datacontract import --format dbml --source <file_path>
1154
+ ```
1155
+
1156
+ ```bash
1157
+ # Example import from DBML file, filtering for tables from specific schemas
1158
+ datacontract import --format dbml --source <file_path> --dbml-schema <schema_1> --dbml-schema <schema_2>
1159
+ ```
1160
+
1161
+ ```bash
1162
+ # Example import from DBML file, filtering for tables with specific names
1163
+ datacontract import --format dbml --source <file_path> --dbml-table <table_name_1> --dbml-table <table_name_2>
1164
+ ```
1165
+
1166
+ ```bash
1167
+ # Example import from DBML file, filtering for tables with specific names from a specific schema
1168
+ datacontract import --format dbml --source <file_path> --dbml-table <table_name_1> --dbml-schema <schema_1>
1169
+ ```
1170
+
1171
+
1081
1172
  ### breaking
1082
1173
 
1083
1174
  ```
@@ -1427,7 +1518,7 @@ if __name__ == "__main__":
1427
1518
  "models": [
1428
1519
  {
1429
1520
  "name": "model1",
1430
- "desctiption": "model description from app",
1521
+ "description": "model description from app",
1431
1522
  "columns": [
1432
1523
  {
1433
1524
  "name": "columnA",
@@ -1,80 +1,3 @@
1
- Metadata-Version: 2.1
2
- Name: datacontract-cli
3
- Version: 0.10.11
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
- Author-email: Jochen Christ <jochen.christ@innoq.com>, Stefan Negele <stefan.negele@innoq.com>, Simon Harrer <simon.harrer@innoq.com>
6
- Project-URL: Homepage, https://cli.datacontract.com
7
- Project-URL: Issues, https://github.com/datacontract/datacontract-cli/issues
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.10
12
- Description-Content-Type: text/markdown
13
- License-File: LICENSE
14
- Requires-Dist: typer[all]<0.13,>=0.9
15
- Requires-Dist: pydantic<2.9.0,>=2.8.2
16
- Requires-Dist: pyyaml~=6.0.1
17
- Requires-Dist: requests<2.33,>=2.31
18
- Requires-Dist: fastapi==0.111.1
19
- Requires-Dist: fastparquet==2024.5.0
20
- Requires-Dist: python-multipart==0.0.9
21
- Requires-Dist: rich~=13.7.0
22
- Requires-Dist: simple-ddl-parser==1.5.2
23
- Requires-Dist: soda-core-duckdb<3.4.0,>=3.3.1
24
- Requires-Dist: setuptools>=60
25
- Requires-Dist: duckdb==1.0.0
26
- Requires-Dist: fastjsonschema<2.21.0,>=2.19.1
27
- Requires-Dist: python-dotenv~=1.0.0
28
- Requires-Dist: rdflib==7.0.0
29
- Requires-Dist: opentelemetry-exporter-otlp-proto-grpc~=1.16
30
- Requires-Dist: opentelemetry-exporter-otlp-proto-http~=1.16
31
- Requires-Dist: boto3<1.34.137,>=1.34.41
32
- Requires-Dist: botocore<1.34.137,>=1.34.41
33
- Requires-Dist: jinja_partials>=0.2.1
34
- Provides-Extra: avro
35
- Requires-Dist: avro==1.11.3; extra == "avro"
36
- Provides-Extra: bigquery
37
- Requires-Dist: soda-core-bigquery<3.4.0,>=3.3.1; extra == "bigquery"
38
- Provides-Extra: databricks
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"
41
- Requires-Dist: soda-core-spark[databricks]<3.4.0,>=3.3.1; extra == "databricks"
42
- Provides-Extra: deltalake
43
- Requires-Dist: deltalake<0.19,>=0.17; extra == "deltalake"
44
- Provides-Extra: kafka
45
- Requires-Dist: datacontract-cli[avro]; extra == "kafka"
46
- Requires-Dist: soda-core-spark-df<3.4.0,>=3.3.1; extra == "kafka"
47
- Provides-Extra: postgres
48
- Requires-Dist: soda-core-postgres<3.4.0,>=3.3.1; extra == "postgres"
49
- Provides-Extra: s3
50
- Requires-Dist: s3fs==2024.6.1; extra == "s3"
51
- Provides-Extra: snowflake
52
- Requires-Dist: snowflake-connector-python[pandas]<3.12,>=3.6; extra == "snowflake"
53
- Requires-Dist: soda-core-snowflake<3.4.0,>=3.3.1; extra == "snowflake"
54
- Provides-Extra: sqlserver
55
- Requires-Dist: soda-core-sqlserver<3.4.0,>=3.3.1; extra == "sqlserver"
56
- Provides-Extra: trino
57
- Requires-Dist: soda-core-trino<3.4.0,>=3.3.1; extra == "trino"
58
- Provides-Extra: all
59
- Requires-Dist: datacontract-cli[bigquery,databricks,deltalake,kafka,postgres,s3,snowflake,sqlserver,trino]; extra == "all"
60
- Provides-Extra: dev
61
- Requires-Dist: datacontract-cli[all]; extra == "dev"
62
- Requires-Dist: httpx==0.27.0; extra == "dev"
63
- Requires-Dist: ruff; extra == "dev"
64
- Requires-Dist: pre-commit<3.9.0,>=3.7.1; extra == "dev"
65
- Requires-Dist: pytest; extra == "dev"
66
- Requires-Dist: pytest-xdist; extra == "dev"
67
- Requires-Dist: moto==5.0.11; extra == "dev"
68
- Requires-Dist: pymssql==2.3.0; extra == "dev"
69
- Requires-Dist: kafka-python; extra == "dev"
70
- Requires-Dist: trino==0.329.0; extra == "dev"
71
- Requires-Dist: testcontainers==4.7.2; extra == "dev"
72
- Requires-Dist: testcontainers[core]==4.7.2; extra == "dev"
73
- Requires-Dist: testcontainers[minio]==4.7.2; extra == "dev"
74
- Requires-Dist: testcontainers[postgres]==4.7.2; extra == "dev"
75
- Requires-Dist: testcontainers[kafka]==4.7.2; extra == "dev"
76
- Requires-Dist: testcontainers[mssql]==4.7.2; extra == "dev"
77
-
78
1
  # Data Contract CLI
79
2
 
80
3
  <p>
@@ -82,7 +5,7 @@ Requires-Dist: testcontainers[mssql]==4.7.2; extra == "dev"
82
5
  <img alt="Test Workflow" src="https://img.shields.io/github/actions/workflow/status/datacontract/datacontract-cli/ci.yaml?branch=main"></a>
83
6
  <a href="https://github.com/datacontract/datacontract-cli">
84
7
  <img alt="Stars" src="https://img.shields.io/github/stars/datacontract/datacontract-cli" /></a>
85
- <a href="https://datacontract.com/slack" rel="nofollow"><img src="https://camo.githubusercontent.com/5ade1fd1e76a6ab860802cdd2941fe2501e2ca2cb534e5d8968dbf864c13d33d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736c61636b2d6a6f696e5f636861742d77686974652e7376673f6c6f676f3d736c61636b267374796c653d736f6369616c" 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>
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>
86
9
  </p>
87
10
 
88
11
  The `datacontract` CLI is an open source command-line tool for working with [Data Contracts](https://datacontract.com/).
@@ -267,13 +190,13 @@ A list of available extras:
267
190
  | Avro Support | `pip install datacontract-cli[avro]` |
268
191
  | Google BigQuery | `pip install datacontract-cli[bigquery]` |
269
192
  | Databricks Integration | `pip install datacontract-cli[databricks]` |
270
- | Deltalake Integration | `pip install datacontract-cli[deltalake]` |
271
193
  | Kafka Integration | `pip install datacontract-cli[kafka]` |
272
194
  | PostgreSQL Integration | `pip install datacontract-cli[postgres]` |
273
195
  | S3 Integration | `pip install datacontract-cli[s3]` |
274
196
  | Snowflake Integration | `pip install datacontract-cli[snowflake]` |
275
197
  | Microsoft SQL Server | `pip install datacontract-cli[sqlserver]` |
276
198
  | Trino | `pip install datacontract-cli[trino]` |
199
+ | Dbt | `pip install datacontract-cli[dbt]` |
277
200
 
278
201
 
279
202
 
@@ -406,6 +329,12 @@ Feel free to create an [issue](https://github.com/datacontract/datacontract-cli/
406
329
 
407
330
  Data Contract CLI can test data that is stored in S3 buckets or any S3-compliant endpoints in various formats.
408
331
 
332
+ - CSV
333
+ - JSON
334
+ - Delta
335
+ - Parquet
336
+ - Iceberg (coming soon)
337
+
409
338
  #### Examples
410
339
 
411
340
  ##### JSON
@@ -444,6 +373,32 @@ servers:
444
373
 
445
374
 
446
375
 
376
+ ### Google Cloud Storage (GCS)
377
+
378
+ The [S3](#S3) integration also works with files on Google Cloud Storage through its [interoperability](https://cloud.google.com/storage/docs/interoperability).
379
+ Use `https://storage.googleapis.com` as the endpoint URL.
380
+
381
+ #### Example
382
+
383
+ datacontract.yaml
384
+ ```yaml
385
+ servers:
386
+ production:
387
+ type: s3
388
+ endpointUrl: https://storage.googleapis.com
389
+ location: s3://bucket-name/path/*/*.json # use s3:// schema instead of gs://
390
+ format: json
391
+ delimiter: new_line # new_line, array, or none
392
+ ```
393
+
394
+ #### Environment Variables
395
+
396
+ | Environment Variable | Example | Description |
397
+ |-------------------------------------|----------------|------------------------------------------------------------------------------------------|
398
+ | `DATACONTRACT_S3_ACCESS_KEY_ID` | `GOOG1EZZZ...` | The GCS [HMAC Key](https://cloud.google.com/storage/docs/authentication/hmackeys) Key ID |
399
+ | `DATACONTRACT_S3_SECRET_ACCESS_KEY` | `PDWWpb...` | The GCS [HMAC Key](https://cloud.google.com/storage/docs/authentication/hmackeys) Secret |
400
+
401
+
447
402
  ### BigQuery
448
403
 
449
404
  We support authentication to BigQuery using Service Account Key. The used Service Account should include the roles:
@@ -794,7 +749,7 @@ models:
794
749
  │ * --format [jsonschema|pydantic-model|sodacl|dbt|dbt-sources|db The export format. [default: None] [required] │
795
750
  │ t-staging-sql|odcs|rdf|avro|protobuf|great-expectati │
796
751
  │ ons|terraform|avro-idl|sql|sql-query|html|go|bigquer │
797
- │ y|dbml|spark]
752
+ │ y|dbml|spark|sqlalchemy|data-caterer]
798
753
  │ --output PATH Specify the file path where the exported data will be │
799
754
  │ saved. If no path is provided, the output will be │
800
755
  │ printed to stdout. │
@@ -845,6 +800,8 @@ Available export options:
845
800
  | `pydantic-model` | Export to pydantic models | ✅ |
846
801
  | `DBML` | Export to a DBML Diagram description | ✅ |
847
802
  | `spark` | Export to a Spark StructType | ✅ |
803
+ | `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
804
+ | `data-caterer` | Export to Data Caterer in YAML format | ✅ |
848
805
  | Missing something? | Please create an issue on GitHub | TBD |
849
806
 
850
807
  #### Great Expectations
@@ -908,6 +865,20 @@ To specify custom Avro properties in your data contract, you can define them wit
908
865
 
909
866
  >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)
910
867
 
868
+ #### Data Caterer
869
+
870
+ The export function converts the data contract to a data generation task in YAML format that can be
871
+ ingested by [Data Caterer](https://github.com/data-catering/data-caterer). This gives you the
872
+ ability to generate production-like data in any environment based off your data contract.
873
+
874
+ ```shell
875
+ datacontract export datacontract.yaml --format data-caterer --model orders
876
+ ```
877
+
878
+ You can further customise the way data is generated via adding
879
+ [additional metadata in the YAML](https://data.catering/setup/generator/data-generator/)
880
+ to suit your needs.
881
+
911
882
  #### Example Configuration
912
883
 
913
884
  ```yaml
@@ -918,6 +889,7 @@ models:
918
889
  description: Example for AVRO with Timestamp (microsecond precision) https://avro.apache.org/docs/current/spec.html#Local+timestamp+%28microsecond+precision%29
919
890
  type: long
920
891
  example: 1672534861000000 # Equivalent to 2023-01-01 01:01:01 in microseconds
892
+ required: true
921
893
  config:
922
894
  avroLogicalType: local-timestamp-micros
923
895
  avroDefault: 1672534861000000
@@ -932,6 +904,7 @@ models:
932
904
  - **description**: A textual description of the field.
933
905
  - **type**: The data type of the field. In this example, it is `long`.
934
906
  - **example**: An example value for the field.
907
+ - **required**: Is this a required field (as opposed to optional/nullable).
935
908
  - **config**: Section to specify custom Avro properties.
936
909
  - **avroLogicalType**: Specifies the logical type of the field in Avro. In this example, it is `local-timestamp-micros`.
937
910
  - **avroDefault**: Specifies the default value for the field in Avro. In this example, it is 1672534861000000 which corresponds to ` 2023-01-01 01:01:01 UTC`.
@@ -968,6 +941,14 @@ models:
968
941
  │ names, leave empty for all models in the │
969
942
  │ dataset). │
970
943
  │ [default: None] │
944
+ │ --dbml-schema TEXT List of schema names to import from the DBML │
945
+ │ file (repeat for multiple schema names, │
946
+ │ leave empty for all tables in the file). │
947
+ │ [default: None] │
948
+ │ --dbml-table TEXT List of table names to import from the DBML │
949
+ │ file (repeat for multiple table names, leave │
950
+ │ empty for all tables in the file). │
951
+ │ [default: None] │
971
952
  │ --help Show this message and exit. │
972
953
  ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
973
954
  ```
@@ -991,6 +972,7 @@ Available import options:
991
972
  | `dbt` | Import from dbt models | ✅ |
992
973
  | `odcs` | Import from Open Data Contract Standard (ODCS) | ✅ |
993
974
  | `spark` | Import from Spark StructTypes | ✅ |
975
+ | `dbml` | Import from DBML models | ✅ |
994
976
  | `protobuf` | Import from Protobuf schemas | TBD |
995
977
  | Missing something? | Please create an issue on GitHub | TBD |
996
978
 
@@ -1078,6 +1060,38 @@ Example:
1078
1060
  datacontract import --format spark --source "users,orders"
1079
1061
  ```
1080
1062
 
1063
+ #### DBML
1064
+
1065
+ Importing from DBML Documents.
1066
+ **NOTE:** Since DBML does _not_ have strict requirements on the types of columns, this import _may_ create non-valid datacontracts, as not all types of fields can be properly mapped. In this case you will have to adapt the generated document manually.
1067
+ We also assume, that the description for models and fields is stored in a Note within the DBML model.
1068
+
1069
+ You may give the `dbml-table` or `dbml-schema` parameter to enumerate the tables or schemas that should be imported.
1070
+ If no tables are given, _all_ available tables of the source will be imported. Likewise, if no schema is given, _all_ schemas are imported.
1071
+
1072
+ Examples:
1073
+
1074
+ ```bash
1075
+ # Example import from DBML file, importing everything
1076
+ datacontract import --format dbml --source <file_path>
1077
+ ```
1078
+
1079
+ ```bash
1080
+ # Example import from DBML file, filtering for tables from specific schemas
1081
+ datacontract import --format dbml --source <file_path> --dbml-schema <schema_1> --dbml-schema <schema_2>
1082
+ ```
1083
+
1084
+ ```bash
1085
+ # Example import from DBML file, filtering for tables with specific names
1086
+ datacontract import --format dbml --source <file_path> --dbml-table <table_name_1> --dbml-table <table_name_2>
1087
+ ```
1088
+
1089
+ ```bash
1090
+ # Example import from DBML file, filtering for tables with specific names from a specific schema
1091
+ datacontract import --format dbml --source <file_path> --dbml-table <table_name_1> --dbml-schema <schema_1>
1092
+ ```
1093
+
1094
+
1081
1095
  ### breaking
1082
1096
 
1083
1097
  ```
@@ -1427,7 +1441,7 @@ if __name__ == "__main__":
1427
1441
  "models": [
1428
1442
  {
1429
1443
  "name": "model1",
1430
- "desctiption": "model description from app",
1444
+ "description": "model description from app",
1431
1445
  "columns": [
1432
1446
  {
1433
1447
  "name": "columnA",
@@ -17,7 +17,7 @@ from datacontract.catalog.catalog import create_index_html, create_data_contract
17
17
  from datacontract.data_contract import DataContract, ExportFormat
18
18
  from datacontract.imports.importer import ImportFormat
19
19
  from datacontract.init.download_datacontract_file import download_datacontract_file, FileExistsException
20
- from datacontract.publish.publish import publish_to_datamesh_manager
20
+ from datacontract.integration.datamesh_manager import publish_data_contract_to_datamesh_manager
21
21
 
22
22
  DEFAULT_DATA_CONTRACT_SCHEMA_URL = "https://datacontract.com/datacontract.schema.json"
23
23
 
@@ -232,6 +232,18 @@ def import_(
232
232
  help="List of models names to import from the dbt manifest file (repeat for multiple models names, leave empty for all models in the dataset)."
233
233
  ),
234
234
  ] = None,
235
+ dbml_schema: Annotated[
236
+ Optional[List[str]],
237
+ typer.Option(
238
+ help="List of schema names to import from the DBML file (repeat for multiple schema names, leave empty for all tables in the file)."
239
+ ),
240
+ ] = None,
241
+ dbml_table: Annotated[
242
+ Optional[List[str]],
243
+ typer.Option(
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
+ ),
246
+ ] = None,
235
247
  ):
236
248
  """
237
249
  Create a data contract from the given source location. Prints to stdout.
@@ -245,6 +257,8 @@ def import_(
245
257
  bigquery_dataset=bigquery_dataset,
246
258
  unity_table_full_name=unity_table_full_name,
247
259
  dbt_model=dbt_model,
260
+ dbml_schema=dbml_schema,
261
+ dbml_table=dbml_table,
248
262
  )
249
263
  console.print(result.to_yaml())
250
264
 
@@ -261,8 +275,10 @@ def publish(
261
275
  """
262
276
  Publish the data contract to the Data Mesh Manager.
263
277
  """
264
- publish_to_datamesh_manager(
265
- data_contract=DataContract(data_contract_file=location, schema_location=schema),
278
+ publish_data_contract_to_datamesh_manager(
279
+ data_contract_specification=DataContract(
280
+ data_contract_file=location, schema_location=schema
281
+ ).get_data_contract_specification(),
266
282
  )
267
283
 
268
284
 
@@ -18,8 +18,8 @@ from datacontract.export.exporter import ExportFormat
18
18
  from datacontract.export.exporter_factory import exporter_factory
19
19
  from datacontract.imports.importer_factory import importer_factory
20
20
 
21
- from datacontract.integration.publish_datamesh_manager import publish_datamesh_manager
22
- from datacontract.integration.publish_opentelemetry import publish_opentelemetry
21
+ from datacontract.integration.datamesh_manager import publish_test_results_to_datamesh_manager
22
+ from datacontract.integration.opentelemetry import publish_test_results_to_opentelemetry
23
23
  from datacontract.lint import resolve
24
24
  from datacontract.lint.linters.description_linter import DescriptionLinter
25
25
  from datacontract.lint.linters.example_model_linter import ExampleModelLinter
@@ -218,15 +218,10 @@ class DataContract:
218
218
  run.finish()
219
219
 
220
220
  if self._publish_url is not None:
221
- try:
222
- publish_datamesh_manager(run, self._publish_url)
223
- except Exception:
224
- run.log_error("Failed to publish to datamesh manager")
221
+ publish_test_results_to_datamesh_manager(run, self._publish_url)
222
+
225
223
  if self._publish_to_opentelemetry:
226
- try:
227
- publish_opentelemetry(run)
228
- except Exception:
229
- run.log_error("Failed to publish to opentelemetry")
224
+ publish_test_results_to_opentelemetry(run)
230
225
 
231
226
  return run
232
227