datacontract-cli 0.10.10__tar.gz → 0.10.11__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 (177) hide show
  1. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/PKG-INFO +162 -67
  2. datacontract_cli-0.10.10/datacontract_cli.egg-info/PKG-INFO → datacontract_cli-0.10.11/README.md +152 -134
  3. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/data_contract.py +12 -7
  4. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/fastjsonschema/check_jsonschema.py +4 -1
  5. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/soda/connections/duckdb.py +16 -12
  6. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/soda/connections/snowflake.py +8 -5
  7. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/dbml_converter.py +41 -19
  8. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/exporter.py +1 -1
  9. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/jsonschema_converter.py +1 -4
  10. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/imports/glue_importer.py +7 -1
  11. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/imports/importer.py +1 -1
  12. datacontract_cli-0.10.11/datacontract/imports/jsonschema_importer.py +145 -0
  13. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/imports/sql_importer.py +4 -0
  14. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/templates/partials/model_field.html +10 -2
  15. datacontract_cli-0.10.10/README.md → datacontract_cli-0.10.11/datacontract_cli.egg-info/PKG-INFO +229 -57
  16. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract_cli.egg-info/SOURCES.txt +1 -0
  17. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract_cli.egg-info/requires.txt +9 -9
  18. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/pyproject.toml +10 -10
  19. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_dbml.py +8 -24
  20. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_jsonschema.py +4 -10
  21. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_import_glue.py +4 -0
  22. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_import_jsonschema.py +2 -2
  23. datacontract_cli-0.10.11/tests/test_import_sql.py +118 -0
  24. datacontract_cli-0.10.11/tests/test_test_delta.py +29 -0
  25. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_sqlserver.py +2 -2
  26. datacontract_cli-0.10.10/datacontract/imports/jsonschema_importer.py +0 -159
  27. datacontract_cli-0.10.10/tests/test_import_sql.py +0 -58
  28. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/LICENSE +0 -0
  29. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/MANIFEST.in +0 -0
  30. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/__init__.py +0 -0
  31. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/breaking/breaking.py +0 -0
  32. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/breaking/breaking_rules.py +0 -0
  33. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/catalog/catalog.py +0 -0
  34. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/cli.py +0 -0
  35. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/__init__.py +0 -0
  36. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py +0 -0
  37. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/datacontract/check_that_datacontract_file_exists.py +0 -0
  38. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/datacontract/check_that_datacontract_str_is_valid.py +0 -0
  39. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/fastjsonschema/s3/s3_read_files.py +0 -0
  40. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/soda/__init__.py +0 -0
  41. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/soda/check_soda_execute.py +0 -0
  42. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/soda/connections/bigquery.py +0 -0
  43. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/soda/connections/dask.py +0 -0
  44. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/soda/connections/databricks.py +0 -0
  45. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/soda/connections/kafka.py +0 -0
  46. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/soda/connections/postgres.py +0 -0
  47. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/soda/connections/sqlserver.py +0 -0
  48. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/engines/soda/connections/trino.py +0 -0
  49. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/__init__.py +0 -0
  50. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/avro_converter.py +0 -0
  51. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/avro_idl_converter.py +0 -0
  52. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/bigquery_converter.py +0 -0
  53. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/csv_type_converter.py +0 -0
  54. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/dbt_converter.py +0 -0
  55. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/exporter_factory.py +0 -0
  56. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/go_converter.py +0 -0
  57. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/great_expectations_converter.py +0 -0
  58. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/html_export.py +0 -0
  59. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/odcs_converter.py +0 -0
  60. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/protobuf_converter.py +0 -0
  61. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/pydantic_converter.py +0 -0
  62. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/rdf_converter.py +0 -0
  63. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/sodacl_converter.py +0 -0
  64. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/spark_converter.py +0 -0
  65. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/sql_converter.py +0 -0
  66. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/sql_type_converter.py +0 -0
  67. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/export/terraform_converter.py +0 -0
  68. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/imports/avro_importer.py +0 -0
  69. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/imports/bigquery_importer.py +0 -0
  70. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/imports/dbt_importer.py +0 -0
  71. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/imports/importer_factory.py +0 -0
  72. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/imports/odcs_importer.py +0 -0
  73. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/imports/spark_importer.py +0 -0
  74. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/imports/unity_importer.py +0 -0
  75. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/init/download_datacontract_file.py +0 -0
  76. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/integration/publish_datamesh_manager.py +0 -0
  77. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/integration/publish_opentelemetry.py +0 -0
  78. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/lint/files.py +0 -0
  79. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/lint/lint.py +0 -0
  80. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/lint/linters/__init__.py +0 -0
  81. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/lint/linters/description_linter.py +0 -0
  82. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/lint/linters/example_model_linter.py +0 -0
  83. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/lint/linters/field_pattern_linter.py +0 -0
  84. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/lint/linters/field_reference_linter.py +0 -0
  85. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/lint/linters/notice_period_linter.py +0 -0
  86. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/lint/linters/quality_schema_linter.py +0 -0
  87. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/lint/linters/valid_constraints_linter.py +0 -0
  88. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/lint/resolve.py +0 -0
  89. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/lint/schema.py +0 -0
  90. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/lint/urls.py +0 -0
  91. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/model/breaking_change.py +0 -0
  92. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/model/data_contract_specification.py +0 -0
  93. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/model/exceptions.py +0 -0
  94. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/model/run.py +0 -0
  95. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/publish/publish.py +0 -0
  96. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/py.typed +0 -0
  97. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/templates/datacontract.html +0 -0
  98. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/templates/index.html +0 -0
  99. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/templates/partials/datacontract_information.html +0 -0
  100. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/templates/partials/datacontract_servicelevels.html +0 -0
  101. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/templates/partials/datacontract_terms.html +0 -0
  102. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/templates/partials/definition.html +0 -0
  103. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/templates/partials/example.html +0 -0
  104. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/templates/partials/server.html +0 -0
  105. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/templates/style/output.css +0 -0
  106. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract/web.py +0 -0
  107. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract_cli.egg-info/dependency_links.txt +0 -0
  108. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract_cli.egg-info/entry_points.txt +0 -0
  109. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/datacontract_cli.egg-info/top_level.txt +0 -0
  110. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/setup.cfg +0 -0
  111. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_breaking.py +0 -0
  112. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_catalog.py +0 -0
  113. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_changelog.py +0 -0
  114. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_cli.py +0 -0
  115. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_description_linter.py +0 -0
  116. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_documentation_linter.py +0 -0
  117. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_download_datacontract_file.py +0 -0
  118. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_example_model_linter.py +0 -0
  119. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_avro.py +0 -0
  120. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_avro_idl.py +0 -0
  121. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_bigquery.py +0 -0
  122. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_complex_data_contract.py +0 -0
  123. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_custom_exporter.py +0 -0
  124. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_dbt_models.py +0 -0
  125. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_dbt_sources.py +0 -0
  126. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_dbt_staging_sql.py +0 -0
  127. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_go.py +0 -0
  128. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_great_expectations.py +0 -0
  129. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_html.py +0 -0
  130. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_odcs.py +0 -0
  131. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_protobuf.py +0 -0
  132. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_pydantic.py +0 -0
  133. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_rdf.py +0 -0
  134. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_sodacl.py +0 -0
  135. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_spark.py +0 -0
  136. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_sql.py +0 -0
  137. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_sql_query.py +0 -0
  138. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_export_terraform.py +0 -0
  139. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_field_constraint_linter.py +0 -0
  140. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_field_pattern_linter.py +0 -0
  141. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_field_reference_linter.py +0 -0
  142. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_import_avro.py +0 -0
  143. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_import_bigquery.py +0 -0
  144. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_import_dbt.py +0 -0
  145. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_import_odcs.py +0 -0
  146. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_import_spark.py +0 -0
  147. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_import_unity_file.py +0 -0
  148. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_integration_datameshmanager.py +0 -0
  149. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_integration_opentelemetry.py +0 -0
  150. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_lint.py +0 -0
  151. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_notice_period_linter.py +0 -0
  152. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_quality_schema_linter.py +0 -0
  153. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_resolve.py +0 -0
  154. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_roundtrip_jsonschema.py +0 -0
  155. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_azure_parquet_remote.py +0 -0
  156. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_bigquery.py +0 -0
  157. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_databricks.py +0 -0
  158. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_dataframe.py +0 -0
  159. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_examples_csv.py +0 -0
  160. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_examples_formats_valid.py +0 -0
  161. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_examples_inline.py +0 -0
  162. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_examples_json.py +0 -0
  163. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_examples_missing.py +0 -0
  164. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_kafka.py +0 -0
  165. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_kafka_remote.py +0 -0
  166. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_local_json.py +0 -0
  167. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_parquet.py +0 -0
  168. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_postgres.py +0 -0
  169. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_s3_csv.py +0 -0
  170. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_s3_delta.py +0 -0
  171. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_s3_json.py +0 -0
  172. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_s3_json_complex.py +0 -0
  173. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_s3_json_multiple_models.py +0 -0
  174. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_s3_json_remote.py +0 -0
  175. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_snowflake.py +0 -0
  176. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_test_trino.py +0 -0
  177. {datacontract_cli-0.10.10 → datacontract_cli-0.10.11}/tests/test_web.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datacontract-cli
