datacontract-cli 0.10.14__tar.gz → 0.10.16__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.14/datacontract_cli.egg-info → datacontract_cli-0.10.16}/PKG-INFO +150 -47
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/README.md +121 -19
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/breaking/breaking.py +229 -11
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/breaking/breaking_rules.py +24 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/catalog/catalog.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/cli.py +100 -33
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/data_contract.py +26 -4
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/datacontract/check_that_datacontract_file_exists.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/fastjsonschema/check_jsonschema.py +114 -22
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/soda/check_soda_execute.py +7 -5
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/soda/connections/duckdb.py +1 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/soda/connections/kafka.py +12 -12
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/avro_idl_converter.py +1 -2
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/bigquery_converter.py +4 -3
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/data_caterer_converter.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/dbml_converter.py +2 -4
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/dbt_converter.py +45 -39
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/exporter.py +2 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/exporter_factory.py +7 -2
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/go_converter.py +3 -2
- datacontract_cli-0.10.16/datacontract/export/great_expectations_converter.py +312 -0
- datacontract_cli-0.10.16/datacontract/export/iceberg_converter.py +188 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/jsonschema_converter.py +3 -2
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/odcs_v2_exporter.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/odcs_v3_exporter.py +44 -30
- datacontract_cli-0.10.16/datacontract/export/pandas_type_converter.py +40 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/rdf_converter.py +4 -5
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/sodacl_converter.py +9 -4
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/spark_converter.py +7 -6
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/sql_converter.py +1 -2
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/sqlalchemy_converter.py +1 -2
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/imports/avro_importer.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/imports/bigquery_importer.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/imports/dbml_importer.py +2 -2
- datacontract_cli-0.10.16/datacontract/imports/dbt_importer.py +158 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/imports/glue_importer.py +5 -3
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/imports/iceberg_importer.py +17 -7
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/imports/importer.py +1 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/imports/importer_factory.py +7 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/imports/jsonschema_importer.py +3 -2
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/imports/odcs_v3_importer.py +7 -2
- datacontract_cli-0.10.16/datacontract/imports/parquet_importer.py +81 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/imports/spark_importer.py +2 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/imports/sql_importer.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/imports/unity_importer.py +3 -3
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/integration/opentelemetry.py +0 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/lint/lint.py +2 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/lint/linters/description_linter.py +1 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/lint/linters/example_model_linter.py +1 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/lint/linters/field_pattern_linter.py +1 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/lint/linters/field_reference_linter.py +1 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/lint/linters/notice_period_linter.py +1 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/lint/linters/quality_schema_linter.py +1 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/lint/linters/valid_constraints_linter.py +1 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/lint/resolve.py +7 -3
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/lint/schema.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/model/data_contract_specification.py +13 -6
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/model/run.py +21 -12
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/templates/index.html +6 -6
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/web.py +2 -3
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16/datacontract_cli.egg-info}/PKG-INFO +150 -47
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract_cli.egg-info/SOURCES.txt +6 -0
- datacontract_cli-0.10.16/datacontract_cli.egg-info/requires.txt +81 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/pyproject.toml +36 -28
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_breaking.py +2 -3
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_changelog.py +255 -6
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_cli.py +1 -1
- datacontract_cli-0.10.16/tests/test_data_contract_specification.py +10 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_bigquery.py +1 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_complex_data_contract.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_dbt_models.py +6 -6
- datacontract_cli-0.10.16/tests/test_export_dbt_sources.py +134 -0
- datacontract_cli-0.10.16/tests/test_export_great_expectations.py +604 -0
- datacontract_cli-0.10.16/tests/test_export_iceberg.py +254 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_odcs_v3.py +7 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_rdf.py +6 -6
- datacontract_cli-0.10.16/tests/test_export_sodacl.py +91 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_spark.py +2 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_import_avro.py +5 -5
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_import_dbt.py +186 -5
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_import_iceberg.py +6 -8
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_import_jsonschema.py +39 -0
- datacontract_cli-0.10.16/tests/test_import_parquet.py +68 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_import_spark.py +5 -9
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_import_sql.py +2 -2
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_integration_opentelemetry.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_lint.py +2 -3
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_resolve.py +4 -4
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_roundtrip_jsonschema.py +2 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_dataframe.py +6 -6
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_examples_csv.py +7 -6
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_kafka.py +1 -2
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_postgres.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_quality.py +3 -3
- datacontract_cli-0.10.16/tests/test_test_s3_json_remote.py +20 -0
- datacontract_cli-0.10.14/datacontract/export/great_expectations_converter.py +0 -150
- datacontract_cli-0.10.14/datacontract/imports/dbt_importer.py +0 -93
- datacontract_cli-0.10.14/datacontract_cli.egg-info/requires.txt +0 -79
- datacontract_cli-0.10.14/tests/test_export_dbt_sources.py +0 -74
- datacontract_cli-0.10.14/tests/test_export_great_expectations.py +0 -269
- datacontract_cli-0.10.14/tests/test_export_sodacl.py +0 -96
- datacontract_cli-0.10.14/tests/test_test_s3_json_remote.py +0 -36
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/LICENSE +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/MANIFEST.in +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/__init__.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/__init__.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/fastjsonschema/s3/s3_read_files.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/soda/__init__.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/soda/connections/bigquery.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/soda/connections/dask.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/soda/connections/databricks.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/soda/connections/postgres.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/soda/connections/snowflake.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/soda/connections/sqlserver.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/engines/soda/connections/trino.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/__init__.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/avro_converter.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/csv_type_converter.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/dcs_exporter.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/html_export.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/protobuf_converter.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/pydantic_converter.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/sql_type_converter.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/export/terraform_converter.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/imports/odcs_importer.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/imports/odcs_v2_importer.py +2 -2
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/init/download_datacontract_file.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/integration/datamesh_manager.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/lint/files.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/lint/linters/__init__.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/lint/resources.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/lint/urls.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/model/breaking_change.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/model/exceptions.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/model/odcs.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/py.typed +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/templates/datacontract.html +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/templates/partials/datacontract_information.html +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/templates/partials/datacontract_servicelevels.html +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/templates/partials/datacontract_terms.html +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/templates/partials/definition.html +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/templates/partials/example.html +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/templates/partials/model_field.html +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/templates/partials/server.html +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract/templates/style/output.css +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract_cli.egg-info/dependency_links.txt +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract_cli.egg-info/entry_points.txt +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/datacontract_cli.egg-info/top_level.txt +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/setup.cfg +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_catalog.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_description_linter.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_documentation_linter.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_download_datacontract_file.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_example_model_linter.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_avro.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_avro_idl.py +4 -4
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_custom_exporter.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_data_caterer.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_dbml.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_dbt_staging_sql.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_go.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_html.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_jsonschema.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_odcs_v2.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_protobuf.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_pydantic.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_sql.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_sql_query.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_sqlalchemy.py +2 -2
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_export_terraform.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_field_constraint_linter.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_field_pattern_linter.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_field_reference_linter.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_import_bigquery.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_import_dbml.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_import_glue.py +2 -2
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_import_odcs_v2.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_import_odcs_v3.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_import_unity_file.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_integration_datameshmanager.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_notice_period_linter.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_quality_schema_linter.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_spec_fields_field.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_spec_ref.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_azure_parquet_remote.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_bigquery.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_databricks.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_delta.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_examples_formats_valid.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_examples_inline.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_examples_json.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_examples_missing.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_gcs_json_remote.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_kafka_remote.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_local_json.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_parquet.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_s3_csv.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_s3_delta.py +1 -1
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_s3_json.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_s3_json_complex.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_s3_json_multiple_models.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_snowflake.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_sqlserver.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/tests/test_test_trino.py +0 -0
- {datacontract_cli-0.10.14 → datacontract_cli-0.10.16}/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.16
|
|
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,70 +11,71 @@ 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.15,>=0.12
|
|
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: python-multipart==0.0.
|
|
18
|
+
Requires-Dist: fastapi==0.115.6
|
|
19
|
+
Requires-Dist: uvicorn==0.32.1
|
|
20
|
+
Requires-Dist: fastjsonschema<2.22.0,>=2.19.1
|
|
21
|
+
Requires-Dist: fastparquet==2024.11.0
|
|
22
|
+
Requires-Dist: python-multipart==0.0.19
|
|
23
23
|
Requires-Dist: rich<13.10,>=13.7
|
|
24
24
|
Requires-Dist: simple-ddl-parser==1.7.1
|
|
25
25
|
Requires-Dist: duckdb==1.1.2
|
|
26
|
-
Requires-Dist: soda-core-duckdb<3.
|
|
26
|
+
Requires-Dist: soda-core-duckdb<3.5.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.69,>=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"
|
|
36
36
|
Provides-Extra: bigquery
|
|
37
|
-
Requires-Dist: soda-core-bigquery<3.
|
|
37
|
+
Requires-Dist: soda-core-bigquery<3.5.0,>=3.3.1; extra == "bigquery"
|
|
38
38
|
Provides-Extra: databricks
|
|
39
|
-
Requires-Dist: soda-core-spark-df<3.
|
|
39
|
+
Requires-Dist: soda-core-spark-df<3.5.0,>=3.3.1; extra == "databricks"
|
|
40
40
|
Requires-Dist: databricks-sql-connector<3.6.0,>=3.1.2; extra == "databricks"
|
|
41
|
-
Requires-Dist: databricks-sdk<0.
|
|
42
|
-
Requires-Dist: soda-core-spark[databricks]<3.
|
|
41
|
+
Requires-Dist: databricks-sdk<0.39.0,>=0.32.0; extra == "databricks"
|
|
42
|
+
Requires-Dist: soda-core-spark[databricks]<3.5.0,>=3.3.1; extra == "databricks"
|
|
43
43
|
Provides-Extra: iceberg
|
|
44
|
-
Requires-Dist: pyiceberg==0.
|
|
44
|
+
Requires-Dist: pyiceberg==0.8.1; extra == "iceberg"
|
|
45
45
|
Provides-Extra: kafka
|
|
46
46
|
Requires-Dist: datacontract-cli[avro]; extra == "kafka"
|
|
47
|
-
Requires-Dist: soda-core-spark-df<3.
|
|
47
|
+
Requires-Dist: soda-core-spark-df<3.5.0,>=3.3.1; extra == "kafka"
|
|
48
48
|
Provides-Extra: postgres
|
|
49
|
-
Requires-Dist: soda-core-postgres<3.
|
|
49
|
+
Requires-Dist: soda-core-postgres<3.5.0,>=3.3.1; extra == "postgres"
|
|
50
50
|
Provides-Extra: s3
|
|
51
|
-
Requires-Dist: s3fs==2024.
|
|
51
|
+
Requires-Dist: s3fs==2024.10.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.5.0,>=3.3.1; extra == "snowflake"
|
|
55
55
|
Provides-Extra: sqlserver
|
|
56
|
-
Requires-Dist: soda-core-sqlserver<3.
|
|
56
|
+
Requires-Dist: soda-core-sqlserver<3.5.0,>=3.3.1; extra == "sqlserver"
|
|
57
57
|
Provides-Extra: trino
|
|
58
|
-
Requires-Dist: soda-core-trino<3.
|
|
58
|
+
Requires-Dist: soda-core-trino<3.5.0,>=3.3.1; 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
|
+
Provides-Extra: parquet
|
|
64
|
+
Requires-Dist: pyarrow>=12.0.0; extra == "parquet"
|
|
63
65
|
Provides-Extra: all
|
|
64
|
-
Requires-Dist: datacontract-cli[bigquery,databricks,dbml,dbt,iceberg,kafka,postgres,s3,snowflake,sqlserver,trino]; extra == "all"
|
|
66
|
+
Requires-Dist: datacontract-cli[bigquery,databricks,dbml,dbt,iceberg,kafka,parquet,postgres,s3,snowflake,sqlserver,trino]; extra == "all"
|
|
65
67
|
Provides-Extra: dev
|
|
66
68
|
Requires-Dist: datacontract-cli[all]; extra == "dev"
|
|
67
|
-
Requires-Dist: httpx==0.
|
|
69
|
+
Requires-Dist: httpx==0.28.1; extra == "dev"
|
|
68
70
|
Requires-Dist: kafka-python; extra == "dev"
|
|
69
|
-
Requires-Dist: moto==5.0.
|
|
71
|
+
Requires-Dist: moto==5.0.22; extra == "dev"
|
|
70
72
|
Requires-Dist: pandas>=2.1.0; extra == "dev"
|
|
71
|
-
Requires-Dist: pre-commit<
|
|
72
|
-
Requires-Dist: pyarrow>=12.0.0; extra == "dev"
|
|
73
|
+
Requires-Dist: pre-commit<4.1.0,>=3.7.1; extra == "dev"
|
|
73
74
|
Requires-Dist: pytest; extra == "dev"
|
|
74
75
|
Requires-Dist: pytest-xdist; extra == "dev"
|
|
75
|
-
Requires-Dist: pymssql==2.3.
|
|
76
|
+
Requires-Dist: pymssql==2.3.2; extra == "dev"
|
|
76
77
|
Requires-Dist: ruff; extra == "dev"
|
|
77
|
-
Requires-Dist: testcontainers[kafka,minio,mssql,postgres]==4.
|
|
78
|
+
Requires-Dist: testcontainers[kafka,minio,mssql,postgres]==4.9.0; extra == "dev"
|
|
78
79
|
Requires-Dist: trino==0.330.0; extra == "dev"
|
|
79
80
|
|
|
80
81
|
# Data Contract CLI
|
|
@@ -273,6 +274,7 @@ A list of available extras:
|
|
|
273
274
|
| Avro Support | `pip install datacontract-cli[avro]` |
|
|
274
275
|
| Google BigQuery | `pip install datacontract-cli[bigquery]` |
|
|
275
276
|
| Databricks Integration | `pip install datacontract-cli[databricks]` |
|
|
277
|
+
| Iceberg | `pip install datacontract-cli[iceberg]` |
|
|
276
278
|
| Kafka Integration | `pip install datacontract-cli[kafka]` |
|
|
277
279
|
| PostgreSQL Integration | `pip install datacontract-cli[postgres]` |
|
|
278
280
|
| S3 Integration | `pip install datacontract-cli[s3]` |
|
|
@@ -280,6 +282,8 @@ A list of available extras:
|
|
|
280
282
|
| Microsoft SQL Server | `pip install datacontract-cli[sqlserver]` |
|
|
281
283
|
| Trino | `pip install datacontract-cli[trino]` |
|
|
282
284
|
| Dbt | `pip install datacontract-cli[dbt]` |
|
|
285
|
+
| Dbml | `pip install datacontract-cli[dbml]` |
|
|
286
|
+
| Parquet | `pip install datacontract-cli[parquet]` |
|
|
283
287
|
|
|
284
288
|
|
|
285
289
|
|
|
@@ -825,19 +829,19 @@ models:
|
|
|
825
829
|
### export
|
|
826
830
|
|
|
827
831
|
```
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
832
|
+
Usage: datacontract export [OPTIONS] [LOCATION]
|
|
833
|
+
|
|
834
|
+
Convert data contract to a specific format. Saves to file specified by `output` option if present, otherwise prints to stdout.
|
|
835
|
+
|
|
833
836
|
╭─ Arguments ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
834
837
|
│ location [LOCATION] The location (url or path) of the data contract yaml. [default: datacontract.yaml] │
|
|
835
838
|
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
836
839
|
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
837
840
|
│ * --format [jsonschema|pydantic-model|sodacl|dbt|dbt-sources|db The export format. [default: None] [required] │
|
|
838
|
-
│ t-staging-sql|odcs|rdf|avro|protobuf
|
|
839
|
-
│
|
|
840
|
-
│
|
|
841
|
+
│ t-staging-sql|odcs|odcs_v2|odcs_v3|rdf|avro|protobuf │
|
|
842
|
+
│ |great-expectations|terraform|avro-idl|sql|sql-query │
|
|
843
|
+
│ |html|go|bigquery|dbml|spark|sqlalchemy|data-caterer │
|
|
844
|
+
│ |dcs|iceberg] │
|
|
841
845
|
│ --output PATH Specify the file path where the exported data will be │
|
|
842
846
|
│ saved. If no path is provided, the output will be │
|
|
843
847
|
│ printed to stdout. │
|
|
@@ -847,6 +851,12 @@ models:
|
|
|
847
851
|
│ file to refer to a model, e.g., `orders`, or `all` │
|
|
848
852
|
│ for all models (default). │
|
|
849
853
|
│ [default: all] │
|
|
854
|
+
│ --schema TEXT The location (url or path) of the Data Contract │
|
|
855
|
+
│ Specification JSON Schema │
|
|
856
|
+
│ [default: │
|
|
857
|
+
│ https://datacontract.com/datacontract.schema.json] │
|
|
858
|
+
│ --engine TEXT [engine] The engine used for great expection run. │
|
|
859
|
+
│ [default: None] │
|
|
850
860
|
│ --help Show this message and exit. │
|
|
851
861
|
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
852
862
|
╭─ RDF Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
@@ -857,12 +867,11 @@ models:
|
|
|
857
867
|
│ detect the sql dialect via the specified servers in the data contract. │
|
|
858
868
|
│ [default: auto] │
|
|
859
869
|
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
860
|
-
|
|
861
870
|
```
|
|
862
871
|
|
|
863
872
|
```bash
|
|
864
873
|
# Example export data contract as HTML
|
|
865
|
-
datacontract export --format html
|
|
874
|
+
datacontract export --format html --output datacontract.html
|
|
866
875
|
```
|
|
867
876
|
|
|
868
877
|
Available export options:
|
|
@@ -893,11 +902,13 @@ Available export options:
|
|
|
893
902
|
| `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
|
|
894
903
|
| `data-caterer` | Export to Data Caterer in YAML format | ✅ |
|
|
895
904
|
| `dcs` | Export to Data Contract Specification in YAML format | ✅ |
|
|
905
|
+
| `iceberg` | Export to an Iceberg JSON Schema Definition | partial |
|
|
896
906
|
| Missing something? | Please create an issue on GitHub | TBD |
|
|
897
907
|
|
|
908
|
+
|
|
898
909
|
#### Great Expectations
|
|
899
910
|
|
|
900
|
-
The export function transforms a specified data contract into a comprehensive Great Expectations JSON suite.
|
|
911
|
+
The `export` function transforms a specified data contract into a comprehensive Great Expectations JSON suite.
|
|
901
912
|
If the contract includes multiple models, you need to specify the names of the model you wish to export.
|
|
902
913
|
|
|
903
914
|
```shell
|
|
@@ -907,7 +918,22 @@ datacontract export datacontract.yaml --format great-expectations --model order
|
|
|
907
918
|
The export creates a list of expectations by utilizing:
|
|
908
919
|
|
|
909
920
|
- The data from the Model definition with a fixed mapping
|
|
910
|
-
- The expectations provided in the quality field for each model (find here the expectations gallery https://greatexpectations.io/expectations/)
|
|
921
|
+
- The expectations provided in the quality field for each model (find here the expectations gallery: [Great Expectations Gallery](https://greatexpectations.io/expectations/))
|
|
922
|
+
|
|
923
|
+
### Additional Arguments
|
|
924
|
+
|
|
925
|
+
To further customize the export, the following optional arguments are available:
|
|
926
|
+
|
|
927
|
+
- **`suite_name`**: The name of the expectation suite. This suite groups all generated expectations and provides a convenient identifier within Great Expectations. If not provided, a default suite name will be generated based on the model name(s).
|
|
928
|
+
|
|
929
|
+
- **`engine`**: Specifies the engine used to run Great Expectations checks. Accepted values are:
|
|
930
|
+
- `pandas` — Use this when working with in-memory data frames through the Pandas library.
|
|
931
|
+
- `spark` — Use this for working with Spark dataframes.
|
|
932
|
+
- `sql` — Use this for working with SQL databases.
|
|
933
|
+
|
|
934
|
+
- **`sql_server_type`**: Specifies the type of SQL server to connect with when `engine` is set to `sql`.
|
|
935
|
+
|
|
936
|
+
Providing `sql_server_type` ensures that the appropriate SQL dialect and connection settings are applied during the expectation validation.
|
|
911
937
|
|
|
912
938
|
#### RDF
|
|
913
939
|
|
|
@@ -1000,18 +1026,81 @@ models:
|
|
|
1000
1026
|
- **avroLogicalType**: Specifies the logical type of the field in Avro. In this example, it is `local-timestamp-micros`.
|
|
1001
1027
|
- **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`.
|
|
1002
1028
|
|
|
1029
|
+
#### Iceberg
|
|
1003
1030
|
|
|
1004
|
-
|
|
1031
|
+
Exports to an [Iceberg Table Json Schema Definition](https://iceberg.apache.org/spec/#appendix-c-json-serialization).
|
|
1032
|
+
|
|
1033
|
+
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
|
|
1034
|
+
to limit your contract export to a single model.
|
|
1005
1035
|
|
|
1036
|
+
```bash
|
|
1037
|
+
$ datacontract export --format iceberg --model orders https://datacontract.com/examples/orders-latest/datacontract.yaml --output /tmp/orders_iceberg.json
|
|
1038
|
+
|
|
1039
|
+
$ cat /tmp/orders_iceberg.json | jq '.'
|
|
1040
|
+
{
|
|
1041
|
+
"type": "struct",
|
|
1042
|
+
"fields": [
|
|
1043
|
+
{
|
|
1044
|
+
"id": 1,
|
|
1045
|
+
"name": "order_id",
|
|
1046
|
+
"type": "string",
|
|
1047
|
+
"required": true
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"id": 2,
|
|
1051
|
+
"name": "order_timestamp",
|
|
1052
|
+
"type": "timestamptz",
|
|
1053
|
+
"required": true
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
"id": 3,
|
|
1057
|
+
"name": "order_total",
|
|
1058
|
+
"type": "long",
|
|
1059
|
+
"required": true
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"id": 4,
|
|
1063
|
+
"name": "customer_id",
|
|
1064
|
+
"type": "string",
|
|
1065
|
+
"required": false
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
"id": 5,
|
|
1069
|
+
"name": "customer_email_address",
|
|
1070
|
+
"type": "string",
|
|
1071
|
+
"required": true
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
"id": 6,
|
|
1075
|
+
"name": "processed_timestamp",
|
|
1076
|
+
"type": "timestamptz",
|
|
1077
|
+
"required": true
|
|
1078
|
+
}
|
|
1079
|
+
],
|
|
1080
|
+
"schema-id": 0,
|
|
1081
|
+
"identifier-field-ids": [
|
|
1082
|
+
1
|
|
1083
|
+
]
|
|
1084
|
+
}
|
|
1006
1085
|
```
|
|
1007
|
-
Usage: datacontract import [OPTIONS]
|
|
1008
1086
|
|
|
1009
|
-
|
|
1087
|
+
### import
|
|
1088
|
+
|
|
1089
|
+
```
|
|
1090
|
+
Usage: datacontract import [OPTIONS]
|
|
1091
|
+
|
|
1092
|
+
Create a data contract from the given source location. Saves to file specified by `output` option if present, otherwise
|
|
1093
|
+
prints to stdout.
|
|
1010
1094
|
|
|
1011
1095
|
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
1012
|
-
│ * --format [sql|avro|dbt|glue|jsonschema|bigquery
|
|
1013
|
-
│ |unity|spark|iceberg]
|
|
1096
|
+
│ * --format [sql|avro|dbt|dbml|glue|jsonschema|bigquery The format of the source file. │
|
|
1097
|
+
│ |odcs|unity|spark|iceberg|parquet] [default: None] │
|
|
1014
1098
|
│ [required] │
|
|
1099
|
+
│ --output PATH Specify the file path where the Data │
|
|
1100
|
+
│ Contract will be saved. If no path is │
|
|
1101
|
+
│ provided, the output will be printed to │
|
|
1102
|
+
│ stdout. │
|
|
1103
|
+
│ [default: None] │
|
|
1015
1104
|
│ --source TEXT The path to the file or Glue Database that │
|
|
1016
1105
|
│ should be imported. │
|
|
1017
1106
|
│ [default: None] │
|
|
@@ -1041,7 +1130,8 @@ models:
|
|
|
1041
1130
|
│ empty for all tables in the file). │
|
|
1042
1131
|
│ [default: None] │
|
|
1043
1132
|
│ --iceberg-table TEXT Table name to assign to the model created │
|
|
1044
|
-
│ from the Iceberg schema.
|
|
1133
|
+
│ from the Iceberg schema. │
|
|
1134
|
+
│ [default: None] │
|
|
1045
1135
|
│ --help Show this message and exit. │
|
|
1046
1136
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
1047
1137
|
```
|
|
@@ -1050,6 +1140,8 @@ Example:
|
|
|
1050
1140
|
```bash
|
|
1051
1141
|
# Example import from SQL DDL
|
|
1052
1142
|
datacontract import --format sql --source my_ddl.sql
|
|
1143
|
+
# To save to file
|
|
1144
|
+
datacontract import --format sql --source my_ddl.sql --output datacontract.yaml
|
|
1053
1145
|
```
|
|
1054
1146
|
|
|
1055
1147
|
Available import options:
|
|
@@ -1068,6 +1160,7 @@ Available import options:
|
|
|
1068
1160
|
| `dbml` | Import from DBML models | ✅ |
|
|
1069
1161
|
| `protobuf` | Import from Protobuf schemas | TBD |
|
|
1070
1162
|
| `iceberg` | Import from an Iceberg JSON Schema Definition | partial |
|
|
1163
|
+
| `parquet` | Import from Parquet File Metadta | ✅ |
|
|
1071
1164
|
| Missing something? | Please create an issue on GitHub | TBD |
|
|
1072
1165
|
|
|
1073
1166
|
|
|
@@ -1270,6 +1363,16 @@ datacontract import --format iceberg --source ./tests/fixtures/iceberg/simple_sc
|
|
|
1270
1363
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
1271
1364
|
```
|
|
1272
1365
|
|
|
1366
|
+
Examples:
|
|
1367
|
+
|
|
1368
|
+
```
|
|
1369
|
+
# create a catalog right in the current folder
|
|
1370
|
+
datacontract catalog --output "."
|
|
1371
|
+
|
|
1372
|
+
# Create a catalog based on a filename convention
|
|
1373
|
+
datacontract catalog --files "*.odcs.yaml"
|
|
1374
|
+
```
|
|
1375
|
+
|
|
1273
1376
|
### Publish
|
|
1274
1377
|
|
|
1275
1378
|
```
|
|
@@ -1587,7 +1690,7 @@ if __name__ == "__main__":
|
|
|
1587
1690
|
Output
|
|
1588
1691
|
|
|
1589
1692
|
```yaml
|
|
1590
|
-
dataContractSpecification:
|
|
1693
|
+
dataContractSpecification: 1.1.0
|
|
1591
1694
|
id: uuid-custom
|
|
1592
1695
|
info:
|
|
1593
1696
|
title: my_custom_imported_data
|
|
@@ -194,6 +194,7 @@ A list of available extras:
|
|
|
194
194
|
| Avro Support | `pip install datacontract-cli[avro]` |
|
|
195
195
|
| Google BigQuery | `pip install datacontract-cli[bigquery]` |
|
|
196
196
|
| Databricks Integration | `pip install datacontract-cli[databricks]` |
|
|
197
|
+
| Iceberg | `pip install datacontract-cli[iceberg]` |
|
|
197
198
|
| Kafka Integration | `pip install datacontract-cli[kafka]` |
|
|
198
199
|
| PostgreSQL Integration | `pip install datacontract-cli[postgres]` |
|
|
199
200
|
| S3 Integration | `pip install datacontract-cli[s3]` |
|
|
@@ -201,6 +202,8 @@ A list of available extras:
|
|
|
201
202
|
| Microsoft SQL Server | `pip install datacontract-cli[sqlserver]` |
|
|
202
203
|
| Trino | `pip install datacontract-cli[trino]` |
|
|
203
204
|
| Dbt | `pip install datacontract-cli[dbt]` |
|
|
205
|
+
| Dbml | `pip install datacontract-cli[dbml]` |
|
|
206
|
+
| Parquet | `pip install datacontract-cli[parquet]` |
|
|
204
207
|
|
|
205
208
|
|
|
206
209
|
|
|
@@ -746,19 +749,19 @@ models:
|
|
|
746
749
|
### export
|
|
747
750
|
|
|
748
751
|
```
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
752
|
+
Usage: datacontract export [OPTIONS] [LOCATION]
|
|
753
|
+
|
|
754
|
+
Convert data contract to a specific format. Saves to file specified by `output` option if present, otherwise prints to stdout.
|
|
755
|
+
|
|
754
756
|
╭─ Arguments ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
755
757
|
│ location [LOCATION] The location (url or path) of the data contract yaml. [default: datacontract.yaml] │
|
|
756
758
|
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
757
759
|
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
758
760
|
│ * --format [jsonschema|pydantic-model|sodacl|dbt|dbt-sources|db The export format. [default: None] [required] │
|
|
759
|
-
│ t-staging-sql|odcs|rdf|avro|protobuf
|
|
760
|
-
│
|
|
761
|
-
│
|
|
761
|
+
│ t-staging-sql|odcs|odcs_v2|odcs_v3|rdf|avro|protobuf │
|
|
762
|
+
│ |great-expectations|terraform|avro-idl|sql|sql-query │
|
|
763
|
+
│ |html|go|bigquery|dbml|spark|sqlalchemy|data-caterer │
|
|
764
|
+
│ |dcs|iceberg] │
|
|
762
765
|
│ --output PATH Specify the file path where the exported data will be │
|
|
763
766
|
│ saved. If no path is provided, the output will be │
|
|
764
767
|
│ printed to stdout. │
|
|
@@ -768,6 +771,12 @@ models:
|
|
|
768
771
|
│ file to refer to a model, e.g., `orders`, or `all` │
|
|
769
772
|
│ for all models (default). │
|
|
770
773
|
│ [default: all] │
|
|
774
|
+
│ --schema TEXT The location (url or path) of the Data Contract │
|
|
775
|
+
│ Specification JSON Schema │
|
|
776
|
+
│ [default: │
|
|
777
|
+
│ https://datacontract.com/datacontract.schema.json] │
|
|
778
|
+
│ --engine TEXT [engine] The engine used for great expection run. │
|
|
779
|
+
│ [default: None] │
|
|
771
780
|
│ --help Show this message and exit. │
|
|
772
781
|
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
773
782
|
╭─ RDF Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
@@ -778,12 +787,11 @@ models:
|
|
|
778
787
|
│ detect the sql dialect via the specified servers in the data contract. │
|
|
779
788
|
│ [default: auto] │
|
|
780
789
|
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
781
|
-
|
|
782
790
|
```
|
|
783
791
|
|
|
784
792
|
```bash
|
|
785
793
|
# Example export data contract as HTML
|
|
786
|
-
datacontract export --format html
|
|
794
|
+
datacontract export --format html --output datacontract.html
|
|
787
795
|
```
|
|
788
796
|
|
|
789
797
|
Available export options:
|
|
@@ -814,11 +822,13 @@ Available export options:
|
|
|
814
822
|
| `sqlalchemy` | Export to SQLAlchemy Models | ✅ |
|
|
815
823
|
| `data-caterer` | Export to Data Caterer in YAML format | ✅ |
|
|
816
824
|
| `dcs` | Export to Data Contract Specification in YAML format | ✅ |
|
|
825
|
+
| `iceberg` | Export to an Iceberg JSON Schema Definition | partial |
|
|
817
826
|
| Missing something? | Please create an issue on GitHub | TBD |
|
|
818
827
|
|
|
828
|
+
|
|
819
829
|
#### Great Expectations
|
|
820
830
|
|
|
821
|
-
The export function transforms a specified data contract into a comprehensive Great Expectations JSON suite.
|
|
831
|
+
The `export` function transforms a specified data contract into a comprehensive Great Expectations JSON suite.
|
|
822
832
|
If the contract includes multiple models, you need to specify the names of the model you wish to export.
|
|
823
833
|
|
|
824
834
|
```shell
|
|
@@ -828,7 +838,22 @@ datacontract export datacontract.yaml --format great-expectations --model order
|
|
|
828
838
|
The export creates a list of expectations by utilizing:
|
|
829
839
|
|
|
830
840
|
- The data from the Model definition with a fixed mapping
|
|
831
|
-
- The expectations provided in the quality field for each model (find here the expectations gallery https://greatexpectations.io/expectations/)
|
|
841
|
+
- The expectations provided in the quality field for each model (find here the expectations gallery: [Great Expectations Gallery](https://greatexpectations.io/expectations/))
|
|
842
|
+
|
|
843
|
+
### Additional Arguments
|
|
844
|
+
|
|
845
|
+
To further customize the export, the following optional arguments are available:
|
|
846
|
+
|
|
847
|
+
- **`suite_name`**: The name of the expectation suite. This suite groups all generated expectations and provides a convenient identifier within Great Expectations. If not provided, a default suite name will be generated based on the model name(s).
|
|
848
|
+
|
|
849
|
+
- **`engine`**: Specifies the engine used to run Great Expectations checks. Accepted values are:
|
|
850
|
+
- `pandas` — Use this when working with in-memory data frames through the Pandas library.
|
|
851
|
+
- `spark` — Use this for working with Spark dataframes.
|
|
852
|
+
- `sql` — Use this for working with SQL databases.
|
|
853
|
+
|
|
854
|
+
- **`sql_server_type`**: Specifies the type of SQL server to connect with when `engine` is set to `sql`.
|
|
855
|
+
|
|
856
|
+
Providing `sql_server_type` ensures that the appropriate SQL dialect and connection settings are applied during the expectation validation.
|
|
832
857
|
|
|
833
858
|
#### RDF
|
|
834
859
|
|
|
@@ -921,18 +946,81 @@ models:
|
|
|
921
946
|
- **avroLogicalType**: Specifies the logical type of the field in Avro. In this example, it is `local-timestamp-micros`.
|
|
922
947
|
- **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`.
|
|
923
948
|
|
|
949
|
+
#### Iceberg
|
|
924
950
|
|
|
925
|
-
|
|
951
|
+
Exports to an [Iceberg Table Json Schema Definition](https://iceberg.apache.org/spec/#appendix-c-json-serialization).
|
|
952
|
+
|
|
953
|
+
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
|
|
954
|
+
to limit your contract export to a single model.
|
|
926
955
|
|
|
956
|
+
```bash
|
|
957
|
+
$ datacontract export --format iceberg --model orders https://datacontract.com/examples/orders-latest/datacontract.yaml --output /tmp/orders_iceberg.json
|
|
958
|
+
|
|
959
|
+
$ cat /tmp/orders_iceberg.json | jq '.'
|
|
960
|
+
{
|
|
961
|
+
"type": "struct",
|
|
962
|
+
"fields": [
|
|
963
|
+
{
|
|
964
|
+
"id": 1,
|
|
965
|
+
"name": "order_id",
|
|
966
|
+
"type": "string",
|
|
967
|
+
"required": true
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"id": 2,
|
|
971
|
+
"name": "order_timestamp",
|
|
972
|
+
"type": "timestamptz",
|
|
973
|
+
"required": true
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
"id": 3,
|
|
977
|
+
"name": "order_total",
|
|
978
|
+
"type": "long",
|
|
979
|
+
"required": true
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
"id": 4,
|
|
983
|
+
"name": "customer_id",
|
|
984
|
+
"type": "string",
|
|
985
|
+
"required": false
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"id": 5,
|
|
989
|
+
"name": "customer_email_address",
|
|
990
|
+
"type": "string",
|
|
991
|
+
"required": true
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"id": 6,
|
|
995
|
+
"name": "processed_timestamp",
|
|
996
|
+
"type": "timestamptz",
|
|
997
|
+
"required": true
|
|
998
|
+
}
|
|
999
|
+
],
|
|
1000
|
+
"schema-id": 0,
|
|
1001
|
+
"identifier-field-ids": [
|
|
1002
|
+
1
|
|
1003
|
+
]
|
|
1004
|
+
}
|
|
927
1005
|
```
|
|
928
|
-
Usage: datacontract import [OPTIONS]
|
|
929
1006
|
|
|
930
|
-
|
|
1007
|
+
### import
|
|
1008
|
+
|
|
1009
|
+
```
|
|
1010
|
+
Usage: datacontract import [OPTIONS]
|
|
1011
|
+
|
|
1012
|
+
Create a data contract from the given source location. Saves to file specified by `output` option if present, otherwise
|
|
1013
|
+
prints to stdout.
|
|
931
1014
|
|
|
932
1015
|
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
|
933
|
-
│ * --format [sql|avro|dbt|glue|jsonschema|bigquery
|
|
934
|
-
│ |unity|spark|iceberg]
|
|
1016
|
+
│ * --format [sql|avro|dbt|dbml|glue|jsonschema|bigquery The format of the source file. │
|
|
1017
|
+
│ |odcs|unity|spark|iceberg|parquet] [default: None] │
|
|
935
1018
|
│ [required] │
|
|
1019
|
+
│ --output PATH Specify the file path where the Data │
|
|
1020
|
+
│ Contract will be saved. If no path is │
|
|
1021
|
+
│ provided, the output will be printed to │
|
|
1022
|
+
│ stdout. │
|
|
1023
|
+
│ [default: None] │
|
|
936
1024
|
│ --source TEXT The path to the file or Glue Database that │
|
|
937
1025
|
│ should be imported. │
|
|
938
1026
|
│ [default: None] │
|
|
@@ -962,7 +1050,8 @@ models:
|
|
|
962
1050
|
│ empty for all tables in the file). │
|
|
963
1051
|
│ [default: None] │
|
|
964
1052
|
│ --iceberg-table TEXT Table name to assign to the model created │
|
|
965
|
-
│ from the Iceberg schema.
|
|
1053
|
+
│ from the Iceberg schema. │
|
|
1054
|
+
│ [default: None] │
|
|
966
1055
|
│ --help Show this message and exit. │
|
|
967
1056
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
968
1057
|
```
|
|
@@ -971,6 +1060,8 @@ Example:
|
|
|
971
1060
|
```bash
|
|
972
1061
|
# Example import from SQL DDL
|
|
973
1062
|
datacontract import --format sql --source my_ddl.sql
|
|
1063
|
+
# To save to file
|
|
1064
|
+
datacontract import --format sql --source my_ddl.sql --output datacontract.yaml
|
|
974
1065
|
```
|
|
975
1066
|
|
|
976
1067
|
Available import options:
|
|
@@ -989,6 +1080,7 @@ Available import options:
|
|
|
989
1080
|
| `dbml` | Import from DBML models | ✅ |
|
|
990
1081
|
| `protobuf` | Import from Protobuf schemas | TBD |
|
|
991
1082
|
| `iceberg` | Import from an Iceberg JSON Schema Definition | partial |
|
|
1083
|
+
| `parquet` | Import from Parquet File Metadta | ✅ |
|
|
992
1084
|
| Missing something? | Please create an issue on GitHub | TBD |
|
|
993
1085
|
|
|
994
1086
|
|
|
@@ -1191,6 +1283,16 @@ datacontract import --format iceberg --source ./tests/fixtures/iceberg/simple_sc
|
|
|
1191
1283
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
|
1192
1284
|
```
|
|
1193
1285
|
|
|
1286
|
+
Examples:
|
|
1287
|
+
|
|
1288
|
+
```
|
|
1289
|
+
# create a catalog right in the current folder
|
|
1290
|
+
datacontract catalog --output "."
|
|
1291
|
+
|
|
1292
|
+
# Create a catalog based on a filename convention
|
|
1293
|
+
datacontract catalog --files "*.odcs.yaml"
|
|
1294
|
+
```
|
|
1295
|
+
|
|
1194
1296
|
### Publish
|
|
1195
1297
|
|
|
1196
1298
|
```
|
|
@@ -1508,7 +1610,7 @@ if __name__ == "__main__":
|
|
|
1508
1610
|
Output
|
|
1509
1611
|
|
|
1510
1612
|
```yaml
|
|
1511
|
-
dataContractSpecification:
|
|
1613
|
+
dataContractSpecification: 1.1.0
|
|
1512
1614
|
id: uuid-custom
|
|
1513
1615
|
info:
|
|
1514
1616
|
title: my_custom_imported_data
|