Data Contract CLI

The datacontract CLI is an open-source command-line tool for working with data contracts. It uses data contract YAML files as Data Contract Specification or ODCS 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.

Data Contract CLI fully integrated with Data Mesh Manager and Data Contract Manager.

API Key

Define your API Key as environment variable.

EXPORT DATAMESH_MANAGER_API_KEY=xxx

Publish Test Results

You can use the data contract URL to retrieve the current Data Contract to test.

If you append the --publish option, the test results are uploaded to Data Mesh Manager.

datacontract test command

datacontract test https://app.datamesh-manager.com/your-organization/datacontracts/your-datacontract-id \
                    --server dataproduct/outputport \
                    --publish https://api.datamesh-manager.com/api/test-results