3
- Version: 0.10.10
3
+ Version: 0.10.11
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
@@ -19,7 +19,7 @@ Requires-Dist: fastapi==0.111.1
19
19
  Requires-Dist: fastparquet==2024.5.0
20
20
  Requires-Dist: python-multipart==0.0.9
21
21
  Requires-Dist: rich~=13.7.0
22
- Requires-Dist: simple-ddl-parser==1.5.1
22
+ Requires-Dist: simple-ddl-parser==1.5.2
23
23
  Requires-Dist: soda-core-duckdb<3.4.0,>=3.3.1
24
24
  Requires-Dist: setuptools>=60
25
25
  Requires-Dist: duckdb==1.0.0
@@ -37,7 +37,7 @@ 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.3.0,>=3.1.2; extra == "databricks"
40
+ Requires-Dist: databricks-sql-connector<3.4.0,>=3.1.2; extra == "databricks"
41
41
  Requires-Dist: soda-core-spark[databricks]<3.4.0,>=3.3.1; extra == "databricks"
42
42
  Provides-Extra: deltalake
43
43
  Requires-Dist: deltalake<0.19,>=0.17; extra == "deltalake"
@@ -61,19 +61,19 @@ Provides-Extra: dev
61
61
  Requires-Dist: datacontract-cli[all]; extra == "dev"
