datacontract-cli 0.10.13__tar.gz → 0.10.14__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of datacontract-cli might be problematic. Click here for more details.
- {datacontract_cli-0.10.13/datacontract_cli.egg-info → datacontract_cli-0.10.14}/PKG-INFO +89 -51
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/README.md +74 -38
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/cli.py +5 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/data_contract.py +9 -1
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/kafka.py +26 -5
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/avro_converter.py +8 -1
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/avro_idl_converter.py +1 -0
- datacontract_cli-0.10.14/datacontract/export/dcs_exporter.py +6 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/exporter.py +4 -1
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/exporter_factory.py +13 -1
- datacontract_cli-0.10.13/datacontract/export/odcs_converter.py → datacontract_cli-0.10.14/datacontract/export/odcs_v2_exporter.py +4 -4
- datacontract_cli-0.10.14/datacontract/export/odcs_v3_exporter.py +294 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/sodacl_converter.py +82 -2
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/spark_converter.py +3 -1
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/sql_type_converter.py +55 -11
- datacontract_cli-0.10.14/datacontract/imports/iceberg_importer.py +162 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/imports/importer.py +1 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/imports/importer_factory.py +5 -0
- datacontract_cli-0.10.14/datacontract/imports/odcs_importer.py +57 -0
- datacontract_cli-0.10.13/datacontract/imports/odcs_importer.py → datacontract_cli-0.10.14/datacontract/imports/odcs_v2_importer.py +5 -28
- datacontract_cli-0.10.14/datacontract/imports/odcs_v3_importer.py +309 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/integration/datamesh_manager.py +1 -1
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/lint/resolve.py +14 -9
- datacontract_cli-0.10.14/datacontract/lint/resources.py +21 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/lint/urls.py +4 -2
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/model/data_contract_specification.py +72 -8
- datacontract_cli-0.10.14/datacontract/model/odcs.py +11 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14/datacontract_cli.egg-info}/PKG-INFO +89 -51
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract_cli.egg-info/SOURCES.txt +14 -4
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract_cli.egg-info/requires.txt +15 -12
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/pyproject.toml +18 -14
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_avro.py +11 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_custom_exporter.py +2 -2
- datacontract_cli-0.10.13/tests/test_export_odcs.py → datacontract_cli-0.10.14/tests/test_export_odcs_v2.py +4 -5
- datacontract_cli-0.10.14/tests/test_export_odcs_v3.py +114 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_sodacl.py +24 -13
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_import_dbt.py +10 -2
- datacontract_cli-0.10.14/tests/test_import_iceberg.py +145 -0
- datacontract_cli-0.10.14/tests/test_import_odcs_v2.py +50 -0
- datacontract_cli-0.10.13/tests/test_import_odcs.py → datacontract_cli-0.10.14/tests/test_import_odcs_v3.py +5 -5
- datacontract_cli-0.10.14/tests/test_integration_datameshmanager.py +27 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_parquet.py +7 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_postgres.py +17 -1
- datacontract_cli-0.10.14/tests/test_test_quality.py +94 -0
- datacontract_cli-0.10.13/datacontract/engines/datacontract/check_that_datacontract_str_is_valid.py +0 -48
- datacontract_cli-0.10.13/tests/test_integration_datameshmanager.py +0 -21
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/LICENSE +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/MANIFEST.in +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/__init__.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/breaking/breaking.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/breaking/breaking_rules.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/catalog/catalog.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/__init__.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/datacontract/check_that_datacontract_file_exists.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/fastjsonschema/check_jsonschema.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/fastjsonschema/s3/s3_read_files.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/soda/__init__.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/soda/check_soda_execute.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/bigquery.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/dask.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/databricks.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/duckdb.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/postgres.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/snowflake.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/sqlserver.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/trino.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/__init__.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/bigquery_converter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/csv_type_converter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/data_caterer_converter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/dbml_converter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/dbt_converter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/go_converter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/great_expectations_converter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/html_export.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/jsonschema_converter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/protobuf_converter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/pydantic_converter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/rdf_converter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/sql_converter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/sqlalchemy_converter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/export/terraform_converter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/imports/avro_importer.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/imports/bigquery_importer.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/imports/dbml_importer.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/imports/dbt_importer.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/imports/glue_importer.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/imports/jsonschema_importer.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/imports/spark_importer.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/imports/sql_importer.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/imports/unity_importer.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/init/download_datacontract_file.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/integration/opentelemetry.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/lint/files.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/lint/lint.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/lint/linters/__init__.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/lint/linters/description_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/lint/linters/example_model_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/lint/linters/field_pattern_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/lint/linters/field_reference_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/lint/linters/notice_period_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/lint/linters/quality_schema_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/lint/linters/valid_constraints_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/lint/schema.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/model/breaking_change.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/model/exceptions.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/model/run.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/py.typed +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/templates/datacontract.html +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/templates/index.html +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/templates/partials/datacontract_information.html +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/templates/partials/datacontract_servicelevels.html +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/templates/partials/datacontract_terms.html +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/templates/partials/definition.html +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/templates/partials/example.html +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/templates/partials/model_field.html +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/templates/partials/server.html +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/templates/style/output.css +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/web.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract_cli.egg-info/dependency_links.txt +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract_cli.egg-info/entry_points.txt +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract_cli.egg-info/top_level.txt +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/setup.cfg +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_breaking.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_catalog.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_changelog.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_cli.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_description_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_documentation_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_download_datacontract_file.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_example_model_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_avro_idl.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_bigquery.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_complex_data_contract.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_data_caterer.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_dbml.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_dbt_models.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_dbt_sources.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_dbt_staging_sql.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_go.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_great_expectations.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_html.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_jsonschema.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_protobuf.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_pydantic.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_rdf.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_spark.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_sql.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_sql_query.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_sqlalchemy.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_export_terraform.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_field_constraint_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_field_pattern_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_field_reference_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_import_avro.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_import_bigquery.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_import_dbml.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_import_glue.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_import_jsonschema.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_import_spark.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_import_sql.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_import_unity_file.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_integration_opentelemetry.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_lint.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_notice_period_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_quality_schema_linter.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_resolve.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_roundtrip_jsonschema.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_spec_fields_field.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_spec_ref.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_azure_parquet_remote.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_bigquery.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_databricks.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_dataframe.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_delta.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_examples_csv.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_examples_formats_valid.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_examples_inline.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_examples_json.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_examples_missing.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_gcs_json_remote.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_kafka.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_kafka_remote.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_local_json.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_s3_csv.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_s3_delta.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_s3_json.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_s3_json_complex.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_s3_json_multiple_models.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_s3_json_remote.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_snowflake.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_sqlserver.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_test_trino.py +0 -0
- {datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/tests/test_web.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: datacontract-cli
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.14
|
|
4
4
|
Summary: The datacontract CLI is an open source command-line tool for working with Data Contracts. It uses data contract YAML files to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
|
|
5
5
|
Author-email: Jochen Christ <jochen.christ@innoq.com>, Stefan Negele <stefan.negele@innoq.com>, Simon Harrer <simon.harrer@innoq.com>
|
|
6
6
|
Project-URL: Homepage, https://cli.datacontract.com
|
|
@@ -15,21 +15,21 @@ Requires-Dist: typer<0.13,>=0.12
|
|
|
15
15
|
Requires-Dist: pydantic<2.10.0,>=2.8.2
|
|
16
16
|
Requires-Dist: pyyaml~=6.0.1
|
|
17
17
|
Requires-Dist: requests<2.33,>=2.31
|
|
18
|
-
Requires-Dist: fastapi==0.
|
|
18
|
+
Requires-Dist: fastapi==0.115.2
|
|
19
19
|
Requires-Dist: uvicorn==0.30.6
|
|
20
20
|
Requires-Dist: fastjsonschema<2.21.0,>=2.19.1
|
|
21
21
|
Requires-Dist: fastparquet==2024.5.0
|
|
22
|
-
Requires-Dist: python-multipart==0.0.
|
|
23
|
-
Requires-Dist: rich<13.
|
|
24
|
-
Requires-Dist: simple-ddl-parser==1.
|
|
25
|
-
Requires-Dist: duckdb==1.
|
|
22
|
+
Requires-Dist: python-multipart==0.0.12
|
|
23
|
+
Requires-Dist: rich<13.10,>=13.7
|
|
24
|
+
Requires-Dist: simple-ddl-parser==1.7.1
|
|
25
|
+
Requires-Dist: duckdb==1.1.2
|
|
26
26
|
Requires-Dist: soda-core-duckdb<3.4.0,>=3.3.1
|
|
27
27
|
Requires-Dist: setuptools>=60
|
|
28
28
|
Requires-Dist: python-dotenv~=1.0.0
|
|
29
29
|
Requires-Dist: rdflib==7.0.0
|
|
30
30
|
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc~=1.16
|
|
31
31
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http~=1.16
|
|
32
|
-
Requires-Dist: boto3<1.35.
|
|
32
|
+
Requires-Dist: boto3<1.35.45,>=1.34.41
|
|
33
33
|
Requires-Dist: jinja_partials>=0.2.1
|
|
34
34
|
Provides-Extra: avro
|
|
35
35
|
Requires-Dist: avro==1.12.0; extra == "avro"
|
|
@@ -37,9 +37,11 @@ Provides-Extra: bigquery
|
|
|
37
37
|
Requires-Dist: soda-core-bigquery<3.4.0,>=3.3.1; extra == "bigquery"
|
|
38
38
|
Provides-Extra: databricks
|
|
39
39
|
Requires-Dist: soda-core-spark-df<3.4.0,>=3.3.1; extra == "databricks"
|
|
40
|
-
Requires-Dist: databricks-sql-connector<3.
|
|
41
|
-
Requires-Dist: databricks-sdk<0.
|
|
40
|
+
Requires-Dist: databricks-sql-connector<3.6.0,>=3.1.2; extra == "databricks"
|
|
41
|
+
Requires-Dist: databricks-sdk<0.36.0,>=0.32.0; extra == "databricks"
|
|
42
42
|
Requires-Dist: soda-core-spark[databricks]<3.4.0,>=3.3.1; extra == "databricks"
|
|
43
|
+
Provides-Extra: iceberg
|
|
44
|
+
Requires-Dist: pyiceberg==0.7.1; extra == "iceberg"
|
|
43
45
|
Provides-Extra: kafka
|
|
44
46
|
Requires-Dist: datacontract-cli[avro]; extra == "kafka"
|
|
45
47
|
Requires-Dist: soda-core-spark-df<3.4.0,>=3.3.1; extra == "kafka"
|
|
@@ -59,12 +61,12 @@ Requires-Dist: dbt-core>=1.8.0; extra == "dbt"
|
|
|
59
61
|
Provides-Extra: dbml
|
|
60
62
|
Requires-Dist: pydbml>=1.1.1; extra == "dbml"
|
|
61
63
|
Provides-Extra: all
|
|
62
|
-
Requires-Dist: datacontract-cli[bigquery,databricks,dbml,dbt,kafka,postgres,s3,snowflake,sqlserver,trino]; extra == "all"
|
|
64
|
+
Requires-Dist: datacontract-cli[bigquery,databricks,dbml,dbt,iceberg,kafka,postgres,s3,snowflake,sqlserver,trino]; extra == "all"
|
|
63
65
|
Provides-Extra: dev
|
|
64
66
|
Requires-Dist: datacontract-cli[all]; extra == "dev"
|
|
65
67
|
Requires-Dist: httpx==0.27.2; extra == "dev"
|
|
66
68
|
Requires-Dist: kafka-python; extra == "dev"
|
|
67
|
-
Requires-Dist: moto==5.0.
|
|
69
|
+
Requires-Dist: moto==5.0.18; extra == "dev"
|
|
68
70
|
Requires-Dist: pandas>=2.1.0; extra == "dev"
|
|
69
71
|
Requires-Dist: pre-commit<3.9.0,>=3.7.1; extra == "dev"
|
|
70
72
|
Requires-Dist: pyarrow>=12.0.0; extra == "dev"
|
|
@@ -72,8 +74,8 @@ Requires-Dist: pytest; extra == "dev"
|
|
|
72
74
|
Requires-Dist: pytest-xdist; extra == "dev"
|
|
73
75
|
Requires-Dist: pymssql==2.3.1; extra == "dev"
|
|
74
76
|
Requires-Dist: ruff; extra == "dev"
|
|
75
|
-
Requires-Dist: testcontainers[kafka,minio,mssql,postgres]==4.8.
|
|
76
|
-
Requires-Dist: trino==0.
|
|
77
|
+
Requires-Dist: testcontainers[kafka,minio,mssql,postgres]==4.8.2; extra == "dev"
|
|
78
|
+
Requires-Dist: trino==0.330.0; extra == "dev"
|
|
77
79
|
|
|
78
80
|
# Data Contract CLI
|
|
79
81
|
|
|
@@ -85,8 +87,8 @@ Requires-Dist: trino==0.329.0; extra == "dev"
|
|
|
85
87
|
<a href="https://datacontract.com/slack" rel="nofollow"><img src="https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social" alt="Slack Status" data-canonical-src="https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social" style="max-width: 100%;"></a>
|
|
86
88
|
</p>
|
|
87
89
|
|
|
88
|
-
The `datacontract` CLI is an open
|
|
89
|
-
It uses data contract YAML files to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
|
|
90
|
+
The `datacontract` CLI is an open-source command-line tool for working with data contracts.
|
|
91
|
+
It uses data contract YAML files as [Data Contract Specification](https://datacontract.com/) or [ODCS](https://bitol-io.github.io/open-data-contract-standard/latest/) to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
|
|
90
92
|
|
|
91
93
|

|
|
92
94
|
|
|
@@ -98,15 +100,15 @@ Let's look at this data contract:
|
|
|
98
100
|
|
|
99
101
|
We have a _servers_ section with endpoint details to the S3 bucket, _models_ for the structure of the data, _servicelevels_ and _quality_ attributes that describe the expected freshness and number of rows.
|
|
100
102
|
|
|
101
|
-
This data contract contains all information to connect to S3 and check that the actual data meets the defined schema and quality requirements. We can use this information to test if the actual data
|
|
103
|
+
This data contract contains all information to connect to S3 and check that the actual data meets the defined schema and quality requirements. We can use this information to test if the actual data product in S3 is compliant to the data contract.
|
|
102
104
|
|
|
103
|
-
Let's use [pip](https://pip.pypa.io/en/stable/getting-started/) to install the CLI (or use the [Docker image](#docker),
|
|
105
|
+
Let's use [pip](https://pip.pypa.io/en/stable/getting-started/) to install the CLI (or use the [Docker image](#docker)),
|
|
104
106
|
```bash
|
|
105
107
|
$ python3 -m pip install datacontract-cli[all]
|
|
106
108
|
```
|
|
107
109
|
|
|
108
110
|
|
|
109
|
-
|
|
111
|
+
now, let's run the tests:
|
|
110
112
|
|
|
111
113
|
```bash
|
|
112
114
|
$ datacontract test https://datacontract.com/examples/orders-latest/datacontract.yaml
|
|
@@ -144,7 +146,7 @@ Testing https://datacontract.com/examples/orders-latest/datacontract.yaml
|
|
|
144
146
|
|
|
145
147
|
Voilà, the CLI tested that the _datacontract.yaml_ itself is valid, all records comply with the schema, and all quality attributes are met.
|
|
146
148
|
|
|
147
|
-
We can also use the datacontract.yaml to export in many [formats](#format), e.g., to SQL:
|
|
149
|
+
We can also use the datacontract.yaml to export in many [formats](#format), e.g., to generate a SQL DDL:
|
|
148
150
|
|
|
149
151
|
```bash
|
|
150
152
|
$ datacontract export --format sql https://datacontract.com/examples/orders-latest/datacontract.yaml
|
|
@@ -191,7 +193,7 @@ $ datacontract test datacontract.yaml
|
|
|
191
193
|
# execute schema and quality checks on the examples within the contract
|
|
192
194
|
$ datacontract test --examples datacontract.yaml
|
|
193
195
|
|
|
194
|
-
# export data contract as html (other formats: avro, dbt, dbt-sources, dbt-staging-sql, jsonschema,
|
|
196
|
+
# export data contract as html (other formats: avro, dbt, dbt-sources, dbt-staging-sql, jsonschema, odcs_v2, odcs_v3, rdf, sql, sodacl, terraform, ...)
|
|
195
197
|
$ datacontract export --format html datacontract.yaml > datacontract.html
|
|
196
198
|
|
|
197
199
|
# import avro (other formats: sql, glue, bigquery...)
|
|
@@ -224,8 +226,7 @@ if not run.has_passed():
|
|
|
224
226
|
Choose the most appropriate installation method for your needs:
|
|
225
227
|
|
|
226
228
|
### pip
|
|
227
|
-
Python 3.11
|
|
228
|
-
Python 3.12 available as pre-release release candidate for 0.9.3
|
|
229
|
+
Python 3.10, 3.11, and 3.12 are supported. We recommend to use Python 3.11.
|
|
229
230
|
|
|
230
231
|
```bash
|
|
231
232
|
python3 -m pip install datacontract-cli[all]
|
|
@@ -239,17 +240,22 @@ pipx install datacontract-cli[all]
|
|
|
239
240
|
|
|
240
241
|
### Docker
|
|
241
242
|
|
|
243
|
+
You can also use our Docker image to run the CLI tool. It is also convenient for CI/CD pipelines.
|
|
244
|
+
|
|
242
245
|
```bash
|
|
243
246
|
docker pull datacontract/cli
|
|
244
247
|
docker run --rm -v ${PWD}:/home/datacontract datacontract/cli
|
|
245
248
|
```
|
|
246
249
|
|
|
247
|
-
|
|
250
|
+
You can create an alias for the Docker command to make it easier to use:
|
|
248
251
|
|
|
249
252
|
```bash
|
|
250
253
|
alias datacontract='docker run --rm -v "${PWD}:/home/datacontract" datacontract/cli:latest'
|
|
251
254
|
```
|
|
252
255
|
|
|
256
|
+
_Note:_ The output of Docker command line messages is limited to 80 columns and may include line breaks. Don't pipe docker output to files if you want to export code. Use the `--output` option instead.
|
|
257
|
+
|
|
258
|
+
|
|
253
259
|
|
|
254
260
|
## Optional Dependencies
|
|
255
261
|
|
|
@@ -742,10 +748,11 @@ servers:
|
|
|
742
748
|
|
|
743
749
|
#### Environment Variables
|
|
744
750
|
|
|
745
|
-
| Environment Variable
|
|
746
|
-
|
|
747
|
-
| `DATACONTRACT_KAFKA_SASL_USERNAME`
|
|
748
|
-
| `DATACONTRACT_KAFKA_SASL_PASSWORD`
|
|
751
|
+
| Environment Variable | Example | Description |
|
|
752
|
+
|-------------------------------------|---------|----------------------------------------------------------------------------------|
|
|
753
|
+
| `DATACONTRACT_KAFKA_SASL_USERNAME` | `xxx` | The SASL username (key). |
|
|
754
|
+
| `DATACONTRACT_KAFKA_SASL_PASSWORD` | `xxx` | The SASL password (secret). |
|
|
755
|
+
| `DATACONTRACT_KAFKA_SASL_MECHANISM` | `PLAIN` | Default `PLAIN`. Other supported mechanisms: `SCRAM-SHA-256` and `SCRAM-SHA-512` |
|
|
749
756
|
|
|
750
757
|
|
|
751
758
|
### Postgres
|
|
@@ -800,6 +807,10 @@ models:
|
|
|
800
807
|
fields:
|
|
801
808
|
my_column_1: # corresponds to a column
|
|
802
809
|
type: varchar
|
|
810
|
+
my_column_2: # corresponds to a column with custom trino type
|
|
811
|
+
type: object
|
|
812
|
+
config:
|
|
813
|
+
trinoType: row(en_us varchar, pt_br varchar)
|
|
803
814
|
```
|
|
804
815
|
|
|
805
816
|
#### Environment Variables
|
|
@@ -826,7 +837,7 @@ models:
|
|
|
826
837
|
│ * --format [jsonschema|pydantic-model|sodacl|dbt|dbt-sources|db The export format. [default: None] [required] │
|
|
827
838
|
│ t-staging-sql|odcs|rdf|avro|protobuf|great-expectati │
|
|
828
839
|
│ ons|terraform|avro-idl|sql|sql-query|html|go|bigquer │
|
|
829
|
-
│ y|dbml|spark|sqlalchemy|data-caterer] │
|
|
840
|
+
│ y|dbml|spark|sqlalchemy|data-caterer|dcs] │
|
|
830
841
|
│ --output PATH Specify the file path where the exported data will be │
|
|
831
842
|
│ saved. If no path is provided, the output will be │
|
|
832
843
|
│ printed to stdout. │
|
|
@@ -858,27 +869,30 @@ Available export options:
|
|
|
858
869
|
|
|
859
870
|
| Type | Description | Status |
|
|
860
871
|
|----------------------|---------------------------------------------------------|--------|
|
|
861
|
-
| `html` | Export to HTML | ✅
|
|
862
|
-
| `jsonschema` | Export to JSON Schema | ✅
|
|
863
|
-
| `
|
|
864
|
-
| `
|
|
865
|
-
| `
|
|
866
|
-
| `
|
|
867
|
-
| `dbt
|
|
868
|
-
| `
|
|
869
|
-
| `
|
|
870
|
-
| `
|
|
871
|
-
| `
|
|
872
|
-
| `
|
|
873
|
-
| `
|
|
874
|
-
| `
|
|
875
|
-
| `
|
|
876
|
-
| `
|
|
877
|
-
| `
|
|
878
|
-
| `
|
|
879
|
-
| `
|
|
880
|
-
| `
|
|
881
|
-
| `
|
|
872
|
+
| `html` | Export to HTML | ✅ |
|
|
873
|
+
| `jsonschema` | Export to JSON Schema | ✅ |
|
|
874
|
+
| `odcs_v2` | Export to Open Data Contract Standard (ODCS) V2 | ✅ |
|
|
875
|
+
| `odcs_v3` | Export to Open Data Contract Standard (ODCS) V3 | ✅ |
|
|
876
|
+
| `odcs` | Export to Open Data Contract Standard (ODCS) V3 | ✅ |
|
|
877
|
+
| `sodacl` | Export to SodaCL quality checks in YAML format | ✅ |
|
|
878
|
+
| `dbt` | Export to dbt models in YAML format | ✅ |
|
|
879
|
+
| `dbt-sources` | Export to dbt sources in YAML format | ✅ |
|
|
880
|
+
| `dbt-staging-sql` | Export to dbt staging SQL models | ✅ |
|
|
881
|
+
| `rdf` | Export data contract to RDF representation in N3 format | ✅ |
|
|
882
|
+
| `avro` | Export to AVRO models | ✅ |
|
|
883
|
+
| `protobuf` | Export to Protobuf | ✅ |
|
|
884
|
+
| `terraform` | Export to terraform resources | ✅ |
|
|
885
|
+
| `sql` | Export to SQL DDL | ✅ |
|
|
886
|
+
| `sql-query` | Export to SQL Query | ✅ |
|
|
887
|
+
| `great-expectations` | Export to Great Expectations Suites in JSON Format | ✅ |
|
|
888
|
+
| `bigquery` | Export to BigQuery Schemas | ✅ |
|
|
889
|
+
| `go` | Export to Go types | ✅ |
|
|
890
|
+
| `pydantic-model` | Export to pydantic models | ✅ |
|
|
891
|
+
| `DBML` | Export to a DBML Diagram description | ✅ |
|
|
892
|
+
| `spark` | Export to a Spark StructType | ✅ |
|
|
893
|
+
| `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
|
|
894
|
+
| `data-caterer` | Export to Data Caterer in YAML format | ✅ |
|
|
895
|
+
| `dcs` | Export to Data Contract Specification in YAML format | ✅ |
|
|
882
896
|
| Missing something? | Please create an issue on GitHub | TBD |
|
|
883
897
|
|
|
884
898
|
#### Great Expectations
|
|
@@ -996,7 +1010,7 @@ models:
|
|
|
996
1010
|
|
|
997
1011
|
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
998
1012
|
│ * --format [sql|avro|dbt|glue|jsonschema|bigquery|odcs The format of the source file. │
|
|
999
|
-
│ |unity|spark]
|
|
1013
|
+
│ |unity|spark|iceberg] [default: None] │
|
|
1000
1014
|
│ [required] │
|
|
1001
1015
|
│ --source TEXT The path to the file or Glue Database that │
|
|
1002
1016
|
│ should be imported. │
|
|
@@ -1026,6 +1040,8 @@ models:
|
|
|
1026
1040
|
│ file (repeat for multiple table names, leave │
|
|
1027
1041
|
│ empty for all tables in the file). │
|
|
1028
1042
|
│ [default: None] │
|
|
1043
|
+
│ --iceberg-table TEXT Table name to assign to the model created │
|
|
1044
|
+
│ from the Iceberg schema. [default: None] │
|
|
1029
1045
|
│ --help Show this message and exit. │
|
|
1030
1046
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
1031
1047
|
```
|
|
@@ -1051,12 +1067,25 @@ Available import options:
|
|
|
1051
1067
|
| `spark` | Import from Spark StructTypes | ✅ |
|
|
1052
1068
|
| `dbml` | Import from DBML models | ✅ |
|
|
1053
1069
|
| `protobuf` | Import from Protobuf schemas | TBD |
|
|
1070
|
+
| `iceberg` | Import from an Iceberg JSON Schema Definition | partial |
|
|
1054
1071
|
| Missing something? | Please create an issue on GitHub | TBD |
|
|
1055
1072
|
|
|
1056
1073
|
|
|
1074
|
+
#### ODCS
|
|
1075
|
+
|
|
1076
|
+
Import from Open Data Contract Standard (ODCS) v2 or v3.
|
|
1077
|
+
The importer automatically detects the ODCS version and imports the data contract.
|
|
1078
|
+
|
|
1079
|
+
Examples:
|
|
1080
|
+
|
|
1081
|
+
```bash
|
|
1082
|
+
# Example import from ODCS
|
|
1083
|
+
datacontract import --format odcs --source my_data_contract.odcs.yaml
|
|
1084
|
+
```
|
|
1085
|
+
|
|
1057
1086
|
#### BigQuery
|
|
1058
1087
|
|
|
1059
|
-
|
|
1088
|
+
BigQuery data can either be imported off of JSON Files generated from the table descriptions or directly from the Bigquery API. In case you want to use JSON Files, specify the `source` parameter with a path to the JSON File.
|
|
1060
1089
|
|
|
1061
1090
|
To import from the Bigquery API, you have to _omit_ `source` and instead need to provide `bigquery-project` and `bigquery-dataset`. Additionally you may specify `bigquery-table` to enumerate the tables that should be imported. If no tables are given, _all_ available tables of the dataset will be imported.
|
|
1062
1091
|
|
|
@@ -1168,6 +1197,15 @@ datacontract import --format dbml --source <file_path> --dbml-table <table_name_
|
|
|
1168
1197
|
datacontract import --format dbml --source <file_path> --dbml-table <table_name_1> --dbml-schema <schema_1>
|
|
1169
1198
|
```
|
|
1170
1199
|
|
|
1200
|
+
#### Iceberg
|
|
1201
|
+
|
|
1202
|
+
Importing from an [Iceberg Table Json Schema Definition](https://iceberg.apache.org/spec/#appendix-c-json-serialization). Specify location of json files using the `source` parameter.
|
|
1203
|
+
|
|
1204
|
+
Examples:
|
|
1205
|
+
|
|
1206
|
+
```bash
|
|
1207
|
+
datacontract import --format iceberg --source ./tests/fixtures/iceberg/simple_schema.json --iceberg-table test-table
|
|
1208
|
+
```
|
|
1171
1209
|
|
|
1172
1210
|
### breaking
|
|
1173
1211
|
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
<a href="https://datacontract.com/slack" rel="nofollow"><img src="https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social" alt="Slack Status" data-canonical-src="https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social" style="max-width: 100%;"></a>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
The `datacontract` CLI is an open
|
|
12
|
-
It uses data contract YAML files to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
|
|
11
|
+
The `datacontract` CLI is an open-source command-line tool for working with data contracts.
|
|
12
|
+
It uses data contract YAML files as [Data Contract Specification](https://datacontract.com/) or [ODCS](https://bitol-io.github.io/open-data-contract-standard/latest/) to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library.
|
|
13
13
|
|
|
14
14
|

|
|
15
15
|
|
|
@@ -21,15 +21,15 @@ Let's look at this data contract:
|
|
|
21
21
|
|
|
22
22
|
We have a _servers_ section with endpoint details to the S3 bucket, _models_ for the structure of the data, _servicelevels_ and _quality_ attributes that describe the expected freshness and number of rows.
|
|
23
23
|
|
|
24
|
-
This data contract contains all information to connect to S3 and check that the actual data meets the defined schema and quality requirements. We can use this information to test if the actual data
|
|
24
|
+
This data contract contains all information to connect to S3 and check that the actual data meets the defined schema and quality requirements. We can use this information to test if the actual data product in S3 is compliant to the data contract.
|
|
25
25
|
|
|
26
|
-
Let's use [pip](https://pip.pypa.io/en/stable/getting-started/) to install the CLI (or use the [Docker image](#docker),
|
|
26
|
+
Let's use [pip](https://pip.pypa.io/en/stable/getting-started/) to install the CLI (or use the [Docker image](#docker)),
|
|
27
27
|
```bash
|
|
28
28
|
$ python3 -m pip install datacontract-cli[all]
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
now, let's run the tests:
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
35
|
$ datacontract test https://datacontract.com/examples/orders-latest/datacontract.yaml
|
|
@@ -67,7 +67,7 @@ Testing https://datacontract.com/examples/orders-latest/datacontract.yaml
|
|
|
67
67
|
|
|
68
68
|
Voilà, the CLI tested that the _datacontract.yaml_ itself is valid, all records comply with the schema, and all quality attributes are met.
|
|
69
69
|
|
|
70
|
-
We can also use the datacontract.yaml to export in many [formats](#format), e.g., to SQL:
|
|
70
|
+
We can also use the datacontract.yaml to export in many [formats](#format), e.g., to generate a SQL DDL:
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
73
|
$ datacontract export --format sql https://datacontract.com/examples/orders-latest/datacontract.yaml
|
|
@@ -114,7 +114,7 @@ $ datacontract test datacontract.yaml
|
|
|
114
114
|
# execute schema and quality checks on the examples within the contract
|
|
115
115
|
$ datacontract test --examples datacontract.yaml
|
|
116
116
|
|
|
117
|
-
# export data contract as html (other formats: avro, dbt, dbt-sources, dbt-staging-sql, jsonschema,
|
|
117
|
+
# export data contract as html (other formats: avro, dbt, dbt-sources, dbt-staging-sql, jsonschema, odcs_v2, odcs_v3, rdf, sql, sodacl, terraform, ...)
|
|
118
118
|
$ datacontract export --format html datacontract.yaml > datacontract.html
|
|
119
119
|
|
|
120
120
|
# import avro (other formats: sql, glue, bigquery...)
|
|
@@ -147,8 +147,7 @@ if not run.has_passed():
|
|
|
147
147
|
Choose the most appropriate installation method for your needs:
|
|
148
148
|
|
|
149
149
|
### pip
|
|
150
|
-
Python 3.11
|
|
151
|
-
Python 3.12 available as pre-release release candidate for 0.9.3
|
|
150
|
+
Python 3.10, 3.11, and 3.12 are supported. We recommend to use Python 3.11.
|
|
152
151
|
|
|
153
152
|
```bash
|
|
154
153
|
python3 -m pip install datacontract-cli[all]
|
|
@@ -162,17 +161,22 @@ pipx install datacontract-cli[all]
|
|
|
162
161
|
|
|
163
162
|
### Docker
|
|
164
163
|
|
|
164
|
+
You can also use our Docker image to run the CLI tool. It is also convenient for CI/CD pipelines.
|
|
165
|
+
|
|
165
166
|
```bash
|
|
166
167
|
docker pull datacontract/cli
|
|
167
168
|
docker run --rm -v ${PWD}:/home/datacontract datacontract/cli
|
|
168
169
|
```
|
|
169
170
|
|
|
170
|
-
|
|
171
|
+
You can create an alias for the Docker command to make it easier to use:
|
|
171
172
|
|
|
172
173
|
```bash
|
|
173
174
|
alias datacontract='docker run --rm -v "${PWD}:/home/datacontract" datacontract/cli:latest'
|
|
174
175
|
```
|
|
175
176
|
|
|
177
|
+
_Note:_ The output of Docker command line messages is limited to 80 columns and may include line breaks. Don't pipe docker output to files if you want to export code. Use the `--output` option instead.
|
|
178
|
+
|
|
179
|
+
|
|
176
180
|
|
|
177
181
|
## Optional Dependencies
|
|
178
182
|
|
|
@@ -665,10 +669,11 @@ servers:
|
|
|
665
669
|
|
|
666
670
|
#### Environment Variables
|
|
667
671
|
|
|
668
|
-
| Environment Variable
|
|
669
|
-
|
|
670
|
-
| `DATACONTRACT_KAFKA_SASL_USERNAME`
|
|
671
|
-
| `DATACONTRACT_KAFKA_SASL_PASSWORD`
|
|
672
|
+
| Environment Variable | Example | Description |
|
|
673
|
+
|-------------------------------------|---------|----------------------------------------------------------------------------------|
|
|
674
|
+
| `DATACONTRACT_KAFKA_SASL_USERNAME` | `xxx` | The SASL username (key). |
|
|
675
|
+
| `DATACONTRACT_KAFKA_SASL_PASSWORD` | `xxx` | The SASL password (secret). |
|
|
676
|
+
| `DATACONTRACT_KAFKA_SASL_MECHANISM` | `PLAIN` | Default `PLAIN`. Other supported mechanisms: `SCRAM-SHA-256` and `SCRAM-SHA-512` |
|
|
672
677
|
|
|
673
678
|
|
|
674
679
|
### Postgres
|
|
@@ -723,6 +728,10 @@ models:
|
|
|
723
728
|
fields:
|
|
724
729
|
my_column_1: # corresponds to a column
|
|
725
730
|
type: varchar
|
|
731
|
+
my_column_2: # corresponds to a column with custom trino type
|
|
732
|
+
type: object
|
|
733
|
+
config:
|
|
734
|
+
trinoType: row(en_us varchar, pt_br varchar)
|
|
726
735
|
```
|
|
727
736
|
|
|
728
737
|
#### Environment Variables
|
|
@@ -749,7 +758,7 @@ models:
|
|
|
749
758
|
│ * --format [jsonschema|pydantic-model|sodacl|dbt|dbt-sources|db The export format. [default: None] [required] │
|
|
750
759
|
│ t-staging-sql|odcs|rdf|avro|protobuf|great-expectati │
|
|
751
760
|
│ ons|terraform|avro-idl|sql|sql-query|html|go|bigquer │
|
|
752
|
-
│ y|dbml|spark|sqlalchemy|data-caterer] │
|
|
761
|
+
│ y|dbml|spark|sqlalchemy|data-caterer|dcs] │
|
|
753
762
|
│ --output PATH Specify the file path where the exported data will be │
|
|
754
763
|
│ saved. If no path is provided, the output will be │
|
|
755
764
|
│ printed to stdout. │
|
|
@@ -781,27 +790,30 @@ Available export options:
|
|
|
781
790
|
|
|
782
791
|
| Type | Description | Status |
|
|
783
792
|
|----------------------|---------------------------------------------------------|--------|
|
|
784
|
-
| `html` | Export to HTML | ✅
|
|
785
|
-
| `jsonschema` | Export to JSON Schema | ✅
|
|
786
|
-
| `
|
|
787
|
-
| `
|
|
788
|
-
| `
|
|
789
|
-
| `
|
|
790
|
-
| `dbt
|
|
791
|
-
| `
|
|
792
|
-
| `
|
|
793
|
-
| `
|
|
794
|
-
| `
|
|
795
|
-
| `
|
|
796
|
-
| `
|
|
797
|
-
| `
|
|
798
|
-
| `
|
|
799
|
-
| `
|
|
800
|
-
| `
|
|
801
|
-
| `
|
|
802
|
-
| `
|
|
803
|
-
| `
|
|
804
|
-
| `
|
|
793
|
+
| `html` | Export to HTML | ✅ |
|
|
794
|
+
| `jsonschema` | Export to JSON Schema | ✅ |
|
|
795
|
+
| `odcs_v2` | Export to Open Data Contract Standard (ODCS) V2 | ✅ |
|
|
796
|
+
| `odcs_v3` | Export to Open Data Contract Standard (ODCS) V3 | ✅ |
|
|
797
|
+
| `odcs` | Export to Open Data Contract Standard (ODCS) V3 | ✅ |
|
|
798
|
+
| `sodacl` | Export to SodaCL quality checks in YAML format | ✅ |
|
|
799
|
+
| `dbt` | Export to dbt models in YAML format | ✅ |
|
|
800
|
+
| `dbt-sources` | Export to dbt sources in YAML format | ✅ |
|
|
801
|
+
| `dbt-staging-sql` | Export to dbt staging SQL models | ✅ |
|
|
802
|
+
| `rdf` | Export data contract to RDF representation in N3 format | ✅ |
|
|
803
|
+
| `avro` | Export to AVRO models | ✅ |
|
|
804
|
+
| `protobuf` | Export to Protobuf | ✅ |
|
|
805
|
+
| `terraform` | Export to terraform resources | ✅ |
|
|
806
|
+
| `sql` | Export to SQL DDL | ✅ |
|
|
807
|
+
| `sql-query` | Export to SQL Query | ✅ |
|
|
808
|
+
| `great-expectations` | Export to Great Expectations Suites in JSON Format | ✅ |
|
|
809
|
+
| `bigquery` | Export to BigQuery Schemas | ✅ |
|
|
810
|
+
| `go` | Export to Go types | ✅ |
|
|
811
|
+
| `pydantic-model` | Export to pydantic models | ✅ |
|
|
812
|
+
| `DBML` | Export to a DBML Diagram description | ✅ |
|
|
813
|
+
| `spark` | Export to a Spark StructType | ✅ |
|
|
814
|
+
| `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
|
|
815
|
+
| `data-caterer` | Export to Data Caterer in YAML format | ✅ |
|
|
816
|
+
| `dcs` | Export to Data Contract Specification in YAML format | ✅ |
|
|
805
817
|
| Missing something? | Please create an issue on GitHub | TBD |
|
|
806
818
|
|
|
807
819
|
#### Great Expectations
|
|
@@ -919,7 +931,7 @@ models:
|
|
|
919
931
|
|
|
920
932
|
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
921
933
|
│ * --format [sql|avro|dbt|glue|jsonschema|bigquery|odcs The format of the source file. │
|
|
922
|
-
│ |unity|spark]
|
|
934
|
+
│ |unity|spark|iceberg] [default: None] │
|
|
923
935
|
│ [required] │
|
|
924
936
|
│ --source TEXT The path to the file or Glue Database that │
|
|
925
937
|
│ should be imported. │
|
|
@@ -949,6 +961,8 @@ models:
|
|
|
949
961
|
│ file (repeat for multiple table names, leave │
|
|
950
962
|
│ empty for all tables in the file). │
|
|
951
963
|
│ [default: None] │
|
|
964
|
+
│ --iceberg-table TEXT Table name to assign to the model created │
|
|
965
|
+
│ from the Iceberg schema. [default: None] │
|
|
952
966
|
│ --help Show this message and exit. │
|
|
953
967
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
954
968
|
```
|
|
@@ -974,12 +988,25 @@ Available import options:
|
|
|
974
988
|
| `spark` | Import from Spark StructTypes | ✅ |
|
|
975
989
|
| `dbml` | Import from DBML models | ✅ |
|
|
976
990
|
| `protobuf` | Import from Protobuf schemas | TBD |
|
|
991
|
+
| `iceberg` | Import from an Iceberg JSON Schema Definition | partial |
|
|
977
992
|
| Missing something? | Please create an issue on GitHub | TBD |
|
|
978
993
|
|
|
979
994
|
|
|
995
|
+
#### ODCS
|
|
996
|
+
|
|
997
|
+
Import from Open Data Contract Standard (ODCS) v2 or v3.
|
|
998
|
+
The importer automatically detects the ODCS version and imports the data contract.
|
|
999
|
+
|
|
1000
|
+
Examples:
|
|
1001
|
+
|
|
1002
|
+
```bash
|
|
1003
|
+
# Example import from ODCS
|
|
1004
|
+
datacontract import --format odcs --source my_data_contract.odcs.yaml
|
|
1005
|
+
```
|
|
1006
|
+
|
|
980
1007
|
#### BigQuery
|
|
981
1008
|
|
|
982
|
-
|
|
1009
|
+
BigQuery data can either be imported off of JSON Files generated from the table descriptions or directly from the Bigquery API. In case you want to use JSON Files, specify the `source` parameter with a path to the JSON File.
|
|
983
1010
|
|
|
984
1011
|
To import from the Bigquery API, you have to _omit_ `source` and instead need to provide `bigquery-project` and `bigquery-dataset`. Additionally you may specify `bigquery-table` to enumerate the tables that should be imported. If no tables are given, _all_ available tables of the dataset will be imported.
|
|
985
1012
|
|
|
@@ -1091,6 +1118,15 @@ datacontract import --format dbml --source <file_path> --dbml-table <table_name_
|
|
|
1091
1118
|
datacontract import --format dbml --source <file_path> --dbml-table <table_name_1> --dbml-schema <schema_1>
|
|
1092
1119
|
```
|
|
1093
1120
|
|
|
1121
|
+
#### Iceberg
|
|
1122
|
+
|
|
1123
|
+
Importing from an [Iceberg Table Json Schema Definition](https://iceberg.apache.org/spec/#appendix-c-json-serialization). Specify location of json files using the `source` parameter.
|
|
1124
|
+
|
|
1125
|
+
Examples:
|
|
1126
|
+
|
|
1127
|
+
```bash
|
|
1128
|
+
datacontract import --format iceberg --source ./tests/fixtures/iceberg/simple_schema.json --iceberg-table test-table
|
|
1129
|
+
```
|
|
1094
1130
|
|
|
1095
1131
|
### breaking
|
|
1096
1132
|
|
|
@@ -244,6 +244,10 @@ def import_(
|
|
|
244
244
|
help="List of table names to import from the DBML file (repeat for multiple table names, leave empty for all tables in the file)."
|
|
245
245
|
),
|
|
246
246
|
] = None,
|
|
247
|
+
iceberg_table: Annotated[
|
|
248
|
+
Optional[str],
|
|
249
|
+
typer.Option(help="Table name to assign to the model created from the Iceberg schema."),
|
|
250
|
+
] = None,
|
|
247
251
|
):
|
|
248
252
|
"""
|
|
249
253
|
Create a data contract from the given source location. Prints to stdout.
|
|
@@ -259,6 +263,7 @@ def import_(
|
|
|
259
263
|
dbt_model=dbt_model,
|
|
260
264
|
dbml_schema=dbml_schema,
|
|
261
265
|
dbml_table=dbml_table,
|
|
266
|
+
iceberg_table=iceberg_table,
|
|
262
267
|
)
|
|
263
268
|
console.print(result.to_yaml())
|
|
264
269
|
|
|
@@ -199,7 +199,15 @@ class DataContract:
|
|
|
199
199
|
|
|
200
200
|
except DataContractException as e:
|
|
201
201
|
run.checks.append(
|
|
202
|
-
Check(
|
|
202
|
+
Check(
|
|
203
|
+
type=e.type,
|
|
204
|
+
name=e.name,
|
|
205
|
+
result=e.result,
|
|
206
|
+
reason=e.reason,
|
|
207
|
+
model=e.model,
|
|
208
|
+
engine=e.engine,
|
|
209
|
+
details="",
|
|
210
|
+
)
|
|
203
211
|
)
|
|
204
212
|
run.log_error(str(e))
|
|
205
213
|
except Exception as e:
|
{datacontract_cli-0.10.13 → datacontract_cli-0.10.14}/datacontract/engines/soda/connections/kafka.py
RENAMED
|
@@ -112,17 +112,38 @@ def get_auth_options():
|
|
|
112
112
|
"""Retrieve Kafka authentication options from environment variables."""
|
|
113
113
|
kafka_sasl_username = os.getenv("DATACONTRACT_KAFKA_SASL_USERNAME")
|
|
114
114
|
kafka_sasl_password = os.getenv("DATACONTRACT_KAFKA_SASL_PASSWORD")
|
|
115
|
+
kafka_sasl_mechanism = os.getenv("DATACONTRACT_KAFKA_SASL_MECHANISM", "PLAIN").upper()
|
|
115
116
|
|
|
116
|
-
|
|
117
|
+
# Skip authentication if credentials are not provided
|
|
118
|
+
if not kafka_sasl_username or not kafka_sasl_password:
|
|
117
119
|
return {}
|
|
118
120
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
"
|
|
122
|
-
"kafka.sasl.jaas.config": (
|
|
121
|
+
# SASL mechanisms supported by Kafka
|
|
122
|
+
jaas_config = {
|
|
123
|
+
"PLAIN": (
|
|
123
124
|
f"org.apache.kafka.common.security.plain.PlainLoginModule required "
|
|
124
125
|
f'username="{kafka_sasl_username}" password="{kafka_sasl_password}";'
|
|
125
126
|
),
|
|
127
|
+
"SCRAM-SHA-256": (
|
|
128
|
+
f"org.apache.kafka.common.security.scram.ScramLoginModule required "
|
|
129
|
+
f'username="{kafka_sasl_username}" password="{kafka_sasl_password}";'
|
|
130
|
+
),
|
|
131
|
+
"SCRAM-SHA-512": (
|
|
132
|
+
f"org.apache.kafka.common.security.scram.ScramLoginModule required "
|
|
133
|
+
f'username="{kafka_sasl_username}" password="{kafka_sasl_password}";'
|
|
134
|
+
),
|
|
135
|
+
# Add more mechanisms as needed
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
# Validate SASL mechanism
|
|
139
|
+
if kafka_sasl_mechanism not in jaas_config:
|
|
140
|
+
raise ValueError(f"Unsupported SASL mechanism: {kafka_sasl_mechanism}")
|
|
141
|
+
|
|
142
|
+
# Return config
|
|
143
|
+
return {
|
|
144
|
+
"kafka.sasl.mechanism": kafka_sasl_mechanism,
|
|
145
|
+
"kafka.security.protocol": "SASL_SSL",
|
|
146
|
+
"kafka.sasl.jaas.config": jaas_config[kafka_sasl_mechanism],
|
|
126
147
|
}
|
|
127
148
|
|
|
128
149
|
|