The datacontract CLI groups its functionality into the following commands. Run datacontract --help or datacontract <command> --help at any time to see the latest usage.
| Command | Description |
|---|---|
init |
Create an empty data contract from a template. |
edit |
Edit a contract in the Data Contract Editor (web UI). |
lint |
Validate that the contract is correctly formatted. |
changelog |
Show a changelog between two contracts. |
test |
Run schema and quality tests on configured servers. |
dbt |
Generate dbt tests from a contract and run them (dbt sync). |
ci |
Run tests for CI/CD pipelines with annotations and summaries. |
export |
Convert a contract to a target format. |
import |
Create a contract from a source format. |
catalog |
Create an HTML catalog of data contracts. |
publish |
Publish a contract to Entropy Data. |
api |
Start the CLI as a web server with a REST API. |
datacontract init odcs.yaml
datacontract edit odcs.yaml
datacontract lint odcs.yaml
datacontract changelog v1.odcs.yaml v2.odcs.yaml
datacontract test odcs.yaml
datacontract dbt sync orders.odcs.yaml --project-dir ./warehouse
datacontract export html datacontract.yaml --output odcs.html
datacontract import sql --source my-ddl.sql --dialect postgres --output odcs.yaml
Most commands accept a --debug flag for verbose logging.