62
62
  Requires-Dist: httpx==0.27.0; extra == "dev"
63
63
  Requires-Dist: ruff; extra == "dev"
64
- Requires-Dist: pre-commit~=3.7.1; extra == "dev"
64
+ Requires-Dist: pre-commit<3.9.0,>=3.7.1; extra == "dev"
65
65
  Requires-Dist: pytest; extra == "dev"
66
66
  Requires-Dist: pytest-xdist; extra == "dev"
67
67
  Requires-Dist: moto==5.0.11; extra == "dev"
68
68
  Requires-Dist: pymssql==2.3.0; extra == "dev"
69
69
  Requires-Dist: kafka-python; extra == "dev"
70
70
  Requires-Dist: trino==0.329.0; extra == "dev"
71
- Requires-Dist: testcontainers<4.8,>=4.5; extra == "dev"
72
- Requires-Dist: testcontainers[core]; extra == "dev"
73
- Requires-Dist: testcontainers[minio]; extra == "dev"
74
- Requires-Dist: testcontainers[postgres]; extra == "dev"
75
- Requires-Dist: testcontainers[kafka]; extra == "dev"
76
- Requires-Dist: testcontainers[mssql]; 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
 
@@ -197,10 +197,10 @@ $ datacontract export --format html datacontract.yaml > datacontract.html
197
197
  # import avro (other formats: sql, glue, bigquery...)
198
198
  $ datacontract import --format avro --source avro_schema.avsc
199
199
 
200
- # find differences between to data contracts
200
+ # find differences between two data contracts
201
201
  $ datacontract diff datacontract-v1.yaml datacontract-v2.yaml
202
202
 
203
- # find differences between to data contracts categorized into error, warning, and info.
203
+ # find differences between two data contracts categorized into error, warning, and info.
204
204
  $ datacontract changelog datacontract-v1.yaml datacontract-v2.yaml
205
205
 
206
206
  # fail pipeline on breaking changes. Uses changelog internally and showing only error and warning.
