Skip to main content

Commands

The datacontract CLI groups its functionality into the commands below. Run datacontract --help or datacontract <command> --help at any time to see the same information in your terminal.

datacontract [OPTIONS] COMMAND [ARGS]...

Global options

OptionDefaultDescription
--versionPrints the current version.
--system-truststoreoffVerify TLS using the operating system's certificate trust store instead of the bundled CA certificates (e.g. behind a corporate proxy or internal CA).
--config-filePath to a YAML file with credentials and connection options (sections per data source, ${VAR} references resolve from the environment). Defaults to ./datacontract-config.yaml or ~/.datacontract/config.yaml if present.

Most commands additionally accept --debug for verbose logging.

Commands

CommandDescription
initCreate an empty data contract.
editEdit a data contract file in the Data Contract Editor (web UI).
lintValidate that the datacontract.yaml is correctly formatted.
changelogShow a changelog between two data contracts.
testRun schema and quality tests on configured servers.
dbtWork with data contracts in your dbt project.
ciRun tests for CI/CD pipelines.
exportConvert a data contract to a target format.
importCreate a data contract from a source format.
catalogCreate an HTML catalog of data contracts.
publishPublish the data contract to Entropy Data.
apiStart the datacontract CLI as server application with REST API.

Common usage

datacontract init datacontract.yaml
datacontract edit datacontract.yaml
datacontract lint datacontract.yaml
datacontract changelog datacontract-v1.yaml datacontract-v2.yaml
datacontract test datacontract.yaml --server production
datacontract dbt sync orders.odcs.yaml --project-dir ./warehouse
datacontract ci datacontract.yaml --output test-results.xml --output-format junit
datacontract export html datacontract.yaml --output datacontract.html
datacontract import sql --source ddl.sql --dialect postgres --output datacontract.yaml
datacontract catalog --files "**/*.yaml" --output catalog/
datacontract publish datacontract.yaml
datacontract api --port 4242 --host 0.0.0.0