datacontract-cli 0.10.15__tar.gz → 0.10.18__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.
- {datacontract_cli-0.10.15/datacontract_cli.egg-info → datacontract_cli-0.10.18}/PKG-INFO +117 -75
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/README.md +86 -44
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/breaking/breaking.py +3 -3
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/breaking/breaking_rules.py +4 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/cli.py +33 -9
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/data_contract.py +14 -10
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/fastjsonschema/check_jsonschema.py +15 -4
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/soda/check_soda_execute.py +13 -8
- datacontract_cli-0.10.18/datacontract/engines/soda/connections/databricks.py +29 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/dbml_converter.py +2 -2
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/dbt_converter.py +75 -43
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/exporter.py +7 -2
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/exporter_factory.py +52 -14
- datacontract_cli-0.10.18/datacontract/export/iceberg_converter.py +188 -0
- datacontract_cli-0.10.18/datacontract/export/markdown_converter.py +208 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/odcs_v3_exporter.py +49 -29
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/sodacl_converter.py +4 -3
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/sql_converter.py +1 -1
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/sql_type_converter.py +21 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/sqlalchemy_converter.py +3 -1
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/dbml_importer.py +1 -1
- datacontract_cli-0.10.18/datacontract/imports/dbt_importer.py +240 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/iceberg_importer.py +12 -1
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/odcs_v2_importer.py +1 -1
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/odcs_v3_importer.py +6 -1
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/sql_importer.py +1 -1
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/integration/datamesh_manager.py +14 -3
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/lint/resolve.py +32 -15
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/model/data_contract_specification.py +14 -6
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/model/run.py +1 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/templates/partials/model_field.html +1 -1
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18/datacontract_cli.egg-info}/PKG-INFO +117 -75
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract_cli.egg-info/SOURCES.txt +4 -2
- datacontract_cli-0.10.18/datacontract_cli.egg-info/requires.txt +81 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/pyproject.toml +30 -31
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_changelog.py +8 -8
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_dbt_models.py +6 -6
- datacontract_cli-0.10.18/tests/test_export_dbt_sources.py +149 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_dbt_staging_sql.py +6 -3
- datacontract_cli-0.10.18/tests/test_export_iceberg.py +254 -0
- datacontract_cli-0.10.18/tests/test_export_markdown.py +30 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_odcs_v3.py +7 -0
- datacontract_cli-0.10.18/tests/test_export_sodacl.py +91 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_sqlalchemy.py +18 -2
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_import_dbt.py +207 -2
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_import_iceberg.py +1 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_import_sql.py +2 -2
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_resolve.py +58 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_bigquery.py +14 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_examples_missing.py +3 -1
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_postgres.py +1 -1
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_quality.py +3 -3
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_sqlserver.py +7 -0
- datacontract_cli-0.10.15/datacontract/engines/soda/connections/databricks.py +0 -20
- datacontract_cli-0.10.15/datacontract/imports/dbt_importer.py +0 -94
- datacontract_cli-0.10.15/datacontract/integration/opentelemetry.py +0 -103
- datacontract_cli-0.10.15/datacontract_cli.egg-info/requires.txt +0 -81
- datacontract_cli-0.10.15/tests/test_export_dbt_sources.py +0 -74
- datacontract_cli-0.10.15/tests/test_export_sodacl.py +0 -96
- datacontract_cli-0.10.15/tests/test_integration_opentelemetry.py +0 -72
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/LICENSE +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/MANIFEST.in +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/__init__.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/catalog/catalog.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/__init__.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/datacontract/check_that_datacontract_file_exists.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/fastjsonschema/s3/s3_read_files.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/soda/__init__.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/bigquery.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/dask.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/duckdb.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/kafka.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/postgres.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/snowflake.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/sqlserver.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/engines/soda/connections/trino.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/__init__.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/avro_converter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/avro_idl_converter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/bigquery_converter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/csv_type_converter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/data_caterer_converter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/dcs_exporter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/go_converter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/great_expectations_converter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/html_export.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/jsonschema_converter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/odcs_v2_exporter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/pandas_type_converter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/protobuf_converter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/pydantic_converter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/rdf_converter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/spark_converter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/export/terraform_converter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/avro_importer.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/bigquery_importer.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/glue_importer.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/importer.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/importer_factory.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/jsonschema_importer.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/odcs_importer.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/parquet_importer.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/spark_importer.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/imports/unity_importer.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/init/download_datacontract_file.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/lint/files.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/lint/lint.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/lint/linters/__init__.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/lint/linters/description_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/lint/linters/example_model_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/lint/linters/field_pattern_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/lint/linters/field_reference_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/lint/linters/notice_period_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/lint/linters/quality_schema_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/lint/linters/valid_constraints_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/lint/resources.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/lint/schema.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/lint/urls.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/model/breaking_change.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/model/exceptions.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/model/odcs.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/py.typed +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/templates/datacontract.html +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/templates/index.html +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/templates/partials/datacontract_information.html +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/templates/partials/datacontract_servicelevels.html +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/templates/partials/datacontract_terms.html +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/templates/partials/definition.html +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/templates/partials/example.html +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/templates/partials/server.html +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/templates/style/output.css +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/web.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract_cli.egg-info/dependency_links.txt +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract_cli.egg-info/entry_points.txt +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract_cli.egg-info/top_level.txt +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/setup.cfg +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_breaking.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_catalog.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_cli.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_data_contract_specification.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_description_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_documentation_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_download_datacontract_file.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_example_model_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_avro.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_avro_idl.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_bigquery.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_complex_data_contract.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_custom_exporter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_data_caterer.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_dbml.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_go.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_great_expectations.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_html.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_jsonschema.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_odcs_v2.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_protobuf.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_pydantic.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_rdf.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_spark.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_sql.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_sql_query.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_export_terraform.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_field_constraint_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_field_pattern_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_field_reference_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_import_avro.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_import_bigquery.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_import_dbml.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_import_glue.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_import_jsonschema.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_import_odcs_v2.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_import_odcs_v3.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_import_parquet.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_import_spark.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_import_unity_file.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_integration_datameshmanager.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_lint.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_notice_period_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_quality_schema_linter.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_roundtrip_jsonschema.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_spec_fields_field.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_spec_ref.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_azure_parquet_remote.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_databricks.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_dataframe.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_delta.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_examples_csv.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_examples_formats_valid.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_examples_inline.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_examples_json.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_gcs_json_remote.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_kafka.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_kafka_remote.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_local_json.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_parquet.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_s3_csv.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_s3_delta.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_s3_json.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_s3_json_complex.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_s3_json_multiple_models.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_s3_json_remote.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_snowflake.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_test_trino.py +0 -0
- {datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/tests/test_web.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: datacontract-cli
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.18
|
|
4
4
|
Summary: The datacontract CLI is an open source command-line tool for working with Data Contracts. It uses data contract YAML files to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
|
|
5
5
|
Author-email: Jochen Christ <jochen.christ@innoq.com>, Stefan Negele <stefan.negele@innoq.com>, Simon Harrer <simon.harrer@innoq.com>
|
|
6
6
|
Project-URL: Homepage, https://cli.datacontract.com
|
|
@@ -11,72 +11,72 @@ Classifier: Operating System :: OS Independent
|
|
|
11
11
|
Requires-Python: >=3.10
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
|
-
Requires-Dist: typer<0.
|
|
15
|
-
Requires-Dist: pydantic<2.
|
|
14
|
+
Requires-Dist: typer<0.16,>=0.15.1
|
|
15
|
+
Requires-Dist: pydantic<2.11.0,>=2.8.2
|
|
16
16
|
Requires-Dist: pyyaml~=6.0.1
|
|
17
17
|
Requires-Dist: requests<2.33,>=2.31
|
|
18
|
-
Requires-Dist: fastapi==0.115.
|
|
19
|
-
Requires-Dist: uvicorn==0.
|
|
20
|
-
Requires-Dist: fastjsonschema<2.
|
|
21
|
-
Requires-Dist: fastparquet==2024.
|
|
22
|
-
Requires-Dist:
|
|
18
|
+
Requires-Dist: fastapi==0.115.6
|
|
19
|
+
Requires-Dist: uvicorn==0.34.0
|
|
20
|
+
Requires-Dist: fastjsonschema<2.22.0,>=2.19.1
|
|
21
|
+
Requires-Dist: fastparquet==2024.11.0
|
|
22
|
+
Requires-Dist: numpy<2.0.0,>=1.26.4
|
|
23
|
+
Requires-Dist: python-multipart==0.0.20
|
|
23
24
|
Requires-Dist: rich<13.10,>=13.7
|
|
24
25
|
Requires-Dist: simple-ddl-parser==1.7.1
|
|
25
26
|
Requires-Dist: duckdb==1.1.2
|
|
26
|
-
Requires-Dist: soda-core-duckdb<3.
|
|
27
|
+
Requires-Dist: soda-core-duckdb<3.4.0,>=3.3.20
|
|
27
28
|
Requires-Dist: setuptools>=60
|
|
28
29
|
Requires-Dist: python-dotenv~=1.0.0
|
|
29
30
|
Requires-Dist: rdflib==7.0.0
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-http~=1.16
|
|
32
|
-
Requires-Dist: boto3<1.35.69,>=1.34.41
|
|
31
|
+
Requires-Dist: boto3<1.35.98,>=1.34.41
|
|
33
32
|
Requires-Dist: jinja_partials>=0.2.1
|
|
34
33
|
Provides-Extra: avro
|
|
35
34
|
Requires-Dist: avro==1.12.0; extra == "avro"
|
|
36
35
|
Provides-Extra: bigquery
|
|
37
|
-
Requires-Dist: soda-core-bigquery<3.
|
|
36
|
+
Requires-Dist: soda-core-bigquery<3.4.0,>=3.3.20; extra == "bigquery"
|
|
38
37
|
Provides-Extra: databricks
|
|
39
|
-
Requires-Dist: soda-core-spark-df<3.
|
|
40
|
-
Requires-Dist:
|
|
41
|
-
Requires-Dist: databricks-
|
|
42
|
-
Requires-Dist:
|
|
38
|
+
Requires-Dist: soda-core-spark-df<3.4.0,>=3.3.20; extra == "databricks"
|
|
39
|
+
Requires-Dist: soda-core-spark[databricks]<3.4.0,>=3.3.20; extra == "databricks"
|
|
40
|
+
Requires-Dist: databricks-sql-connector<3.8.0,>=3.7.0; extra == "databricks"
|
|
41
|
+
Requires-Dist: databricks-sdk<0.41.0; extra == "databricks"
|
|
43
42
|
Provides-Extra: iceberg
|
|
44
|
-
Requires-Dist: pyiceberg==0.
|
|
43
|
+
Requires-Dist: pyiceberg==0.8.1; extra == "iceberg"
|
|
45
44
|
Provides-Extra: kafka
|
|
46
45
|
Requires-Dist: datacontract-cli[avro]; extra == "kafka"
|
|
47
|
-
Requires-Dist: soda-core-spark-df<3.
|
|
46
|
+
Requires-Dist: soda-core-spark-df<3.4.0,>=3.3.20; extra == "kafka"
|
|
48
47
|
Provides-Extra: postgres
|
|
49
|
-
Requires-Dist: soda-core-postgres<3.
|
|
48
|
+
Requires-Dist: soda-core-postgres<3.4.0,>=3.3.20; extra == "postgres"
|
|
50
49
|
Provides-Extra: s3
|
|
51
|
-
Requires-Dist: s3fs==2024.
|
|
50
|
+
Requires-Dist: s3fs==2024.12.0; extra == "s3"
|
|
51
|
+
Requires-Dist: aiobotocore<2.18.0,>=2.17.0; extra == "s3"
|
|
52
52
|
Provides-Extra: snowflake
|
|
53
53
|
Requires-Dist: snowflake-connector-python[pandas]<3.13,>=3.6; extra == "snowflake"
|
|
54
|
-
Requires-Dist: soda-core-snowflake<3.
|
|
54
|
+
Requires-Dist: soda-core-snowflake<3.4.0,>=3.3.20; extra == "snowflake"
|
|
55
55
|
Provides-Extra: sqlserver
|
|
56
|
-
Requires-Dist: soda-core-sqlserver<3.
|
|
56
|
+
Requires-Dist: soda-core-sqlserver<3.4.0,>=3.3.20; extra == "sqlserver"
|
|
57
57
|
Provides-Extra: trino
|
|
58
|
-
Requires-Dist: soda-core-trino<3.
|
|
58
|
+
Requires-Dist: soda-core-trino<3.4.0,>=3.3.20; extra == "trino"
|
|
59
59
|
Provides-Extra: dbt
|
|
60
60
|
Requires-Dist: dbt-core>=1.8.0; extra == "dbt"
|
|
61
61
|
Provides-Extra: dbml
|
|
62
62
|
Requires-Dist: pydbml>=1.1.1; extra == "dbml"
|
|
63
63
|
Provides-Extra: parquet
|
|
64
|
-
Requires-Dist: pyarrow>=
|
|
64
|
+
Requires-Dist: pyarrow>=18.1.0; extra == "parquet"
|
|
65
65
|
Provides-Extra: all
|
|
66
66
|
Requires-Dist: datacontract-cli[bigquery,databricks,dbml,dbt,iceberg,kafka,parquet,postgres,s3,snowflake,sqlserver,trino]; extra == "all"
|
|
67
67
|
Provides-Extra: dev
|
|
68
68
|
Requires-Dist: datacontract-cli[all]; extra == "dev"
|
|
69
|
-
Requires-Dist: httpx==0.
|
|
69
|
+
Requires-Dist: httpx==0.28.1; extra == "dev"
|
|
70
70
|
Requires-Dist: kafka-python; extra == "dev"
|
|
71
|
-
Requires-Dist: moto==5.0.
|
|
71
|
+
Requires-Dist: moto==5.0.26; extra == "dev"
|
|
72
72
|
Requires-Dist: pandas>=2.1.0; extra == "dev"
|
|
73
73
|
Requires-Dist: pre-commit<4.1.0,>=3.7.1; extra == "dev"
|
|
74
74
|
Requires-Dist: pytest; extra == "dev"
|
|
75
75
|
Requires-Dist: pytest-xdist; extra == "dev"
|
|
76
|
-
Requires-Dist: pymssql==2.3.
|
|
76
|
+
Requires-Dist: pymssql==2.3.2; extra == "dev"
|
|
77
77
|
Requires-Dist: ruff; extra == "dev"
|
|
78
|
-
Requires-Dist: testcontainers[kafka,minio,mssql,postgres]==4.
|
|
79
|
-
Requires-Dist: trino==0.
|
|
78
|
+
Requires-Dist: testcontainers[kafka,minio,mssql,postgres]==4.9.0; extra == "dev"
|
|
79
|
+
Requires-Dist: trino==0.331.0; extra == "dev"
|
|
80
80
|
|
|
81
81
|
# Data Contract CLI
|
|
82
82
|
|
|
@@ -105,7 +105,7 @@ This data contract contains all information to connect to S3 and check that the
|
|
|
105
105
|
|
|
106
106
|
Let's use [pip](https://pip.pypa.io/en/stable/getting-started/) to install the CLI (or use the [Docker image](#docker)),
|
|
107
107
|
```bash
|
|
108
|
-
$ python3 -m pip install datacontract-cli[all]
|
|
108
|
+
$ python3 -m pip install 'datacontract-cli[all]'
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
|
|
@@ -230,13 +230,13 @@ Choose the most appropriate installation method for your needs:
|
|
|
230
230
|
Python 3.10, 3.11, and 3.12 are supported. We recommend to use Python 3.11.
|
|
231
231
|
|
|
232
232
|
```bash
|
|
233
|
-
python3 -m pip install datacontract-cli[all]
|
|
233
|
+
python3 -m pip install 'datacontract-cli[all]'
|
|
234
234
|
```
|
|
235
235
|
|
|
236
236
|
### pipx
|
|
237
237
|
pipx installs into an isolated environment.
|
|
238
238
|
```bash
|
|
239
|
-
pipx install datacontract-cli[all]
|
|
239
|
+
pipx install 'datacontract-cli[all]'
|
|
240
240
|
```
|
|
241
241
|
|
|
242
242
|
### Docker
|
|
@@ -301,6 +301,7 @@ Commands
|
|
|
301
301
|
- [diff](#diff)
|
|
302
302
|
- [catalog](#catalog)
|
|
303
303
|
- [publish](#publish)
|
|
304
|
+
- [serve](#serve)
|
|
304
305
|
|
|
305
306
|
### init
|
|
306
307
|
|
|
@@ -365,9 +366,6 @@ Commands
|
|
|
365
366
|
│ [default: no-examples] │
|
|
366
367
|
│ --publish TEXT The url to publish the results after the test │
|
|
367
368
|
│ [default: None] │
|
|
368
|
-
│ --publish-to-opentelemetry --no-publish-to-opentelemetry Publish the results to opentelemetry. Use environment │
|
|
369
|
-
│ variables to configure the OTLP endpoint, headers, etc. │
|
|
370
|
-
│ [default: no-publish-to-opentelemetry] │
|
|
371
369
|
│ --logs --no-logs Print logs [default: no-logs] │
|
|
372
370
|
│ --help Show this message and exit. │
|
|
373
371
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
@@ -592,7 +590,6 @@ datacontract.yaml
|
|
|
592
590
|
servers:
|
|
593
591
|
production:
|
|
594
592
|
type: databricks
|
|
595
|
-
host: dbc-abcdefgh-1234.cloud.databricks.com
|
|
596
593
|
catalog: acme_catalog_prod
|
|
597
594
|
schema: orders_latest
|
|
598
595
|
models:
|
|
@@ -603,10 +600,11 @@ models:
|
|
|
603
600
|
|
|
604
601
|
#### Environment Variables
|
|
605
602
|
|
|
606
|
-
| Environment Variable
|
|
607
|
-
|
|
608
|
-
| `DATACONTRACT_DATABRICKS_TOKEN`
|
|
609
|
-
| `DATACONTRACT_DATABRICKS_HTTP_PATH`
|
|
603
|
+
| Environment Variable | Example | Description |
|
|
604
|
+
|-------------------------------------------|--------------------------------------|-----------------------------------------------------------|
|
|
605
|
+
| `DATACONTRACT_DATABRICKS_TOKEN` | `dapia00000000000000000000000000000` | The personal access token to authenticate |
|
|
606
|
+
| `DATACONTRACT_DATABRICKS_HTTP_PATH` | `/sql/1.0/warehouses/b053a3ffffffff` | The HTTP path to the SQL warehouse or compute cluster |
|
|
607
|
+
| `DATACONTRACT_DATABRICKS_SERVER_HOSTNAME` | `dbc-abcdefgh-1234.cloud.databricks.com` | The host name of the SQL warehouse or compute cluster |
|
|
610
608
|
|
|
611
609
|
|
|
612
610
|
### Databricks (programmatic)
|
|
@@ -841,7 +839,7 @@ models:
|
|
|
841
839
|
│ t-staging-sql|odcs|odcs_v2|odcs_v3|rdf|avro|protobuf │
|
|
842
840
|
│ |great-expectations|terraform|avro-idl|sql|sql-query │
|
|
843
841
|
│ |html|go|bigquery|dbml|spark|sqlalchemy|data-caterer │
|
|
844
|
-
│ |dcs]
|
|
842
|
+
│ |dcs|markdown|iceberg] │
|
|
845
843
|
│ --output PATH Specify the file path where the exported data will be │
|
|
846
844
|
│ saved. If no path is provided, the output will be │
|
|
847
845
|
│ printed to stdout. │
|
|
@@ -902,6 +900,8 @@ Available export options:
|
|
|
902
900
|
| `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
|
|
903
901
|
| `data-caterer` | Export to Data Caterer in YAML format | ✅ |
|
|
904
902
|
| `dcs` | Export to Data Contract Specification in YAML format | ✅ |
|
|
903
|
+
| `markdown` | Export to Markdown | ✅ |
|
|
904
|
+
| `iceberg` | Export to an Iceberg JSON Schema Definition | partial |
|
|
905
905
|
| Missing something? | Please create an issue on GitHub | TBD |
|
|
906
906
|
|
|
907
907
|
|
|
@@ -1025,6 +1025,63 @@ models:
|
|
|
1025
1025
|
- **avroLogicalType**: Specifies the logical type of the field in Avro. In this example, it is `local-timestamp-micros`.
|
|
1026
1026
|
- **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`.
|
|
1027
1027
|
|
|
1028
|
+
#### Iceberg
|
|
1029
|
+
|
|
1030
|
+
Exports to an [Iceberg Table Json Schema Definition](https://iceberg.apache.org/spec/#appendix-c-json-serialization).
|
|
1031
|
+
|
|
1032
|
+
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
|
|
1033
|
+
to limit your contract export to a single model.
|
|
1034
|
+
|
|
1035
|
+
```bash
|
|
1036
|
+
$ datacontract export --format iceberg --model orders https://datacontract.com/examples/orders-latest/datacontract.yaml --output /tmp/orders_iceberg.json
|
|
1037
|
+
|
|
1038
|
+
$ cat /tmp/orders_iceberg.json | jq '.'
|
|
1039
|
+
{
|
|
1040
|
+
"type": "struct",
|
|
1041
|
+
"fields": [
|
|
1042
|
+
{
|
|
1043
|
+
"id": 1,
|
|
1044
|
+
"name": "order_id",
|
|
1045
|
+
"type": "string",
|
|
1046
|
+
"required": true
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
"id": 2,
|
|
1050
|
+
"name": "order_timestamp",
|
|
1051
|
+
"type": "timestamptz",
|
|
1052
|
+
"required": true
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
"id": 3,
|
|
1056
|
+
"name": "order_total",
|
|
1057
|
+
"type": "long",
|
|
1058
|
+
"required": true
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
"id": 4,
|
|
1062
|
+
"name": "customer_id",
|
|
1063
|
+
"type": "string",
|
|
1064
|
+
"required": false
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
"id": 5,
|
|
1068
|
+
"name": "customer_email_address",
|
|
1069
|
+
"type": "string",
|
|
1070
|
+
"required": true
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
"id": 6,
|
|
1074
|
+
"name": "processed_timestamp",
|
|
1075
|
+
"type": "timestamptz",
|
|
1076
|
+
"required": true
|
|
1077
|
+
}
|
|
1078
|
+
],
|
|
1079
|
+
"schema-id": 0,
|
|
1080
|
+
"identifier-field-ids": [
|
|
1081
|
+
1
|
|
1082
|
+
]
|
|
1083
|
+
}
|
|
1084
|
+
```
|
|
1028
1085
|
|
|
1029
1086
|
### import
|
|
1030
1087
|
|
|
@@ -1331,13 +1388,28 @@ datacontract catalog --files "*.odcs.yaml"
|
|
|
1331
1388
|
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
1332
1389
|
```
|
|
1333
1390
|
|
|
1391
|
+
### Serve
|
|
1392
|
+
|
|
1393
|
+
```
|
|
1394
|
+
|
|
1395
|
+
Usage: datacontract serve [OPTIONS]
|
|
1396
|
+
|
|
1397
|
+
Start the datacontract web server.
|
|
1398
|
+
|
|
1399
|
+
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
1400
|
+
│ --port INTEGER Bind socket to this port. [default: 4242] │
|
|
1401
|
+
│ --host TEXT Bind socket to this host. [default: 127.0.0.1] │
|
|
1402
|
+
│ --help Show this message and exit. │
|
|
1403
|
+
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
1404
|
+
|
|
1405
|
+
```
|
|
1406
|
+
|
|
1334
1407
|
## Integrations
|
|
1335
1408
|
|
|
1336
1409
|
| Integration | Option | Description |
|
|
1337
1410
|
|-----------------------|------------------------------|---------------------------------------------------------------------------------------------------------------|
|
|
1338
1411
|
| Data Mesh Manager | `--publish` | Push full results to the [Data Mesh Manager API](https://api.datamesh-manager.com/swagger/index.html) |
|
|
1339
1412
|
| Data Contract Manager | `--publish` | Push full results to the [Data Contract Manager API](https://api.datacontract-manager.com/swagger/index.html) |
|
|
1340
|
-
| OpenTelemetry | `--publish-to-opentelemetry` | Push result as gauge metrics |
|
|
1341
1413
|
|
|
1342
1414
|
### Integration with Data Mesh Manager
|
|
1343
1415
|
|
|
@@ -1351,36 +1423,6 @@ $ datacontract test https://demo.datamesh-manager.com/demo279750347121/datacontr
|
|
|
1351
1423
|
--publish https://api.datamesh-manager.com/api/test-results
|
|
1352
1424
|
```
|
|
1353
1425
|
|
|
1354
|
-
### Integration with OpenTelemetry
|
|
1355
|
-
|
|
1356
|
-
If you use OpenTelemetry, you can use the data contract URL and append the `--publish-to-opentelemetry` option to send the test results to your OLTP-compatible instance, e.g., Prometheus.
|
|
1357
|
-
|
|
1358
|
-
The metric name is "datacontract.cli.test.result" and it uses the following encoding for the result:
|
|
1359
|
-
|
|
1360
|
-
| datacontract.cli.test.result | Description |
|
|
1361
|
-
|------------------------------|---------------------------------------|
|
|
1362
|
-
| 0 | test run passed, no warnings |
|
|
1363
|
-
| 1 | test run has warnings |
|
|
1364
|
-
| 2 | test run failed |
|
|
1365
|
-
| 3 | test run not possible due to an error |
|
|
1366
|
-
| 4 | test status unknown |
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
```bash
|
|
1370
|
-
# Fetch current data contract, execute tests on production, and publish result to open telemetry
|
|
1371
|
-
$ EXPORT OTEL_SERVICE_NAME=datacontract-cli
|
|
1372
|
-
$ EXPORT OTEL_EXPORTER_OTLP_ENDPOINT=https://YOUR_ID.apm.westeurope.azure.elastic-cloud.com:443
|
|
1373
|
-
$ EXPORT OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer%20secret # Optional, when using SaaS Products
|
|
1374
|
-
$ EXPORT OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf # Optional, default is http/protobuf - use value grpc to use the gRPC protocol instead
|
|
1375
|
-
# Send to OpenTelemetry
|
|
1376
|
-
$ datacontract test https://demo.datamesh-manager.com/demo279750347121/datacontracts/4df9d6ee-e55d-4088-9598-b635b2fdcbbc/datacontract.yaml --server production --publish-to-opentelemetry
|
|
1377
|
-
```
|
|
1378
|
-
|
|
1379
|
-
Current limitations:
|
|
1380
|
-
- currently, only ConsoleExporter and OTLP Exporter
|
|
1381
|
-
- Metrics only, no logs yet (but loosely planned)
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
1426
|
## Best Practices
|
|
1385
1427
|
|
|
1386
1428
|
We share best practices in using the Data Contract CLI.
|
|
@@ -1412,7 +1454,7 @@ Create a data contract based on the actual data. This is the fastest way to get
|
|
|
1412
1454
|
$ datacontract lint
|
|
1413
1455
|
```
|
|
1414
1456
|
|
|
1415
|
-
5. Set up a CI pipeline that executes daily
|
|
1457
|
+
5. Set up a CI pipeline that executes daily for continuous quality checks. You can also report the test results to tools like [Data Mesh Manager](https://datamesh-manager.com)
|
|
1416
1458
|
```bash
|
|
1417
1459
|
$ datacontract test --publish https://api.datamesh-manager.com/api/test-results
|
|
1418
1460
|
```
|
|
@@ -25,7 +25,7 @@ This data contract contains all information to connect to S3 and check that the
|
|
|
25
25
|
|
|
26
26
|
Let's use [pip](https://pip.pypa.io/en/stable/getting-started/) to install the CLI (or use the [Docker image](#docker)),
|
|
27
27
|
```bash
|
|
28
|
-
$ python3 -m pip install datacontract-cli[all]
|
|
28
|
+
$ python3 -m pip install 'datacontract-cli[all]'
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
|
|
@@ -150,13 +150,13 @@ Choose the most appropriate installation method for your needs:
|
|
|
150
150
|
Python 3.10, 3.11, and 3.12 are supported. We recommend to use Python 3.11.
|
|
151
151
|
|
|
152
152
|
```bash
|
|
153
|
-
python3 -m pip install datacontract-cli[all]
|
|
153
|
+
python3 -m pip install 'datacontract-cli[all]'
|
|
154
154
|
```
|
|
155
155
|
|
|
156
156
|
### pipx
|
|
157
157
|
pipx installs into an isolated environment.
|
|
158
158
|
```bash
|
|
159
|
-
pipx install datacontract-cli[all]
|
|
159
|
+
pipx install 'datacontract-cli[all]'
|
|
160
160
|
```
|
|
161
161
|
|
|
162
162
|
### Docker
|
|
@@ -221,6 +221,7 @@ Commands
|
|
|
221
221
|
- [diff](#diff)
|
|
222
222
|
- [catalog](#catalog)
|
|
223
223
|
- [publish](#publish)
|
|
224
|
+
- [serve](#serve)
|
|
224
225
|
|
|
225
226
|
### init
|
|
226
227
|
|
|
@@ -285,9 +286,6 @@ Commands
|
|
|
285
286
|
│ [default: no-examples] │
|
|
286
287
|
│ --publish TEXT The url to publish the results after the test │
|
|
287
288
|
│ [default: None] │
|
|
288
|
-
│ --publish-to-opentelemetry --no-publish-to-opentelemetry Publish the results to opentelemetry. Use environment │
|
|
289
|
-
│ variables to configure the OTLP endpoint, headers, etc. │
|
|
290
|
-
│ [default: no-publish-to-opentelemetry] │
|
|
291
289
|
│ --logs --no-logs Print logs [default: no-logs] │
|
|
292
290
|
│ --help Show this message and exit. │
|
|
293
291
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
@@ -512,7 +510,6 @@ datacontract.yaml
|
|
|
512
510
|
servers:
|
|
513
511
|
production:
|
|
514
512
|
type: databricks
|
|
515
|
-
host: dbc-abcdefgh-1234.cloud.databricks.com
|
|
516
513
|
catalog: acme_catalog_prod
|
|
517
514
|
schema: orders_latest
|
|
518
515
|
models:
|
|
@@ -523,10 +520,11 @@ models:
|
|
|
523
520
|
|
|
524
521
|
#### Environment Variables
|
|
525
522
|
|
|
526
|
-
| Environment Variable
|
|
527
|
-
|
|
528
|
-
| `DATACONTRACT_DATABRICKS_TOKEN`
|
|
529
|
-
| `DATACONTRACT_DATABRICKS_HTTP_PATH`
|
|
523
|
+
| Environment Variable | Example | Description |
|
|
524
|
+
|-------------------------------------------|--------------------------------------|-----------------------------------------------------------|
|
|
525
|
+
| `DATACONTRACT_DATABRICKS_TOKEN` | `dapia00000000000000000000000000000` | The personal access token to authenticate |
|
|
526
|
+
| `DATACONTRACT_DATABRICKS_HTTP_PATH` | `/sql/1.0/warehouses/b053a3ffffffff` | The HTTP path to the SQL warehouse or compute cluster |
|
|
527
|
+
| `DATACONTRACT_DATABRICKS_SERVER_HOSTNAME` | `dbc-abcdefgh-1234.cloud.databricks.com` | The host name of the SQL warehouse or compute cluster |
|
|
530
528
|
|
|
531
529
|
|
|
532
530
|
### Databricks (programmatic)
|
|
@@ -761,7 +759,7 @@ models:
|
|
|
761
759
|
│ t-staging-sql|odcs|odcs_v2|odcs_v3|rdf|avro|protobuf │
|
|
762
760
|
│ |great-expectations|terraform|avro-idl|sql|sql-query │
|
|
763
761
|
│ |html|go|bigquery|dbml|spark|sqlalchemy|data-caterer │
|
|
764
|
-
│ |dcs]
|
|
762
|
+
│ |dcs|markdown|iceberg] │
|
|
765
763
|
│ --output PATH Specify the file path where the exported data will be │
|
|
766
764
|
│ saved. If no path is provided, the output will be │
|
|
767
765
|
│ printed to stdout. │
|
|
@@ -822,6 +820,8 @@ Available export options:
|
|
|
822
820
|
| `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
|
|
823
821
|
| `data-caterer` | Export to Data Caterer in YAML format | ✅ |
|
|
824
822
|
| `dcs` | Export to Data Contract Specification in YAML format | ✅ |
|
|
823
|
+
| `markdown` | Export to Markdown | ✅ |
|
|
824
|
+
| `iceberg` | Export to an Iceberg JSON Schema Definition | partial |
|
|
825
825
|
| Missing something? | Please create an issue on GitHub | TBD |
|
|
826
826
|
|
|
827
827
|
|
|
@@ -945,6 +945,63 @@ models:
|
|
|
945
945
|
- **avroLogicalType**: Specifies the logical type of the field in Avro. In this example, it is `local-timestamp-micros`.
|
|
946
946
|
- **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`.
|
|
947
947
|
|
|
948
|
+
#### Iceberg
|
|
949
|
+
|
|
950
|
+
Exports to an [Iceberg Table Json Schema Definition](https://iceberg.apache.org/spec/#appendix-c-json-serialization).
|
|
951
|
+
|
|
952
|
+
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
|
|
953
|
+
to limit your contract export to a single model.
|
|
954
|
+
|
|
955
|
+
```bash
|
|
956
|
+
$ datacontract export --format iceberg --model orders https://datacontract.com/examples/orders-latest/datacontract.yaml --output /tmp/orders_iceberg.json
|
|
957
|
+
|
|
958
|
+
$ cat /tmp/orders_iceberg.json | jq '.'
|
|
959
|
+
{
|
|
960
|
+
"type": "struct",
|
|
961
|
+
"fields": [
|
|
962
|
+
{
|
|
963
|
+
"id": 1,
|
|
964
|
+
"name": "order_id",
|
|
965
|
+
"type": "string",
|
|
966
|
+
"required": true
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"id": 2,
|
|
970
|
+
"name": "order_timestamp",
|
|
971
|
+
"type": "timestamptz",
|
|
972
|
+
"required": true
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
"id": 3,
|
|
976
|
+
"name": "order_total",
|
|
977
|
+
"type": "long",
|
|
978
|
+
"required": true
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
"id": 4,
|
|
982
|
+
"name": "customer_id",
|
|
983
|
+
"type": "string",
|
|
984
|
+
"required": false
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"id": 5,
|
|
988
|
+
"name": "customer_email_address",
|
|
989
|
+
"type": "string",
|
|
990
|
+
"required": true
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
"id": 6,
|
|
994
|
+
"name": "processed_timestamp",
|
|
995
|
+
"type": "timestamptz",
|
|
996
|
+
"required": true
|
|
997
|
+
}
|
|
998
|
+
],
|
|
999
|
+
"schema-id": 0,
|
|
1000
|
+
"identifier-field-ids": [
|
|
1001
|
+
1
|
|
1002
|
+
]
|
|
1003
|
+
}
|
|
1004
|
+
```
|
|
948
1005
|
|
|
949
1006
|
### import
|
|
950
1007
|
|
|
@@ -1251,13 +1308,28 @@ datacontract catalog --files "*.odcs.yaml"
|
|
|
1251
1308
|
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
1252
1309
|
```
|
|
1253
1310
|
|
|
1311
|
+
### Serve
|
|
1312
|
+
|
|
1313
|
+
```
|
|
1314
|
+
|
|
1315
|
+
Usage: datacontract serve [OPTIONS]
|
|
1316
|
+
|
|
1317
|
+
Start the datacontract web server.
|
|
1318
|
+
|
|
1319
|
+
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
1320
|
+
│ --port INTEGER Bind socket to this port. [default: 4242] │
|
|
1321
|
+
│ --host TEXT Bind socket to this host. [default: 127.0.0.1] │
|
|
1322
|
+
│ --help Show this message and exit. │
|
|
1323
|
+
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
1324
|
+
|
|
1325
|
+
```
|
|
1326
|
+
|
|
1254
1327
|
## Integrations
|
|
1255
1328
|
|
|
1256
1329
|
| Integration | Option | Description |
|
|
1257
1330
|
|-----------------------|------------------------------|---------------------------------------------------------------------------------------------------------------|
|
|
1258
1331
|
| Data Mesh Manager | `--publish` | Push full results to the [Data Mesh Manager API](https://api.datamesh-manager.com/swagger/index.html) |
|
|
1259
1332
|
| Data Contract Manager | `--publish` | Push full results to the [Data Contract Manager API](https://api.datacontract-manager.com/swagger/index.html) |
|
|
1260
|
-
| OpenTelemetry | `--publish-to-opentelemetry` | Push result as gauge metrics |
|
|
1261
1333
|
|
|
1262
1334
|
### Integration with Data Mesh Manager
|
|
1263
1335
|
|
|
@@ -1271,36 +1343,6 @@ $ datacontract test https://demo.datamesh-manager.com/demo279750347121/datacontr
|
|
|
1271
1343
|
--publish https://api.datamesh-manager.com/api/test-results
|
|
1272
1344
|
```
|
|
1273
1345
|
|
|
1274
|
-
### Integration with OpenTelemetry
|
|
1275
|
-
|
|
1276
|
-
If you use OpenTelemetry, you can use the data contract URL and append the `--publish-to-opentelemetry` option to send the test results to your OLTP-compatible instance, e.g., Prometheus.
|
|
1277
|
-
|
|
1278
|
-
The metric name is "datacontract.cli.test.result" and it uses the following encoding for the result:
|
|
1279
|
-
|
|
1280
|
-
| datacontract.cli.test.result | Description |
|
|
1281
|
-
|------------------------------|---------------------------------------|
|
|
1282
|
-
| 0 | test run passed, no warnings |
|
|
1283
|
-
| 1 | test run has warnings |
|
|
1284
|
-
| 2 | test run failed |
|
|
1285
|
-
| 3 | test run not possible due to an error |
|
|
1286
|
-
| 4 | test status unknown |
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
```bash
|
|
1290
|
-
# Fetch current data contract, execute tests on production, and publish result to open telemetry
|
|
1291
|
-
$ EXPORT OTEL_SERVICE_NAME=datacontract-cli
|
|
1292
|
-
$ EXPORT OTEL_EXPORTER_OTLP_ENDPOINT=https://YOUR_ID.apm.westeurope.azure.elastic-cloud.com:443
|
|
1293
|
-
$ EXPORT OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer%20secret # Optional, when using SaaS Products
|
|
1294
|
-
$ EXPORT OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf # Optional, default is http/protobuf - use value grpc to use the gRPC protocol instead
|
|
1295
|
-
# Send to OpenTelemetry
|
|
1296
|
-
$ datacontract test https://demo.datamesh-manager.com/demo279750347121/datacontracts/4df9d6ee-e55d-4088-9598-b635b2fdcbbc/datacontract.yaml --server production --publish-to-opentelemetry
|
|
1297
|
-
```
|
|
1298
|
-
|
|
1299
|
-
Current limitations:
|
|
1300
|
-
- currently, only ConsoleExporter and OTLP Exporter
|
|
1301
|
-
- Metrics only, no logs yet (but loosely planned)
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
1346
|
## Best Practices
|
|
1305
1347
|
|
|
1306
1348
|
We share best practices in using the Data Contract CLI.
|
|
@@ -1332,7 +1374,7 @@ Create a data contract based on the actual data. This is the fastest way to get
|
|
|
1332
1374
|
$ datacontract lint
|
|
1333
1375
|
```
|
|
1334
1376
|
|
|
1335
|
-
5. Set up a CI pipeline that executes daily
|
|
1377
|
+
5. Set up a CI pipeline that executes daily for continuous quality checks. You can also report the test results to tools like [Data Mesh Manager](https://datamesh-manager.com)
|
|
1336
1378
|
```bash
|
|
1337
1379
|
$ datacontract test --publish https://api.datamesh-manager.com/api/test-results
|
|
1338
1380
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from datacontract.breaking.breaking_rules import BreakingRules
|
|
2
2
|
from datacontract.model.breaking_change import BreakingChange, Location, Severity
|
|
3
|
-
from datacontract.model.data_contract_specification import Contact, Field, Info, Model,
|
|
3
|
+
from datacontract.model.data_contract_specification import Contact, DeprecatedQuality, Field, Info, Model, Terms
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
def info_breaking_changes(
|
|
@@ -216,8 +216,8 @@ def terms_breaking_changes(
|
|
|
216
216
|
|
|
217
217
|
|
|
218
218
|
def quality_breaking_changes(
|
|
219
|
-
old_quality:
|
|
220
|
-
new_quality:
|
|
219
|
+
old_quality: DeprecatedQuality,
|
|
220
|
+
new_quality: DeprecatedQuality,
|
|
221
221
|
new_path: str,
|
|
222
222
|
include_severities: [Severity],
|
|
223
223
|
) -> list[BreakingChange]:
|
{datacontract_cli-0.10.15 → datacontract_cli-0.10.18}/datacontract/breaking/breaking_rules.py
RENAMED
|
@@ -42,6 +42,10 @@ class BreakingRules:
|
|
|
42
42
|
field_primary_removed = Severity.WARNING
|
|
43
43
|
field_primary_updated = Severity.WARNING
|
|
44
44
|
|
|
45
|
+
field_primary_key_added = Severity.WARNING
|
|
46
|
+
field_primary_key_removed = Severity.WARNING
|
|
47
|
+
field_primary_key_updated = Severity.WARNING
|
|
48
|
+
|
|
45
49
|
field_references_added = Severity.WARNING
|
|
46
50
|
field_references_removed = Severity.WARNING
|
|
47
51
|
field_references_updated = Severity.WARNING
|