@@ -385,7 +385,7 @@ Supported server types:
385
385
  - [sqlserver](#sqlserver)
386
386
  - [databricks](#databricks)
387
387
  - [databricks (programmatic)](#databricks-programmatic)
388
- - [dataframr (programmatic)](#dataframe-programmatic)
388
+ - [dataframe (programmatic)](#dataframe-programmatic)
389
389
  - [snowflake](#snowflake)
390
390
  - [kafka](#kafka)
391
391
  - [postgres](#postgres)
@@ -665,14 +665,31 @@ models:
665
665
  ```
666
666
 
667
667
  #### Environment Variables
668
-
669
- | Environment Variable | Example | Description |
670
- |------------------------------------|--------------------|-----------------------------------------------------|
671
- | `DATACONTRACT_SNOWFLAKE_USERNAME` | `datacontract` | Username |
672
- | `DATACONTRACT_SNOWFLAKE_PASSWORD` | `mysecretpassword` | Password |
673
- | `DATACONTRACT_SNOWFLAKE_ROLE` | `DATAVALIDATION` | The snowflake role to use. |
674
- | `DATACONTRACT_SNOWFLAKE_WAREHOUSE` | `COMPUTE_WH` | The Snowflake Warehouse to use executing the tests. |
675
-
668
+ All [parameters supported by Soda](https://docs.soda.io/soda/connect-snowflake.html), uppercased and prepended by `DATACONTRACT_SNOWFLAKE_` prefix.
669
+ For example:
670
+
671
+ | Soda parameter | Environment Variable |
672
+ |----------------------|---------------------------------------------|
673
+ | `username` | `DATACONTRACT_SNOWFLAKE_USERNAME` |
674
+ | `password` | `DATACONTRACT_SNOWFLAKE_PASSWORD` |
675
+ | `warehouse` | `DATACONTRACT_SNOWFLAKE_WAREHOUSE` |
676
+ | `role` | `DATACONTRACT_SNOWFLAKE_ROLE` |
677
+ | `connection_timeout` | `DATACONTRACT_SNOWFLAKE_CONNECTION_TIMEOUT` |
678
+
679
+ Beware, that parameters:
680
+ * `account`
681
+ * `database`
682
+ * `schema`
683
+
684
+ are obtained from the `servers` section of the YAML-file.
685
+ E.g. from the example above:
686
+ ```yaml
687
+ servers:
688
+ snowflake:
689
+ account: abcdefg-xn12345
690
+ database: ORDER_DB
691
+ schema: ORDERS_PII_V2
692
+ ```
676
693
 
677
694
 
678
695
  ### Kafka
@@ -925,23 +942,34 @@ models:
925
942
  ```
926
943
  Usage: datacontract import [OPTIONS]
927
944
 
928
- Create a data contract from the given source location. Prints to stdout.
929
-
930
- ╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
931
- │ * --format [sql|avro|glue|bigquery|jsonschema| The format of the source file. [default: None] [required] |
932
- unity|spark] |
933
- --source TEXT The path to the file or Glue Database that should be imported.
934
- [default: None]
935
- --glue-table TEXT List of table ids to import from the Glue Database (repeat for
936
- multiple table ids, leave empty for all tables in the dataset).
937
- [default: None]
938
- --bigquery-project TEXT The bigquery project id. [default: None]
939
- --bigquery-dataset TEXT The bigquery dataset id. [default: None]
940
- --bigquery-table TEXT List of table ids to import from the bigquery API (repeat for
941
- multiple table ids, leave empty for all tables in the dataset).
942
- [default: None]
943
- │ --help Show this message and exit.
944
- ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
945
+ Create a data contract from the given source location. Prints to stdout.
946
+
947
+ ╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
948
+ │ * --format [sql|avro|dbt|glue|jsonschema|bigquery|odcs The format of the source file.
949
+ |unity|spark] [default: None] │
950
+ [required]
951
+ --source TEXT The path to the file or Glue Database that
952
+ should be imported.
953
+ [default: None]
954
+ --glue-table TEXT List of table ids to import from the Glue
955
+ Database (repeat for multiple table ids,
956
+ leave empty for all tables in the dataset).
957
+ [default: None]
958
+ --bigquery-project TEXT The bigquery project id. [default: None]
959
+ --bigquery-dataset TEXT The bigquery dataset id. [default: None]
960
+ │ --bigquery-table TEXT List of table ids to import from the
961
+ │ bigquery API (repeat for multiple table ids, │
962
+ │ leave empty for all tables in the dataset). │
963
+ │ [default: None] │
964
+ │ --unity-table-full-name TEXT Full name of a table in the unity catalog │
965
+ │ [default: None] │
966
+ │ --dbt-model TEXT List of models names to import from the dbt │
967
+ │ manifest file (repeat for multiple models │
968
+ │ names, leave empty for all models in the │
969
+ │ dataset). │
970
+ │ [default: None] │
971
+ │ --help Show this message and exit. │
972
+ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
945
973
  ```
946
974
 
947
975
  Example:
@@ -952,18 +980,19 @@ datacontract import --format sql --source my_ddl.sql
952
980
 
953
981
  Available import options:
954
982
 
955
- | Type | Description | Status |
956
- |--------------------|------------------------------------------------|---------|
983
+ | Type | Description | Status |
984
+ |--------------------|------------------------------------------------|--------|
957
985
  | `sql` | Import from SQL DDL | ✅ |
958
986
  | `avro` | Import from AVRO schemas | ✅ |
959
987
  | `glue` | Import from AWS Glue DataCatalog | ✅ |
960
- | `protobuf` | Import from Protobuf schemas | TBD |
961
988
  | `jsonschema` | Import from JSON Schemas | ✅ |
962
989
  | `bigquery` | Import from BigQuery Schemas | ✅ |
963
990
  | `unity` | Import from Databricks Unity Catalog | partial |
964
- | `dbt` | Import from dbt models | TBD |
991
+ | `dbt` | Import from dbt models | |
965
992
  | `odcs` | Import from Open Data Contract Standard (ODCS) | ✅ |
966
- | Missing something? | Please create an issue on GitHub | TBD |
993
+ | `spark` | Import from Spark StructTypes | |
994
+ | `protobuf` | Import from Protobuf schemas | TBD |
995
+ | Missing something? | Please create an issue on GitHub | TBD |
967
996
 
968
997
 
969
998
  #### BigQuery
@@ -1005,6 +1034,23 @@ export DATABRICKS_IMPORT_ACCESS_TOKEN=<token>
1005
1034
  datacontract import --format unity --unity-table-full-name <table_full_name>
1006
1035
  ```
1007
1036
 
1037
+ #### dbt
1038
+
1039
+ Importing from dbt manifest file.
1040
+ You may give the `dbt-model` parameter to enumerate the tables that should be imported. If no tables are given, _all_ available tables of the database will be imported.
1041
+
1042
+ Examples:
1043
+
1044
+ ```bash
1045
+ # Example import from dbt manifest with specifying the tables to import
1046
+ datacontract import --format dbt --source <manifest_path> --dbt-model <model_name_1> --dbt-model <model_name_2> --dbt-model <model_name_3>
1047
+ ```
1048
+
1049
+ ```bash
1050
+ # Example import from dbt manifest importing all tables in the database
1051
+ datacontract import --format dbt --source <manifest_path>
1052
+ ```
1053
+
1008
1054
  #### Glue
1009
1055
 
1010
1056
  Importing from Glue reads the necessary Data directly off of the AWS API.
@@ -1304,7 +1350,7 @@ if __name__ == "__main__":
1304
1350
  data_contract = DataContract(
1305
1351
  data_contract_file="/path/datacontract.yaml"
1306
1352
  )
1307
- # call export
1353
+ # Call export
1308
1354
  result = data_contract.export(
1309
1355
  export_format="custom", model="orders", server="production", custom_arg="my_custom_arg"
1310
1356
  )
@@ -1330,10 +1376,11 @@ Output
1330
1376
  Using the importer factory to add a new custom importer
1331
1377
  ```python
1332
1378
 
1333
- from datacontract.model.data_contract_specification import DataContractSpecification
1379
+ from datacontract.model.data_contract_specification import DataContractSpecification, Field, Model
1334
1380
  from datacontract.data_contract import DataContract
1335
1381
  from datacontract.imports.importer import Importer
1336
1382
  from datacontract.imports.importer_factory import importer_factory
1383
+
1337
1384
  import json
1338
1385
 
1339
1386
  # Create a custom class that implements import_source method
@@ -1344,43 +1391,89 @@ class CustomImporter(Importer):
1344
1391
  source_dict = json.loads(source)
1345
1392
  data_contract_specification.id = source_dict.get("id_custom")
1346
1393
  data_contract_specification.info.title = source_dict.get("title")
1394
+ data_contract_specification.info.version = source_dict.get("version")
1347
1395
  data_contract_specification.info.description = source_dict.get("description_from_app")
1348
-
1396
+
1397
+ for model in source_dict.get("models", []):
1398
+ fields = {}
1399
+ for column in model.get('columns'):
1400
+ field = Field(
1401
+ description=column.get('column_description'),
1402
+ type=column.get('type')
1403
+ )
1404
+ fields[column.get('name')] = field
1405
+
1406
+ dc_model = Model(
1407
+ description=model.get('description'),
1408
+ fields= fields
1409
+ )
1410
+
1411
+ data_contract_specification.models[model.get('name')] = dc_model
1349
1412
  return data_contract_specification
1350
-
1413
+
1351
1414
 
1352
1415
  # Register the new custom class into factory
1353
1416
  importer_factory.register_importer("custom_company_importer", CustomImporter)
1354
1417
 
1355
1418
 
1356
1419
  if __name__ == "__main__":
1357
- # get a custom da
1358
- json_from_custom_app = '{"id_custom":"uuid-custom","version":"0.0.2", "title":"my_custom_imported_data", "description_from_app": "Custom contract description"}'
1420
+ # Get a custom data from other app
1421
+ json_from_custom_app = '''
1422
+ {
1423
+ "id_custom": "uuid-custom",
1424
+ "version": "0.0.2",
1425
+ "title": "my_custom_imported_data",
1426
+ "description_from_app": "Custom contract description",
1427
+ "models": [
1428
+ {
1429
+ "name": "model1",
1430
+ "desctiption": "model description from app",
1431
+ "columns": [
1432
+ {
1433
+ "name": "columnA",
1434
+ "type": "varchar",
1435
+ "column_description": "my_column description"
1436
+ },
1437
+ {
1438
+ "name": "columnB",
1439
+ "type": "varchar",
1440
+ "column_description": "my_columnB description"
1441
+ }
1442
+ ]
1443
+ }
1444
+ ]
1445
+ }
1446
+ '''
1359
1447
  # Create a DataContract instance
1360
1448
  data_contract = DataContract()
1361
1449
 
1362
- # call import_from
1450
+ # Call import_from_source
1363
1451
  result = data_contract.import_from_source(
1364
- format="custom_company_importer", data_contract_specification=DataContract.init(), source=json_from_custom_app
1365
- )
1366
- print(dict(result))
1367
-
1452
+ format="custom_company_importer",
1453
+ data_contract_specification=DataContract.init(),
1454
+ source=json_from_custom_app
1455
+ )
1456
+ print(result.to_yaml() )
1368
1457
  ```
1369
1458
  Output
1459
+
1460
+ ```yaml
1461
+ dataContractSpecification: 0.9.3
1462
+ id: uuid-custom
1463
+ info:
1464
+ title: my_custom_imported_data
1465
+ version: 0.0.2
1466
+ description: Custom contract description
1467
+ models:
1468
+ model1:
1469
+ fields:
1470
+ columnA:
1471
+ type: varchar
1472
+ description: my_column description
1473
+ columnB:
1474
+ type: varchar
1475
+ description: my_columnB description
1370
1476
 
1371
- ```python
1372
- {
1373
- 'dataContractSpecification': '0.9.3',
1374
- 'id': 'uuid-custom',
1375
- 'info': Info(title='my_custom_imported_data', version='0.0.1', status=None, description='Custom contract description', owner=None, contact=None),
1376
- 'servers': {},
1377
- 'terms': None,
1378
- 'models': {},
1379
- 'definitions': {},
1380
- 'examples': [],
1381
- 'quality': None,
1382
- 'servicelevels': None
1383
- }
1384
1477
  ```
1385
1478
  ## Development Setup
1386
1479
 
@@ -1469,6 +1562,7 @@ We are happy to receive your contributions. Propose your change in an issue or d
1469
1562
  ## Companies using this tool
1470
1563
 
1471
1564
  - [INNOQ](https://innoq.com)
1565
+ - [Data Catering](https://data.catering/)
1472
1566
  - And many more. To add your company, please create a pull request.
1473
1567
 
1474
1568
  ## Related Tools
@@ -1476,6 +1570,7 @@ We are happy to receive your contributions. Propose your change in an issue or d
1476
1570
  - [Data Contract Manager](https://www.datacontract-manager.com/) is a commercial tool to manage data contracts. It contains a web UI, access management, and data governance for a full enterprise data marketplace.
1477
1571
  - [Data Contract GPT](https://gpt.datacontract.com) is a custom GPT that can help you write data contracts.
1478
1572
  - [Data Contract Editor](https://editor.datacontract.com) is an editor for Data Contracts, including a live html preview.
1573
+ - [Data Contract Playground](https://data-catering.github.io/data-contract-playground/) allows you to validate and export your data contract to different formats within your browser.
1479
1574
 
1480
1575
  ## License
1481
1576