datacontract-cli 0.11.9__tar.gz → 0.12.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. {datacontract_cli-0.11.9/datacontract_cli.egg-info → datacontract_cli-0.12.0}/PKG-INFO +377 -433
  2. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/README.md +376 -432
  3. datacontract_cli-0.12.0/datacontract/cli.py +164 -0
  4. datacontract_cli-0.12.0/datacontract/command_api.py +66 -0
  5. datacontract_cli-0.12.0/datacontract/command_catalog.py +55 -0
  6. datacontract_cli-0.12.0/datacontract/command_changelog.py +21 -0
  7. datacontract_cli-0.12.0/datacontract/command_ci.py +115 -0
  8. datacontract_cli-0.12.0/datacontract/command_export.py +600 -0
  9. datacontract_cli-0.12.0/datacontract/command_import.py +425 -0
  10. datacontract_cli-0.12.0/datacontract/command_init.py +33 -0
  11. datacontract_cli-0.12.0/datacontract/command_lint.py +47 -0
  12. datacontract_cli-0.12.0/datacontract/command_publish.py +38 -0
  13. datacontract_cli-0.12.0/datacontract/command_test.py +111 -0
  14. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/data_contract.py +0 -1
  15. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/soda/connections/databricks.py +4 -6
  16. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/soda/connections/duckdb_connection.py +6 -17
  17. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/soda/connections/mysql.py +4 -4
  18. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/soda/connections/oracle.py +4 -2
  19. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/soda/connections/postgres.py +4 -4
  20. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/soda/connections/sqlserver.py +23 -17
  21. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/soda/connections/trino.py +4 -1
  22. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/dbt_exporter.py +1 -1
  23. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/exporter.py +13 -1
  24. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/exporter_factory.py +2 -2
  25. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/great_expectations_exporter.py +1 -1
  26. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/sql_importer.py +15 -0
  27. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/model/exceptions.py +18 -0
  28. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0/datacontract_cli.egg-info}/PKG-INFO +377 -433
  29. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract_cli.egg-info/SOURCES.txt +11 -0
  30. datacontract_cli-0.12.0/datacontract_cli.egg-info/entry_points.txt +2 -0
  31. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/pyproject.toml +3 -2
  32. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_avro.py +1 -1
  33. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_avro_idl.py +1 -1
  34. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_bigquery.py +1 -2
  35. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_complex_data_contract.py +1 -1
  36. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_custom.py +1 -2
  37. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_custom_model.py +1 -2
  38. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_data_caterer.py +1 -1
  39. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_dbml.py +2 -4
  40. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_dbt_models.py +1 -1
  41. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_dbt_sources.py +2 -2
  42. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_dbt_staging_sql.py +1 -2
  43. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_dqx.py +1 -1
  44. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_excel.py +1 -2
  45. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_go.py +1 -1
  46. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_great_expectations.py +6 -11
  47. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_html.py +3 -4
  48. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_iceberg.py +3 -8
  49. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_jsonschema.py +1 -1
  50. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_markdown.py +1 -2
  51. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_mermaid.py +3 -5
  52. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_odcs_v3.py +1 -1
  53. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_protobuf.py +1 -1
  54. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_rdf.py +2 -4
  55. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_spark.py +1 -1
  56. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_sql.py +1 -1
  57. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_sql_query.py +1 -1
  58. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_avro.py +0 -1
  59. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_bigquery.py +0 -1
  60. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_csv.py +0 -1
  61. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_dbml.py +2 -4
  62. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_dbt.py +2 -5
  63. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_excel.py +0 -1
  64. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_glue.py +4 -6
  65. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_iceberg.py +1 -2
  66. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_json.py +0 -1
  67. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_jsonschema.py +0 -2
  68. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_parquet.py +0 -1
  69. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_protobuf.py +0 -1
  70. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_spark.py +2 -4
  71. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_sql_oracle.py +0 -1
  72. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_sql_postgres.py +1 -1
  73. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_unity_file.py +0 -2
  74. datacontract_cli-0.12.0/tests/test_require_env.py +28 -0
  75. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_roundtrip_jsonschema.py +1 -2
  76. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_sqlserver_soda_connection.py +26 -0
  77. datacontract_cli-0.11.9/datacontract/cli.py +0 -668
  78. datacontract_cli-0.11.9/datacontract_cli.egg-info/entry_points.txt +0 -2
  79. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/LICENSE +0 -0
  80. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/MANIFEST.in +0 -0
  81. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/__init__.py +0 -0
  82. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/api.py +0 -0
  83. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/catalog/catalog.py +0 -0
  84. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/changelog/__init__.py +0 -0
  85. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/changelog/changelog.py +0 -0
  86. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/changelog/normalize.py +0 -0
  87. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/__init__.py +0 -0
  88. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/data_contract_checks.py +0 -0
  89. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/data_contract_test.py +0 -0
  90. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py +0 -0
  91. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/datacontract/check_that_datacontract_file_exists.py +0 -0
  92. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/fastjsonschema/check_jsonschema.py +0 -0
  93. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/fastjsonschema/s3/s3_read_files.py +0 -0
  94. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/soda/__init__.py +0 -0
  95. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/soda/check_soda_execute.py +0 -0
  96. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/soda/connections/athena.py +0 -0
  97. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/soda/connections/bigquery.py +0 -0
  98. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/soda/connections/impala.py +0 -0
  99. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/soda/connections/kafka.py +0 -0
  100. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/engines/soda/connections/snowflake.py +0 -0
  101. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/__init__.py +0 -0
  102. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/avro_exporter.py +0 -0
  103. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/avro_idl_exporter.py +0 -0
  104. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/bigquery_exporter.py +0 -0
  105. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/custom_exporter.py +0 -0
  106. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/data_caterer_exporter.py +0 -0
  107. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/dbml_exporter.py +0 -0
  108. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/dcs_exporter.py +0 -0
  109. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/dqx_exporter.py +0 -0
  110. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/duckdb_type_converter.py +0 -0
  111. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/excel_exporter.py +0 -0
  112. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/go_exporter.py +0 -0
  113. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/html_exporter.py +0 -0
  114. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/iceberg_exporter.py +0 -0
  115. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/jsonschema_exporter.py +0 -0
  116. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/markdown_exporter.py +0 -0
  117. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/mermaid_exporter.py +0 -0
  118. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/odcs_export_helper.py +0 -0
  119. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/odcs_v3_exporter.py +0 -0
  120. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/pandas_type_converter.py +0 -0
  121. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/protobuf_exporter.py +0 -0
  122. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/pydantic_exporter.py +0 -0
  123. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/rdf_exporter.py +0 -0
  124. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/sodacl_exporter.py +0 -0
  125. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/spark_exporter.py +0 -0
  126. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/sql_exporter.py +0 -0
  127. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/sql_type_converter.py +0 -0
  128. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/export/sqlalchemy_exporter.py +0 -0
  129. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/avro_importer.py +0 -0
  130. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/bigquery_importer.py +0 -0
  131. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/csv_importer.py +0 -0
  132. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/dbml_importer.py +0 -0
  133. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/dbt_importer.py +0 -0
  134. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/dcs_importer.py +0 -0
  135. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/excel_importer.py +0 -0
  136. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/glue_importer.py +0 -0
  137. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/iceberg_importer.py +0 -0
  138. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/importer.py +0 -0
  139. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/importer_factory.py +0 -0
  140. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/json_importer.py +0 -0
  141. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/jsonschema_importer.py +0 -0
  142. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/odcs_helper.py +0 -0
  143. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/odcs_importer.py +0 -0
  144. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/parquet_importer.py +0 -0
  145. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/protobuf_importer.py +0 -0
  146. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/spark_importer.py +0 -0
  147. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/imports/unity_importer.py +0 -0
  148. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/init/init_template.py +0 -0
  149. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/integration/entropy_data.py +0 -0
  150. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/lint/files.py +0 -0
  151. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/lint/resolve.py +0 -0
  152. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/lint/resources.py +0 -0
  153. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/lint/schema.py +0 -0
  154. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/lint/urls.py +0 -0
  155. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/model/changelog.py +0 -0
  156. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/model/odcs.py +0 -0
  157. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/model/run.py +0 -0
  158. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/output/__init__.py +0 -0
  159. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/output/ci_output.py +0 -0
  160. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/output/json_test_results.py +0 -0
  161. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/output/junit_test_results.py +0 -0
  162. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/output/output_format.py +0 -0
  163. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/output/test_results_writer.py +0 -0
  164. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/output/text_changelog_results.py +0 -0
  165. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/py.typed +0 -0
  166. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/schemas/datacontract-1.1.0.init.yaml +0 -0
  167. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/schemas/datacontract-1.1.0.schema.json +0 -0
  168. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/schemas/datacontract-1.2.0.init.yaml +0 -0
  169. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/schemas/datacontract-1.2.0.schema.json +0 -0
  170. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/schemas/datacontract-1.2.1.init.yaml +0 -0
  171. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/schemas/datacontract-1.2.1.schema.json +0 -0
  172. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/schemas/odcs-3.0.1.schema.json +0 -0
  173. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/schemas/odcs-3.0.2.schema.json +0 -0
  174. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/schemas/odcs-3.1.0.init.yaml +0 -0
  175. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/schemas/odcs-3.1.0.schema.json +0 -0
  176. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/templates/datacontract.html +0 -0
  177. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/templates/datacontract_odcs.html +0 -0
  178. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/templates/index.html +0 -0
  179. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/templates/partials/datacontract_information.html +0 -0
  180. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/templates/partials/datacontract_servicelevels.html +0 -0
  181. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/templates/partials/datacontract_terms.html +0 -0
  182. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/templates/partials/definition.html +0 -0
  183. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/templates/partials/example.html +0 -0
  184. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/templates/partials/model_field.html +0 -0
  185. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/templates/partials/quality.html +0 -0
  186. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/templates/partials/server.html +0 -0
  187. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract/templates/style/output.css +0 -0
  188. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract_cli.egg-info/dependency_links.txt +0 -0
  189. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract_cli.egg-info/requires.txt +0 -0
  190. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/datacontract_cli.egg-info/top_level.txt +0 -0
  191. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/setup.cfg +0 -0
  192. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_api.py +0 -0
  193. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_bigquery_soda_connection.py +0 -0
  194. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_catalog.py +0 -0
  195. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_changelog.py +0 -0
  196. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_changelog_engine.py +0 -0
  197. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_changelog_normalize.py +0 -0
  198. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_changelog_output_text.py +0 -0
  199. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_ci_output.py +0 -0
  200. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_cli.py +0 -0
  201. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_data_contract.py +0 -0
  202. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_data_contract_checks.py +0 -0
  203. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_data_contract_specification.py +0 -0
  204. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_description_linter.py +0 -0
  205. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_download_datacontract_file.py +0 -0
  206. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_duckdb_json.py +0 -0
  207. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_custom_exporter.py +0 -0
  208. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_pydantic.py +0 -0
  209. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_sodacl.py +0 -0
  210. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_export_sqlalchemy.py +0 -0
  211. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_odcs_v3.py +0 -0
  212. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_sql_snowflake.py +0 -0
  213. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_import_sql_sqlserver.py +0 -0
  214. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_integration_entropydata.py +0 -0
  215. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_lint.py +0 -0
  216. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_resolve.py +0 -0
  217. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_sql_type_converter_physicaltype.py +0 -0
  218. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_api.py +0 -0
  219. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_athena_iceberg.py +0 -0
  220. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_azure_remote.py +0 -0
  221. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_bigquery.py +0 -0
  222. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_checks_filter.py +0 -0
  223. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_databricks.py +0 -0
  224. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_dataframe.py +0 -0
  225. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_delta.py +0 -0
  226. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_gcs_csv_remote.py +0 -0
  227. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_gcs_json_remote.py +0 -0
  228. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_kafka.py +0 -0
  229. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_kafka_remote.py +0 -0
  230. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_local_json.py +0 -0
  231. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_local_json_nd.py +0 -0
  232. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_mysql.py +0 -0
  233. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_oracle.py +0 -0
  234. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_output_json.py +0 -0
  235. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_output_junit.py +0 -0
  236. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_parquet.py +0 -0
  237. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_postgres.py +0 -0
  238. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_quality.py +0 -0
  239. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_s3_csv.py +0 -0
  240. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_s3_delta.py +0 -0
  241. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_s3_json.py +0 -0
  242. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_s3_json_complex.py +0 -0
  243. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_s3_json_multiple_models.py +0 -0
  244. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_s3_json_remote.py +0 -0
  245. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_schema_evolution.py +0 -0
  246. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_server_not_found.py +0 -0
  247. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_snowflake.py +0 -0
  248. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_sqlserver.py +0 -0
  249. {datacontract_cli-0.11.9 → datacontract_cli-0.12.0}/tests/test_test_trino.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datacontract-cli
3
- Version: 0.11.9
3
+ Version: 0.12.0
4
4
  Summary: The datacontract CLI is an open source command-line tool for working with Data Contracts. It uses data contract YAML files to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
5
5
  Author-email: Jochen Christ <jochen.christ@innoq.com>, Stefan Negele <stefan.negele@innoq.com>, Simon Harrer <simon.harrer@innoq.com>
6
6
  License-Expression: MIT
@@ -186,7 +186,7 @@ Voilà, the CLI tested that the YAML itself is valid, all records comply with th
186
186
  We can also use the data contract metadata to export in many [formats](#format), e.g., to generate a SQL DDL:
187
187
 
188
188
  ```bash
189
- $ datacontract export --format sql https://datacontract.com/orders-v1.odcs.yaml
189
+ $ datacontract export sql https://datacontract.com/orders-v1.odcs.yaml
190
190
 
191
191
  # returns:
192
192
  -- Data Contract: orders
@@ -209,7 +209,7 @@ CREATE TABLE line_items (
209
209
  Or generate an HTML export:
210
210
 
211
211
  ```bash
212
- $ datacontract export --format html --output orders-v1.odcs.html https://datacontract.com/orders-v1.odcs.yaml
212
+ $ datacontract export html --output orders-v1.odcs.html https://datacontract.com/orders-v1.odcs.yaml
213
213
  ```
214
214
 
215
215
  [//]: # (which will create this [HTML export]&#40;https://datacontract.com/examples/orders-latest/datacontract.html&#41;.)
@@ -230,17 +230,17 @@ $ datacontract changelog v1.odcs.yaml v2.odcs.yaml
230
230
  # execute schema and quality checks (define credentials as environment variables)
231
231
  $ datacontract test odcs.yaml
232
232
 
233
- # export data contract as html (other formats: avro, dbt, dbt-sources, dbt-staging-sql, jsonschema, odcs, rdf, sql, sodacl, terraform, ...)
234
- $ datacontract export --format html datacontract.yaml --output odcs.html
233
+ # export data contract as html (other formats: avro, dbt-models, dbt-sources, dbt-staging-sql, jsonschema, odcs, rdf, sql, sodacl, terraform, ...)
234
+ $ datacontract export html datacontract.yaml --output odcs.html
235
235
 
236
236
  # import sql (other formats: avro, glue, bigquery, jsonschema, excel ...)
237
- $ datacontract import --format sql --source my-ddl.sql --dialect postgres --output odcs.yaml
237
+ $ datacontract import sql --source my-ddl.sql --dialect postgres --output odcs.yaml
238
238
 
239
239
  # import from Excel template
240
- $ datacontract import --format excel --source odcs.xlsx --output odcs.yaml
240
+ $ datacontract import excel --source odcs.xlsx --output odcs.yaml
241
241
 
242
242
  # export to Excel template
243
- $ datacontract export --format excel --output odcs.xlsx odcs.yaml
243
+ $ datacontract export excel --output odcs.xlsx odcs.yaml
244
244
  ```
245
245
 
246
246
  ## Programmatic (Python)
@@ -386,51 +386,51 @@ Commands
386
386
 
387
387
  Create an empty data contract.
388
388
 
389
-
390
389
  ╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────╮
391
390
  │ location [LOCATION] The location of the data contract file to create. │
392
391
  │ [default: datacontract.yaml] │
393
392
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
394
393
  ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
395
- │ --template TEXT URL of a template or data contract [default: None]
394
+ │ --template TEXT URL of a template or data contract
396
395
  │ --overwrite --no-overwrite Replace the existing datacontract.yaml │
397
396
  │ [default: no-overwrite] │
398
- │ --debug --no-debug Enable debug logging [default: no-debug]
397
+ │ --debug --no-debug Enable debug logging
399
398
  │ --help Show this message and exit. │
400
399
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
400
+
401
+ Example: datacontract init datacontract.yaml
402
+
401
403
 
402
404
  ```
403
405
 
404
406
  ### lint
405
407
  ```
406
-
407
- Usage: datacontract lint [OPTIONS] [LOCATION]
408
-
409
- Validate that the datacontract.yaml is correctly formatted.
410
-
411
- ╭─ Arguments ──────────────────────────────────────────────────────────────────╮
412
- │ location [LOCATION] The location (url or path) of the data contract
413
- │ yaml.
414
- │ [default: datacontract.yaml] │
415
- ╰──────────────────────────────────────────────────────────────────────────────╯
416
- ╭─ Options ────────────────────────────────────────────────────────────────────╮
417
- --schema TEXT The location (url or path) of
418
- the ODCS JSON Schema
419
- --output PATH Specify the file path where
420
- the test results should be
421
- written to (e.g.,
422
- './test-results/TEST-datacon…
423
- If no path is provided, the
424
- output will be printed to
425
- stdout.
426
- │ --output-format [json|junit] The target format for the
427
- test results.
428
- │ --all-errors Report all JSON Schema │
429
- │ validation errors instead of │
430
- │ stopping after the first one.
431
- │ --debug --no-debug Enable debug logging │
432
- │ --help Show this message and exit. │
433
- ╰──────────────────────────────────────────────────────────────────────────────╯
408
+
409
+ Usage: datacontract lint [OPTIONS] [LOCATION]
410
+
411
+ Validate that the datacontract.yaml is correctly formatted.
412
+
413
+ ╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────╮
414
+ │ location [LOCATION] The location (url or path) of the data contract yaml.
415
+ [default: datacontract.yaml]
416
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
417
+ ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
418
+ --json-schema TEXT The location (url or path) of the ODCS JSON │
419
+ Schema
420
+ --output PATH Specify the file path where the test results
421
+ should be written to (e.g.,
422
+ './test-results/TEST-datacontract.xml'). If no
423
+ path is provided, the output will be printed to
424
+ stdout.
425
+ --output-format [json|junit] The target format for the test results.
426
+ --all-errors Report all JSON Schema validation errors instead
427
+ of stopping after the first one.
428
+ │ --debug --no-debug Enable debug logging
429
+ --help Show this message and exit.
430
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
431
+
432
+ Example: datacontract lint datacontract.yaml
433
+
434
434
 
435
435
  ```
436
436
 
@@ -446,10 +446,9 @@ Commands
446
446
  │ * v2 TEXT The location (path) of the target (after) data contract YAML. [required] │
447
447
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
448
448
  ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
449
- │ --debug --no-debug Enable debug logging
450
- │ --help Show this message and exit.
449
+ │ --debug --no-debug Enable debug logging
450
+ │ --help Show this message and exit.
451
451
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
452
-
453
452
  ```
454
453
 
455
454
  ```bash
@@ -459,61 +458,61 @@ $ datacontract changelog v1.odcs.yaml v2.odcs.yaml
459
458
  ### test
460
459
  ```
461
460
 
462
- Usage: datacontract test [OPTIONS] [LOCATION]
461
+ Usage: datacontract test [OPTIONS] [LOCATION]
463
462
 
464
463
  Run schema and quality tests on configured servers.
465
464
 
466
-
467
465
  ╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────╮
468
466
  │ location [LOCATION] The location (url or path) of the data contract yaml. │
469
467
  │ [default: datacontract.yaml] │
470
468
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
471
469
  ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
472
- │ --schema TEXT The location (url or path) of
473
- the ODCS JSON Schema
474
- [default: None]
475
- --server TEXT The server configuration to run
476
- the schema and quality tests.
477
- Use the key of the server object
478
- in the data contract yaml file
479
- to refer to a server, e.g.,
480
- `production`, or `all` for all
481
- servers (default).
482
- [default: all]
483
- │ --schema-name TEXT The name of the schema to test,
484
- e.g., `orders`, or `all` for
485
- all schemas (default).
486
- [default: all]
487
- │ --checks TEXT Comma-separated list of check
488
- categories to run. Available
489
- categories: schema, quality,
490
- servicelevel, custom. Omit to
491
- enable all.
492
- [default: None]
493
- --publish-test-results --no-publish-test-results Deprecated. Use publish
494
- parameter. Publish the results
495
- after the test
496
- [default:
497
- no-publish-test-results]
498
- │ --publish TEXT The url to publish the results
499
- after the test.
500
- [default: None]
501
- --output PATH Specify the file path where the
502
- test results should be written
503
- to (e.g.,
504
- './test-results/TEST-datacontra…
505
- [default: None]
506
- │ --output-format [junit] The target format for the test
507
- results.
508
- [default: None]
509
- --logs --no-logs Print logs [default: no-logs]
510
- --ssl-verification --no-ssl-verification SSL verification when publishing
511
- the data contract.
512
- [default: ssl-verification]
513
- │ --debug --no-debug Enable debug logging
514
- │ [default: no-debug] │
515
- │ --help Show this message and exit. │
470
+ │ --json-schema TEXT The location (url or path)
471
+ of the ODCS JSON Schema
472
+ --server TEXT The server configuration to
473
+ run the schema and quality
474
+ tests. Use the key of the
475
+ server object in the data
476
+ contract yaml file to refer
477
+ to a server, e.g.,
478
+ `production`, or `all` for
479
+ all servers (default).
480
+ [default: all]
481
+ │ --schema-name TEXT Which schema to test, e.g.,
482
+ `orders`, or `all` for all
483
+ schemas (default).
484
+ [default: all]
485
+ │ --publish-test-results --no-publish-test-results Deprecated. Use publish
486
+ parameter. Publish the
487
+ results after the test
488
+ [default:
489
+ no-publish-test-results]
490
+ --publish TEXT The url to publish the
491
+ results after the test.
492
+ --output PATH Specify the file path where
493
+ the test results should be
494
+ written to (e.g.,
495
+ './test-results/TEST-datac…
496
+ │ --output-format [json|junit] The target format for the │
497
+ test results.
498
+ --checks TEXT Comma-separated list of
499
+ check categories to run
500
+ (available: schema,
501
+ quality, servicelevel,
502
+ custom). Omit to enable
503
+ all.
504
+ │ --logs --no-logs Print logs
505
+ [default: no-logs]
506
+ --ssl-verification --no-ssl-verification SSL verification when
507
+ publishing the data
508
+ contract.
509
+ [default: ssl-verification]
510
+ --debug --no-debug Enable debug logging
511
+ │ --help Show this message and exit.
516
512
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
513
+
514
+ Example: datacontract test datacontract.yaml --server production
515
+
517
516
 
518
517
  ```
519
518
 
@@ -1224,65 +1223,54 @@ models:
1224
1223
 
1225
1224
  ### ci
1226
1225
  ```
1227
-
1228
- Usage: datacontract ci [OPTIONS] [LOCATIONS]...
1229
-
1230
- Run tests for CI/CD pipelines. Emits GitHub Actions annotations and step
1231
- summary.
1232
-
1233
- ╭─ Arguments ──────────────────────────────────────────────────────────────────╮
1234
- locations [LOCATIONS]... The location(s) (url or path) of the data
1235
- │ contract yaml file(s). │
1236
- ╰──────────────────────────────────────────────────────────────────────────────╯
1237
- ╭─ Options ────────────────────────────────────────────────────────────────────╮
1238
- --schema TEXT The location (url
1239
- or path) of the
1240
- ODCS JSON Schema
1241
- --server TEXT The server
1242
- configuration to
1243
- run the schema and
1244
- quality tests. Use
1245
- the key of the
1246
- server object in
1247
- the data contract
1248
- yaml file to refer
1249
- to a server, e.g.,
1250
- `production`, or
1251
- `all` for all
1252
- servers (default).
1253
- [default: all]
1254
- --publish TEXT The url to publish
1255
- the results after
1256
- the test.
1257
- --output PATH Specify the file
1258
- path where the test
1259
- results should be
1260
- written to (e.g.,
1261
- './test-results/TE…
1262
- │ --output-format [json|junit] The target format
1263
- for the test
1264
- results.
1265
- --logs --no-logs Print logs
1266
- [default: no-logs]
1267
- --json --no-json Print test results
1268
- as JSON to stdout.
1269
- [default: no-json]
1270
- --fail-on TEXT Minimum severity
1271
- that causes a
1272
- non-zero exit code:
1273
- 'warning', 'error',
1274
- │ or 'never'. │
1275
- │ [default: error] │
1276
- │ --ssl-verification --no-ssl-verific… SSL verification │
1277
- │ when publishing the │
1278
- │ data contract. │
1279
- │ [default: │
1280
- │ ssl-verification] │
1281
- │ --debug --no-debug Enable debug │
1282
- │ logging │
1283
- │ --help Show this message │
1284
- │ and exit. │
1285
- ╰──────────────────────────────────────────────────────────────────────────────╯
1226
+
1227
+ Usage: datacontract ci [OPTIONS] [LOCATIONS]...
1228
+
1229
+ Run tests for CI/CD pipelines. Emits GitHub Actions annotations and step summary.
1230
+
1231
+ ╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────╮
1232
+ │ locations [LOCATIONS]... The location(s) (url or path) of the data contract yaml │
1233
+ file(s).
1234
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
1235
+ ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
1236
+ --json-schema TEXT The location (url or path) │
1237
+ of the ODCS JSON Schema
1238
+ --server TEXT The server configuration
1239
+ to run the schema and
1240
+ quality tests. Use the key
1241
+ of the server object in
1242
+ the data contract yaml
1243
+ file to refer to a server,
1244
+ e.g., `production`, or
1245
+ `all` for all servers
1246
+ (default).
1247
+ [default: all]
1248
+ --publish TEXT The url to publish the
1249
+ results after the test.
1250
+ --output PATH Specify the file path
1251
+ where the test results
1252
+ should be written to
1253
+ (e.g.,
1254
+ './test-results/TEST-data…
1255
+ --output-format [json|junit] The target format for the
1256
+ test results.
1257
+ --logs --no-logs Print logs
1258
+ [default: no-logs]
1259
+ --json Print test results as JSON
1260
+ to stdout.
1261
+ │ --fail-on [warning|error|never] Minimum severity that
1262
+ causes a non-zero exit
1263
+ code.
1264
+ [default: error]
1265
+ --ssl-verification --no-ssl-verification SSL verification when
1266
+ publishing the data
1267
+ contract.
1268
+ [default:
1269
+ ssl-verification]
1270
+ --debug --no-debug Enable debug logging
1271
+ --help Show this message and
1272
+ exit.
1273
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
1286
1274
 
1287
1275
  ```
1288
1276
 
@@ -1367,126 +1355,90 @@ steps:
1367
1355
  ### export
1368
1356
  ```
1369
1357
 
1370
- Usage: datacontract export [OPTIONS] [LOCATION]
1371
-
1372
- Convert data contract to a specific format. Saves to file specified by `output` option if present,
1373
- otherwise prints to stdout.
1358
+ Usage: datacontract export [OPTIONS] COMMAND [ARGS]...
1374
1359
 
1360
+ Convert a data contract to a target format.
1375
1361
 
1376
- ╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────╮
1377
- │ location [LOCATION] The location (url or path) of the data contract yaml. │
1378
- │ [default: datacontract.yaml] │
1379
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
1380
1362
  ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
1381
- * --format [jsonschema|pydantic-model|sod The export format.
1382
- │ acl|dbt|dbt-sources|dbt-stagin [default: None] │
1383
- │ g-sql|odcs|rdf|avro|protobuf|g [required] │
1384
- │ reat-expectations|avro-idl|sql │
1385
- │ |sql-query|mermaid|html|go|big │
1386
- │ query|dbml|spark|sqlalchemy|da │
1387
- │ ta-caterer|dcs|markdown|iceber │
1388
- │ g|custom|excel|dqx] │
1389
- │ --output PATH Specify the file path where │
1390
- │ the exported data will be │
1391
- │ saved. If no path is provided, │
1392
- │ the output will be printed to │
1393
- │ stdout. │
1394
- │ [default: None] │
1395
- │ --server TEXT The server name to export. │
1396
- │ [default: None] │
1397
- │ --schema-name TEXT The name of the schema to │
1398
- │ export, e.g., `orders`, or │
1399
- │ `all` for all schemas │
1400
- │ (default). │
1401
- │ [default: all] │
1402
- │ --schema TEXT The location (url or path) of │
1403
- │ the ODCS JSON Schema │
1404
- │ [default: None] │
1405
- │ --engine TEXT [engine] The engine used for │
1406
- │ great expection run. │
1407
- │ [default: None] │
1408
- │ --template PATH The file path or URL of a │
1409
- │ template. For Excel format: │
1410
- │ path/URL to custom Excel │
1411
- │ template. For custom format: │
1412
- │ path to Jinja template. │
1413
- │ [default: None] │
1414
- │ --debug --no-debug Enable debug logging │
1415
- │ [default: no-debug] │
1416
- │ --help Show this message and exit. │
1363
+ │ --help Show this message and exit.
1417
1364
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
1418
- ╭─ RDF Options ────────────────────────────────────────────────────────────────────────────────────╮
1419
- --rdf-base TEXT [rdf] The base URI used to generate the RDF graph. [default: None]
1420
- ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
1421
- ╭─ SQL Options ────────────────────────────────────────────────────────────────────────────────────╮
1422
- --sql-server-type TEXT [sql] The server type to determine the sql dialect. By default,
1423
- it uses 'auto' to automatically detect the sql dialect via the
1424
- specified servers in the data contract. Accepted values: auto,
1425
- snowflake, postgres, mysql, databricks, sqlserver, bigquery,
1426
- trino, oracle. [default: auto]
1365
+ ╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
1366
+ sql Export a data contract to SQL DDL.
1367
+ │ sql-query Export a data contract to a SQL query. │
1368
+ dbt-models Export a data contract to dbt model schema YAML. │
1369
+ dbt-sources Export a data contract to dbt sources YAML.
1370
+ dbt-staging-sql Export a data contract to a dbt staging SQL file.
1371
+ avro Export a data contract to Avro schema.
1372
+ avro-idl Export a data contract to Avro IDL.
1373
+ jsonschema Export a data contract to JSON Schema.
1374
+ │ pydantic-model Export a data contract to a Pydantic model. │
1375
+ │ protobuf Export a data contract to Protobuf schema. │
1376
+ │ odcs Export a data contract to ODCS format. │
1377
+ │ rdf Export a data contract to RDF. │
1378
+ │ html Export a data contract to HTML. │
1379
+ │ markdown Export a data contract to Markdown. │
1380
+ │ mermaid Export a data contract to Mermaid diagram. │
1381
+ │ bigquery Export a data contract to BigQuery schema. │
1382
+ │ dbml Export a data contract to DBML. │
1383
+ │ go Export a data contract to Go structs. │
1384
+ │ spark Export a data contract to Spark schema. │
1385
+ │ sqlalchemy Export a data contract to SQLAlchemy models. │
1386
+ │ iceberg Export a data contract to Iceberg schema. │
1387
+ │ sodacl Export a data contract to SodaCL checks. │
1388
+ │ great-expectations Export a data contract to Great Expectations suite. │
1389
+ │ data-caterer Export a data contract to Data Caterer format. │
1390
+ │ dcs Export a data contract to DCS format. │
1391
+ │ dqx Export a data contract to DQX format. │
1392
+ │ excel Export a data contract to Excel. │
1393
+ │ custom Export a data contract using a custom Jinja template. │
1427
1394
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
1395
+
1396
+ Example: datacontract export html datacontract.yaml --output datacontract.html
1397
+ For SQL dialects (postgres, mysql, snowflake, databricks, sqlserver, trino, oracle), use
1398
+ `datacontract export sql --dialect <dialect>`.
1399
+
1428
1400
 
1429
1401
  ```
1430
1402
 
1403
+ Run `datacontract export <format> --help` to see the format-specific options (e.g. `datacontract export sql --help`). If you are missing a format, please [create an issue on GitHub](https://github.com/datacontract/datacontract-cli/issues).
1404
+
1405
+ #### Examples
1431
1406
  ```bash
1432
1407
  # Example export data contract as HTML
1433
- datacontract export --format html --output datacontract.html
1434
- ```
1435
-
1436
- Available export options:
1437
-
1438
- | Type | Description | Status |
1439
- |----------------------|---------------------------------------------------------|---------|
1440
- | `html` | Export to HTML | ✅ |
1441
- | `jsonschema` | Export to JSON Schema | ✅ |
1442
- | `odcs` | Export to Open Data Contract Standard (ODCS) V3 | ✅ |
1443
- | `sodacl` | Export to SodaCL quality checks in YAML format | ✅ |
1444
- | `dbt` | Export to dbt models in YAML format | ✅ |
1445
- | `dbt-sources` | Export to dbt sources in YAML format | ✅ |
1446
- | `dbt-staging-sql` | Export to dbt staging SQL models | ✅ |
1447
- | `rdf` | Export data contract to RDF representation in N3 format | ✅ |
1448
- | `avro` | Export to AVRO models | ✅ |
1449
- | `protobuf` | Export to Protobuf | ✅ |
1450
- | `terraform` | Export to terraform resources | ✅ |
1451
- | `sql` | Export to SQL DDL | ✅ |
1452
- | `sql-query` | Export to SQL Query | ✅ |
1453
- | `great-expectations` | Export to Great Expectations Suites in JSON Format | ✅ |
1454
- | `bigquery` | Export to BigQuery Schemas | ✅ |
1455
- | `go` | Export to Go types | ✅ |
1456
- | `pydantic-model` | Export to pydantic models | ✅ |
1457
- | `DBML` | Export to a DBML Diagram description | ✅ |
1458
- | `spark` | Export to a Spark StructType | ✅ |
1459
- | `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
1460
- | `data-caterer` | Export to Data Caterer in YAML format | ✅ |
1461
- | `dcs` | Export to Data Contract Specification in YAML format | ✅ |
1462
- | `markdown` | Export to Markdown | ✅ |
1463
- | `iceberg` | Export to an Iceberg JSON Schema Definition | partial |
1464
- | `excel` | Export to ODCS Excel Template | ✅ |
1465
- | `custom` | Export to Custom format with Jinja | ✅ |
1466
- | `dqx` | Export to DQX in YAML format | ✅ |
1467
- | Missing something? | Please create an issue on GitHub | TBD |
1468
-
1469
- #### SQL
1408
+ datacontract export html --output datacontract.html
1409
+ ```
1410
+
1411
+ <details markdown="1">
1412
+ <summary><strong>SQL</strong></summary>
1470
1413
 
1471
1414
  The `export` function converts a given data contract into a SQL data definition language (DDL).
1472
1415
 
1473
1416
  ```shell
1474
- datacontract export datacontract.yaml --format sql --output output.sql
1417
+ datacontract export sql datacontract.yaml --output output.sql
1475
1418
  ```
1476
1419
 
1477
- If using Databricks, and an error is thrown when trying to deploy the SQL DDLs with `variant` columns set the following properties.
1420
+ The SQL dialect is determined from the `servers` block in the data contract (e.g. `type: postgres`, `type: snowflake`). Alternatively, pass it explicitly:
1421
+
1422
+ ```shell
1423
+ datacontract export sql datacontract.yaml --dialect postgres --output output.sql
1424
+ ```
1425
+
1426
+ If using Databricks and an error is thrown when deploying SQL DDLs with `variant` columns, set the following property.
1478
1427
 
1479
1428
  ```shell
1480
1429
  spark.conf.set(“spark.databricks.delta.schema.typeCheck.enabled”, “false”)
1481
1430
  ```
1482
1431
 
1483
- #### Great Expectations
1432
+ </details>
1433
+
1434
+ <details markdown="1">
1435
+ <summary><strong>Great Expectations</strong></summary>
1484
1436
 
1485
1437
  The `export` function transforms a specified data contract into a comprehensive Great Expectations JSON suite.
1486
1438
  If the contract includes multiple models, you need to specify the names of the schema/models you wish to export.
1487
1439
 
1488
1440
  ```shell
1489
- datacontract export datacontract.yaml --format great-expectations --model orders
1441
+ datacontract export great-expectations datacontract.yaml --schema-name orders
1490
1442
  ```
1491
1443
 
1492
1444
  The export creates a list of expectations by utilizing:
@@ -1509,13 +1461,16 @@ To further customize the export, the following optional arguments are available:
1509
1461
 
1510
1462
  Providing `sql_server_type` ensures that the appropriate SQL dialect and connection settings are applied during the expectation validation.
1511
1463
 
1512
- #### RDF
1464
+ </details>
1465
+
1466
+ <details markdown="1">
1467
+ <summary><strong>RDF</strong></summary>
1513
1468
 
1514
1469
  The `export` function converts a given data contract into a RDF representation. You have the option to
1515
1470
  add a base_url which will be used as the default prefix to resolve relative IRIs inside the document.
1516
1471
 
1517
1472
  ```shell
1518
- datacontract export --format rdf --rdf-base https://www.example.com/ datacontract.yaml
1473
+ datacontract export rdf --base https://www.example.com/ datacontract.yaml
1519
1474
  ```
1520
1475
 
1521
1476
  The data contract is mapped onto the following concepts of a yet to be defined Data Contract
@@ -1533,24 +1488,36 @@ Having the data contract inside an RDF Graph gives us access the following use c
1533
1488
  - Apply graph algorithms on multiple data contracts (Find similar data contracts, find "gatekeeper"
1534
1489
  data products, find the true domain owner of a field attribute)
1535
1490
 
1536
- #### DBML
1491
+ </details>
1492
+
1493
+ <details markdown="1">
1494
+ <summary><strong>DBML</strong></summary>
1537
1495
 
1538
1496
  The export function converts the logical data types of the datacontract into the specific ones of a concrete Database
1539
1497
  if a server is selected via the `--server` option (based on the `type` of that server). If no server is selected, the
1540
1498
  logical data types are exported.
1541
1499
 
1542
- #### DBT & DBT-SOURCES
1500
+ </details>
1501
+
1502
+ <details markdown="1">
1503
+ <summary><strong>DBT & DBT-SOURCES</strong></summary>
1543
1504
 
1544
1505
  The export function converts the datacontract to dbt models in YAML format, with support for SQL dialects.
1545
1506
  If a server is selected via the `--server` option (based on the `type` of that server) then the DBT column `data_types` match the expected data types of the server.
1546
1507
  If no server is selected, then it defaults to `snowflake`.
1547
1508
 
1548
- #### Spark
1509
+ </details>
1510
+
1511
+ <details markdown="1">
1512
+ <summary><strong>Spark</strong></summary>
1549
1513
 
1550
1514
  The export function converts the data contract specification into a StructType Spark schema. The returned value is a Python code picture of the model schemas.
1551
1515
  Spark DataFrame schema is defined as StructType. For more details about Spark Data Types please see [the spark documentation](https://spark.apache.org/docs/latest/sql-ref-datatypes.html)
1552
1516
 
1553
- #### Avro
1517
+ </details>
1518
+
1519
+ <details markdown="1">
1520
+ <summary><strong>Avro</strong></summary>
1554
1521
 
1555
1522
  The export function converts the data contract specification into an avro schema. It supports specifying custom avro properties for logicalTypes and default values.
1556
1523
 
@@ -1562,7 +1529,7 @@ To specify custom Avro properties in your data contract, you can define them wit
1562
1529
 
1563
1530
  >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)
1564
1531
 
1565
- #### Example Configuration
1532
+ ##### Example Configuration
1566
1533
 
1567
1534
  ```yaml
1568
1535
  models:
@@ -1578,7 +1545,7 @@ models:
1578
1545
  avroDefault: 1672534861000000
1579
1546
  ```
1580
1547
 
1581
- #### Explanation
1548
+ ##### Explanation
1582
1549
 
1583
1550
  - **models**: The top-level key that contains different models (tables or objects) in your data contract.
1584
1551
  - **orders**: A specific model name. Replace this with the name of your model.
@@ -1592,29 +1559,35 @@ models:
1592
1559
  - **avroLogicalType**: Specifies the logical type of the field in Avro. In this example, it is `local-timestamp-micros`.
1593
1560
  - **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`.
1594
1561
 
1595
- #### Data Caterer
1562
+ </details>
1563
+
1564
+ <details markdown="1">
1565
+ <summary><strong>Data Caterer</strong></summary>
1596
1566
 
1597
1567
  The export function converts the data contract to a data generation task in YAML format that can be
1598
1568
  ingested by [Data Caterer](https://github.com/data-catering/data-caterer). This gives you the
1599
1569
  ability to generate production-like data in any environment based off your data contract.
1600
1570
 
1601
1571
  ```shell
1602
- datacontract export datacontract.yaml --format data-caterer --model orders
1572
+ datacontract export data-caterer datacontract.yaml --schema-name orders
1603
1573
  ```
1604
1574
 
1605
1575
  You can further customise the way data is generated via adding
1606
1576
  [additional metadata in the YAML](https://data.catering/setup/generator/data-generator/)
1607
1577
  to suit your needs.
1608
1578
 
1609
- #### Iceberg
1579
+ </details>
1580
+
1581
+ <details markdown="1">
1582
+ <summary><strong>Iceberg</strong></summary>
1610
1583
 
1611
1584
  Exports to an [Iceberg Table Json Schema Definition](https://iceberg.apache.org/spec/#appendix-c-json-serialization).
1612
1585
 
1613
- This export only supports a single model export at a time because Iceberg's schema definition is for a single table and the exporter maps 1 model to 1 table, use the `--model` flag
1586
+ This export only supports a single model export at a time because Iceberg's schema definition is for a single table and the exporter maps 1 model to 1 table, use the `--schema-name` flag
1614
1587
  to limit your contract export to a single model.
1615
1588
 
1616
1589
  ```bash
1617
- $ datacontract export --format iceberg --model orders https://datacontract.com/examples/orders-latest/datacontract.yaml --output /tmp/orders_iceberg.json
1590
+ $ datacontract export iceberg --schema-name orders https://datacontract.com/examples/orders-latest/datacontract.yaml --output /tmp/orders_iceberg.json
1618
1591
 
1619
1592
  $ cat /tmp/orders_iceberg.json | jq '.'
1620
1593
  {
@@ -1664,29 +1637,34 @@ to limit your contract export to a single model.
1664
1637
  }
1665
1638
  ```
1666
1639
 
1667
- #### Custom
1640
+ </details>
1641
+
1642
+ <details markdown="1">
1643
+ <summary><strong>Custom</strong></summary>
1668
1644
 
1669
1645
  The export function converts the data contract specification into the custom format with Jinja. You can specify the path to a Jinja template with the `--template` argument, allowing you to output files in any format.
1670
1646
 
1671
1647
  ```shell
1672
- datacontract export --format custom --template template.txt datacontract.yaml
1648
+ datacontract export custom --template template.txt datacontract.yaml
1673
1649
  ```
1674
1650
 
1675
1651
  ##### Jinja templates & variables
1676
1652
 
1677
- You can directly use the Data Contract Specification as template variables.
1653
+ You can directly use the ODCS (Open Data Contract Standard) object as a template variable. `data_contract` is an `OpenDataContractStandard` instance; top-level fields include `name`, `id`, `version`, `schema_` (the list of schemas), `servers`, `team`, etc.
1678
1654
 
1679
1655
  {% raw %}
1680
1656
  ```shell
1681
1657
  $ cat template.txt
1682
- title: {{ data_contract.info.title }}
1683
- models:
1684
- {%- for model_name, model in data_contract.models.items() %}
1685
- - name: {{ model.name }}
1658
+ title: {{ data_contract.name }}
1659
+ schemas:
1660
+ {%- for schema in data_contract.schema_ %}
1661
+ - name: {{ schema.name }}
1686
1662
  {%- endfor %}
1687
1663
 
1688
- $ datacontract export --format custom --template template.txt datacontract.yaml
1664
+ $ datacontract export custom --template template.txt datacontract.yaml
1689
1665
  title: Orders Latest
1666
+ schemas:
1667
+ - name: orders
1690
1668
  ```
1691
1669
  {% endraw %}
1692
1670
 
@@ -1716,7 +1694,7 @@ Below is an example of a dbt staging layer that converts a field of `type: times
1716
1694
  {% endraw %}
1717
1695
  - export command
1718
1696
  ```shell
1719
- datacontract export datacontract.odcs.yaml --format custom --template template.sql --schema-name orders
1697
+ datacontract export custom datacontract.odcs.yaml --template template.sql --schema-name orders
1720
1698
  ```
1721
1699
  - `output.sql`
1722
1700
  {% raw %}
@@ -1732,12 +1710,15 @@ Below is an example of a dbt staging layer that converts a field of `type: times
1732
1710
  ```
1733
1711
  {% endraw %}
1734
1712
 
1735
- #### ODCS Excel Template
1713
+ </details>
1714
+
1715
+ <details markdown="1">
1716
+ <summary><strong>ODCS Excel Template</strong></summary>
1736
1717
 
1737
1718
  The `export` function converts a data contract into an ODCS (Open Data Contract Standard) Excel template. This creates a user-friendly Excel spreadsheet that can be used for authoring, sharing, and managing data contracts using the familiar Excel interface.
1738
1719
 
1739
1720
  ```shell
1740
- datacontract export --format excel --output datacontract.xlsx datacontract.yaml
1721
+ datacontract export excel --output datacontract.xlsx datacontract.yaml
1741
1722
  ```
1742
1723
 
1743
1724
  The Excel format enables:
@@ -1748,135 +1729,57 @@ The Excel format enables:
1748
1729
 
1749
1730
  For more information about the Excel template structure, visit the [ODCS Excel Template repository](https://github.com/datacontract/open-data-contract-standard-excel-template).
1750
1731
 
1732
+ </details>
1733
+
1751
1734
  ### import
1752
1735
  ```
1753
1736
 
1754
- Usage: datacontract import [OPTIONS]
1755
-
1756
- Create a data contract from the given source location. Saves to file specified by `output` option
1757
- if present, otherwise prints to stdout.
1737
+ Usage: datacontract import [OPTIONS] COMMAND [ARGS]...
1758
1738
 
1739
+ Create a data contract from a source format.
1759
1740
 
1760
1741
  ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
1761
- * --format [sql|avro|dbt|dbml|glue| The format of the source
1762
- │ jsonschema|json|bigquery file. │
1763
- │ |odcs|unity|spark|iceber [default: None] │
1764
- g|parquet|csv|protobuf|e [required]
1765
- xcel]
1766
- --output PATH Specify the file path
1767
- where the Data Contract
1768
- will be saved. If no path
1769
- is provided, the output
1770
- will be printed to stdout.
1771
- [default: None]
1772
- --source TEXT The path to the file that
1773
- should be imported.
1774
- [default: None]
1775
- --dialect TEXT The SQL dialect.
1776
- Accepted values: postgres,
1777
- tsql, bigquery, snowflake,
1778
- databricks, spark, duckdb.
1779
- [default: None]
1780
- │ --glue-table TEXT List of table ids to │
1781
- │ import from the Glue │
1782
- │ Database (repeat for │
1783
- │ multiple table ids, leave │
1784
- │ empty for all tables in │
1785
- │ the dataset). │
1786
- │ [default: None] │
1787
- │ --bigquery-project TEXT The bigquery project id. │
1788
- │ [default: None] │
1789
- │ --bigquery-dataset TEXT The bigquery dataset id. │
1790
- │ [default: None] │
1791
- │ --bigquery-table TEXT List of table ids to │
1792
- │ import from the bigquery │
1793
- │ API (repeat for multiple │
1794
- │ table ids, leave empty for │
1795
- │ all tables in the │
1796
- │ dataset). │
1797
- │ [default: None] │
1798
- │ --unity-table-full-name TEXT Full name of a table in │
1799
- │ the unity catalog │
1800
- │ [default: None] │
1801
- │ --dbt-model TEXT List of models names to │
1802
- │ import from the dbt │
1803
- │ manifest file (repeat for │
1804
- │ multiple models names, │
1805
- │ leave empty for all models │
1806
- │ in the dataset). │
1807
- │ [default: None] │
1808
- │ --dbml-schema TEXT List of schema names to │
1809
- │ import from the DBML file │
1810
- │ (repeat for multiple │
1811
- │ schema names, leave empty │
1812
- │ for all tables in the │
1813
- │ file). │
1814
- │ [default: None] │
1815
- │ --dbml-table TEXT List of table names to │
1816
- │ import from the DBML file │
1817
- │ (repeat for multiple table │
1818
- │ names, leave empty for all │
1819
- │ tables in the file). │
1820
- │ [default: None] │
1821
- │ --iceberg-table TEXT Table name to assign to │
1822
- │ the model created from the │
1823
- │ Iceberg schema. │
1824
- │ [default: None] │
1825
- │ --template TEXT The location (url or path) │
1826
- │ of the ODCS template │
1827
- │ [default: None] │
1828
- │ --schema TEXT The location (url or path) │
1829
- │ of the ODCS JSON Schema │
1830
- │ [default: None] │
1831
- │ --owner TEXT The owner or team │
1832
- │ responsible for managing │
1833
- │ the data contract. │
1834
- │ [default: None] │
1835
- │ --id TEXT The identifier for the the │
1836
- │ data contract. │
1837
- │ [default: None] │
1838
- │ --debug --no-debug Enable debug logging │
1839
- │ [default: no-debug] │
1840
- │ --help Show this message and │
1841
- │ exit. │
1742
+ │ --help Show this message and exit.
1743
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
1744
+ ╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
1745
+ sql Import a data contract from a SQL DDL file.
1746
+ avro Import a data contract from an Avro schema file.
1747
+ dbt Import a data contract from a dbt manifest file.
1748
+ dbml Import a data contract from a DBML file.
1749
+ glue Import a data contract from AWS Glue.
1750
+ bigquery Import a data contract from BigQuery.
1751
+ unity Import a data contract from Databricks Unity Catalog.
1752
+ jsonschema Import a data contract from a JSON Schema file.
1753
+ json Import a data contract from a JSON file.
1754
+ odcs Import a data contract from an ODCS file.
1755
+ parquet Import a data contract from a Parquet file.
1756
+ csv Import a data contract from a CSV file.
1757
+ protobuf Import a data contract from a Protobuf schema file.
1758
+ spark Import a data contract from a Spark schema.
1759
+ iceberg Import a data contract from an Iceberg schema.
1760
+ excel Import a data contract from an Excel file.
1842
1761
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
1762
+
1763
+ Example: datacontract import sql --source ddl.sql --dialect postgres --output datacontract.yaml
1764
+
1843
1765
 
1844
1766
  ```
1845
1767
 
1846
- Example:
1768
+ Run `datacontract import <format> --help` to see the format-specific options (e.g. `datacontract import sql --help`). If you are missing a format, please [create an issue on GitHub](https://github.com/datacontract/datacontract-cli/issues).
1769
+
1770
+ #### Examples
1847
1771
  ```bash
1848
1772
  # Example import from SQL DDL
1849
- datacontract import --format sql --source my_ddl.sql --dialect postgres
1773
+ datacontract import sql --source my_ddl.sql --dialect postgres
1850
1774
  # To save to file
1851
- datacontract import --format sql --source my_ddl.sql --dialect postgres --output datacontract.yaml
1775
+ datacontract import sql --source my_ddl.sql --dialect postgres --output datacontract.yaml
1852
1776
  ```
1853
-
1854
- Available import options:
1855
-
1856
- | Type | Description | Status |
1857
- |--------------------|-----------------------------------------------|---------|
1858
- | `avro` | Import from AVRO schemas | ✅ |
1859
- | `bigquery` | Import from BigQuery Schemas | ✅ |
1860
- | `csv` | Import from CSV File | ✅ |
1861
- | `dbml` | Import from DBML models | ✅ |
1862
- | `dbt` | Import from dbt models | ✅ |
1863
- | `excel` | Import from ODCS Excel Template | ✅ |
1864
- | `glue` | Import from AWS Glue DataCatalog | ✅ |
1865
- | `iceberg` | Import from an Iceberg JSON Schema Definition | partial |
1866
- | `jsonschema` | Import from JSON Schemas | ✅ |
1867
- | `parquet` | Import from Parquet File Metadata | ✅ |
1868
- | `protobuf` | Import from Protobuf schemas | ✅ |
1869
- | `spark` | Import from Spark StructTypes, Variant | ✅ |
1870
- | `sql` | Import from SQL DDL | ✅ |
1871
- | `unity` | Import from Databricks Unity Catalog | partial |
1872
- | Missing something? | Please create an issue on GitHub | TBD |
1873
-
1874
-
1875
- #### BigQuery
1777
+ <details markdown="1">
1778
+ <summary><strong>BigQuery</strong></summary>
1876
1779
 
1877
1780
  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.
1878
1781
 
1879
- 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.
1782
+ To import from the Bigquery API, you have to _omit_ `source` and instead need to provide `--project` and `--dataset`. Additionally you may specify `--table` to enumerate the tables that should be imported. If no tables are given, _all_ available tables of the dataset will be imported.
1880
1783
 
1881
1784
  For providing authentication to the Client, please see [the google documentation](https://cloud.google.com/docs/authentication/provide-credentials-adc#how-to) or the one [about authorizing client libraries](https://cloud.google.com/bigquery/docs/authentication#client-libs).
1882
1785
 
@@ -1884,56 +1787,66 @@ Examples:
1884
1787
 
1885
1788
  ```bash
1886
1789
  # Example import from Bigquery JSON
1887
- datacontract import --format bigquery --source my_bigquery_table.json
1790
+ datacontract import bigquery --source my_bigquery_table.json
1888
1791
  ```
1889
1792
 
1890
1793
  ```bash
1891
1794
  # Example import from Bigquery API with specifying the tables to import
1892
- datacontract import --format bigquery --bigquery-project <project_id> --bigquery-dataset <dataset_id> --bigquery-table <tableid_1> --bigquery-table <tableid_2> --bigquery-table <tableid_3>
1795
+ datacontract import bigquery --project <project_id> --dataset <dataset_id> --table <tableid_1> --table <tableid_2> --table <tableid_3>
1893
1796
  ```
1894
1797
 
1895
1798
  ```bash
1896
1799
  # Example import from Bigquery API importing all tables in the dataset
1897
- datacontract import --format bigquery --bigquery-project <project_id> --bigquery-dataset <dataset_id>
1800
+ datacontract import bigquery --project <project_id> --dataset <dataset_id>
1898
1801
  ```
1899
1802
 
1900
- #### Unity Catalog
1803
+ </details>
1804
+
1805
+ <details markdown="1">
1806
+ <summary><strong>Unity Catalog</strong></summary>
1807
+
1901
1808
  ```bash
1902
1809
  # Example import from a Unity Catalog JSON file
1903
- datacontract import --format unity --source my_unity_table.json
1810
+ datacontract import unity --source my_unity_table.json
1904
1811
  ```
1905
1812
 
1906
1813
  ```bash
1907
1814
  # Example import single table from Unity Catalog via HTTP endpoint using PAT
1908
1815
  export DATACONTRACT_DATABRICKS_SERVER_HOSTNAME="https://xyz.cloud.databricks.com"
1909
1816
  export DATACONTRACT_DATABRICKS_TOKEN=<token>
1910
- datacontract import --format unity --unity-table-full-name <table_full_name>
1817
+ datacontract import unity --table <table_full_name>
1911
1818
  ```
1912
1819
  Please refer to [Databricks documentation](https://docs.databricks.com/aws/en/dev-tools/auth/unified-auth) on how to set up a profile
1913
1820
  ```bash
1914
1821
  # Example import single table from Unity Catalog via HTTP endpoint using Profile
1915
1822
  export DATACONTRACT_DATABRICKS_PROFILE="my-profile"
1916
- datacontract import --format unity --unity-table-full-name <table_full_name>
1823
+ datacontract import unity --table <table_full_name>
1917
1824
  ```
1918
1825
 
1919
- #### dbt
1826
+ </details>
1827
+
1828
+ <details markdown="1">
1829
+ <summary><strong>dbt</strong></summary>
1920
1830
 
1921
1831
  Importing from dbt manifest file.
1922
- 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.
1832
+ You may give the `--model` parameter to enumerate the tables that should be imported. If no tables are given, _all_ available tables of the database will be imported.
1923
1833
 
1924
1834
  Examples:
1925
1835
 
1926
1836
  ```bash
1927
1837
  # Example import from dbt manifest with specifying the tables to import
1928
- datacontract import --format dbt --source <manifest_path> --dbt-model <model_name_1> --dbt-model <model_name_2> --dbt-model <model_name_3>
1838
+ datacontract import dbt --source <manifest_path> --model <model_name_1> --model <model_name_2> --model <model_name_3>
1929
1839
  ```
1930
1840
 
1931
1841
  ```bash
1932
1842
  # Example import from dbt manifest importing all tables in the database
1933
- datacontract import --format dbt --source <manifest_path>
1843
+ datacontract import dbt --source <manifest_path>
1934
1844
  ```
1935
1845
 
1936
- #### Excel
1846
+ </details>
1847
+
1848
+ <details markdown="1">
1849
+ <summary><strong>Excel</strong></summary>
1937
1850
 
1938
1851
  Importing from [ODCS Excel Template](https://github.com/datacontract/open-data-contract-standard-excel-template).
1939
1852
 
@@ -1941,33 +1854,39 @@ Examples:
1941
1854
 
1942
1855
  ```bash
1943
1856
  # Example import from ODCS Excel Template
1944
- datacontract import --format excel --source odcs.xlsx
1857
+ datacontract import excel --source odcs.xlsx
1945
1858
  ```
1946
1859
 
1947
- #### Glue
1860
+ </details>
1861
+
1862
+ <details markdown="1">
1863
+ <summary><strong>Glue</strong></summary>
1948
1864
 
1949
1865
  Importing from Glue reads the necessary Data directly off of the AWS API.
1950
- You may give the `glue-table` parameter to enumerate the tables that should be imported. If no tables are given, _all_ available tables of the database will be imported.
1866
+ You may give the `--table` parameter to enumerate the tables that should be imported. If no tables are given, _all_ available tables of the database will be imported.
1951
1867
 
1952
1868
  Examples:
1953
1869
 
1954
1870
  ```bash
1955
1871
  # Example import from AWS Glue with specifying the tables to import
1956
- datacontract import --format glue --source <database_name> --glue-table <table_name_1> --glue-table <table_name_2> --glue-table <table_name_3>
1872
+ datacontract import glue --database <database_name> --table <table_name_1> --table <table_name_2> --table <table_name_3>
1957
1873
  ```
1958
1874
 
1959
1875
  ```bash
1960
1876
  # Example import from AWS Glue importing all tables in the database
1961
- datacontract import --format glue --source <database_name>
1877
+ datacontract import glue --database <database_name>
1962
1878
  ```
1963
1879
 
1964
- #### Spark
1880
+ </details>
1881
+
1882
+ <details markdown="1">
1883
+ <summary><strong>Spark</strong></summary>
1965
1884
 
1966
- Importing from Spark table or view these must be created or accessible in the Spark context. Specify tables list in `source` parameter. If the `source` tables are registered as tables in Databricks, and they have a table-level descriptions they will also be added to the Data Contract Specification.
1885
+ Importing from Spark table or view these must be created or accessible in the Spark context. Specify tables list in the `--tables` option. If the tables are registered in Databricks and have a table-level description, it will also be added to the Data Contract Specification.
1967
1886
 
1968
1887
  ```bash
1969
1888
  # Example: Import Spark table(s) from Spark context
1970
- datacontract import --format spark --source "users,orders"
1889
+ datacontract import spark --tables "users,orders"
1971
1890
  ```
1972
1891
 
1973
1892
  ```bash
@@ -1988,67 +1907,81 @@ DataContract.import_from_source("spark", "users", dataframe = df_user, descripti
1988
1907
  DataContract.import_from_source(format = "spark", source = "users", dataframe = df_user, description = "description")
1989
1908
  ```
1990
1909
 
1991
- #### DBML
1910
+ </details>
1911
+
1912
+ <details markdown="1">
1913
+ <summary><strong>DBML</strong></summary>
1992
1914
 
1993
1915
  Importing from DBML Documents.
1994
1916
  **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.
1995
1917
  We also assume, that the description for models and fields is stored in a Note within the DBML model.
1996
1918
 
1997
- You may give the `dbml-table` or `dbml-schema` parameter to enumerate the tables or schemas that should be imported.
1919
+ You may give the `--table` or `--schema` parameter to enumerate the tables or schemas that should be imported.
1998
1920
  If no tables are given, _all_ available tables of the source will be imported. Likewise, if no schema is given, _all_ schemas are imported.
1999
1921
 
2000
1922
  Examples:
2001
1923
 
2002
1924
  ```bash
2003
1925
  # Example import from DBML file, importing everything
2004
- datacontract import --format dbml --source <file_path>
1926
+ datacontract import dbml --source <file_path>
2005
1927
  ```
2006
1928
 
2007
1929
  ```bash
2008
1930
  # Example import from DBML file, filtering for tables from specific schemas
2009
- datacontract import --format dbml --source <file_path> --dbml-schema <schema_1> --dbml-schema <schema_2>
1931
+ datacontract import dbml --source <file_path> --schema <schema_1> --schema <schema_2>
2010
1932
  ```
2011
1933
 
2012
1934
  ```bash
2013
1935
  # Example import from DBML file, filtering for tables with specific names
2014
- datacontract import --format dbml --source <file_path> --dbml-table <table_name_1> --dbml-table <table_name_2>
1936
+ datacontract import dbml --source <file_path> --table <table_name_1> --table <table_name_2>
2015
1937
  ```
2016
1938
 
2017
1939
  ```bash
2018
1940
  # Example import from DBML file, filtering for tables with specific names from a specific schema
2019
- datacontract import --format dbml --source <file_path> --dbml-table <table_name_1> --dbml-schema <schema_1>
1941
+ datacontract import dbml --source <file_path> --table <table_name_1> --schema <schema_1>
2020
1942
  ```
2021
1943
 
2022
- #### Iceberg
1944
+ </details>
1945
+
1946
+ <details markdown="1">
1947
+ <summary><strong>Iceberg</strong></summary>
2023
1948
 
2024
1949
  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.
2025
1950
 
2026
1951
  Examples:
2027
1952
 
2028
1953
  ```bash
2029
- datacontract import --format iceberg --source ./tests/fixtures/iceberg/simple_schema.json --iceberg-table test-table
1954
+ datacontract import iceberg --source ./tests/fixtures/iceberg/simple_schema.json --table test-table
2030
1955
  ```
2031
1956
 
2032
- #### CSV
1957
+ </details>
1958
+
1959
+ <details markdown="1">
1960
+ <summary><strong>CSV</strong></summary>
2033
1961
 
2034
1962
  Importing from CSV File. Specify file in `source` parameter. It does autodetection for encoding and csv dialect
2035
1963
 
2036
1964
  Example:
2037
1965
 
2038
1966
  ```bash
2039
- datacontract import --format csv --source "test.csv"
1967
+ datacontract import csv --source "test.csv"
2040
1968
  ```
2041
1969
 
2042
- #### protobuf
1970
+ </details>
1971
+
1972
+ <details markdown="1">
1973
+ <summary><strong>protobuf</strong></summary>
2043
1974
 
2044
1975
  Importing from protobuf File. Specify file in `source` parameter.
2045
1976
 
2046
1977
  Example:
2047
1978
 
2048
1979
  ```bash
2049
- datacontract import --format protobuf --source "test.proto"
1980
+ datacontract import protobuf --source "test.proto"
2050
1981
  ```
2051
1982
 
1983
+ </details>
1984
+
2052
1985
 
2053
1986
  ### catalog
2054
1987
  ```
@@ -2057,17 +1990,19 @@ datacontract import --format protobuf --source "test.proto"
2057
1990
 
2058
1991
  Create a html catalog of data contracts.
2059
1992
 
2060
-
2061
1993
  ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
2062
- │ --files TEXT Glob pattern for the data contract files to include in the
2063
- catalog. Applies recursively to any subfolders.
2064
- [default: *.yaml]
2065
- │ --output TEXT Output directory for the catalog html files. [default: catalog/]
2066
- --schema TEXT The location (url or path) of the ODCS JSON Schema
2067
- [default: None]
2068
- │ --debug --no-debug Enable debug logging [default: no-debug]
2069
- │ --help Show this message and exit.
1994
+ │ --files TEXT Glob pattern for the data contract files to include in the
1995
+ catalog. Applies recursively to any subfolders.
1996
+ [default: *.yaml]
1997
+ │ --output TEXT Output directory for the catalog html files.
1998
+ [default: catalog/]
1999
+ --json-schema TEXT The location (url or path) of the ODCS JSON Schema
2000
+ │ --debug --no-debug Enable debug logging
2001
+ │ --help Show this message and exit.
2070
2002
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
2003
+
2004
+ Example: datacontract catalog --files "**/*.yaml" --output catalog/
2005
+
2071
2006
 
2072
2007
  ```
2073
2008
 
@@ -2088,21 +2023,22 @@ datacontract catalog --files "*.odcs.yaml"
2088
2023
 
2089
2024
  Publish the data contract to the Entropy Data.
2090
2025
 
2091
-
2092
2026
  ╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────╮
2093
2027
  │ location [LOCATION] The location (url or path) of the data contract yaml. │
2094
2028
  │ [default: datacontract.yaml] │
2095
2029
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
2096
2030
  ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
2097
- │ --schema TEXT The location (url or path) of the ODCS JSON │
2031
+ │ --json-schema TEXT The location (url or path) of the ODCS JSON │
2098
2032
  │ Schema │
2099
- │ [default: None] │
2100
2033
  │ --ssl-verification --no-ssl-verification SSL verification when publishing the data │
2101
2034
  │ contract. │
2102
2035
  │ [default: ssl-verification] │
2103
- │ --debug --no-debug Enable debug logging [default: no-debug]
2036
+ │ --debug --no-debug Enable debug logging
2104
2037
  │ --help Show this message and exit. │
2105
2038
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
2039
+
2040
+ Example: datacontract publish datacontract.yaml
2041
+
2106
2042
 
2107
2043
  ```
2108
2044
 
@@ -2113,14 +2049,19 @@ datacontract catalog --files "*.odcs.yaml"
2113
2049
 
2114
2050
  Start the datacontract CLI as server application with REST API.
2115
2051
 
2116
- The OpenAPI documentation as Swagger UI is available on http://localhost:4242. You can execute the
2117
- commands directly from the Swagger UI.
2052
+ The OpenAPI documentation as Swagger UI is available on http://localhost:4242.
2053
+ You can execute the commands directly from the Swagger UI.
2054
+
2118
2055
  To protect the API, you can set the environment variable DATACONTRACT_CLI_API_KEY to a secret API
2119
- key. To authenticate, requests must include the header 'x-api-key' with the correct API key. This
2120
- is highly recommended, as data contract tests may be subject to SQL injections or leak sensitive
2121
- information.
2056
+ key.
2057
+ To authenticate, requests must include the header 'x-api-key' with the correct API key.
2058
+ This is highly recommended, as data contract tests may be subject to SQL injections or leak
2059
+ sensitive information.
2060
+
2122
2061
  To connect to servers (such as a Snowflake data source), set the credentials as environment
2123
- variables as documented in https://cli.datacontract.com/#test
2062
+ variables as documented in
2063
+ https://cli.datacontract.com/#test
2064
+
2124
2065
  It is possible to run the API with extra arguments for `uvicorn.run()` as keyword arguments, e.g.:
2125
2066
  `datacontract api --port 1234 --root_path /datacontract`.
2126
2067
 
@@ -2129,9 +2070,12 @@ datacontract catalog --files "*.odcs.yaml"
2129
2070
  │ --host TEXT Bind socket to this host. Hint: For running in docker, set it │
2130
2071
  │ to 0.0.0.0 │
2131
2072
  │ [default: 127.0.0.1] │
2132
- │ --debug --no-debug Enable debug logging [default: no-debug]
2073
+ │ --debug --no-debug Enable debug logging
2133
2074
  │ --help Show this message and exit. │
2134
2075
  ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
2076
+
2077
+ Example: datacontract api --port 4242 --host 0.0.0.0
2078
+
2135
2079
 
2136
2080
  ```
2137
2081
 
@@ -2163,7 +2107,7 @@ Create a data contract based on the actual data. This is the fastest way to get
2163
2107
 
2164
2108
  1. Use an existing physical schema (e.g., SQL DDL) as a starting point to define your logical data model in the contract. Double check right after the import whether the actual data meets the imported logical data model. Just to be sure.
2165
2109
  ```bash
2166
- $ datacontract import --format sql --source ddl.sql
2110
+ $ datacontract import sql --source ddl.sql
2167
2111
  $ datacontract test
2168
2112
  ```
2169
2113
 
@@ -2204,10 +2148,10 @@ Create a data contract based on the requirements from use cases.
2204
2148
  into the consuming data products.
2205
2149
  ```bash
2206
2150
  # data provider
2207
- $ datacontract export --format dbt
2151
+ $ datacontract export dbt-models
2208
2152
  # data consumer
2209
- $ datacontract export --format dbt-sources
2210
- $ datacontract export --format dbt-staging-sql
2153
+ $ datacontract export dbt-sources
2154
+ $ datacontract export dbt-staging-sql
2211
2155
  ```
2212
2156
 
2213
2157
  4. Test that your data product implementation adheres to the contract.