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
| Option | Default | Description |
|---|---|---|
--version | — | Prints the current version. |
--system-truststore | off | Verify 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-file | — | Path 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
| Command | Description |
|---|---|
init | Create an empty data contract. |
edit | Edit a data contract file in the Data Contract Editor (web UI). |
lint | Validate that the datacontract.yaml is correctly formatted. |
changelog | Show a changelog between two data contracts. |
test | Run schema and quality tests on configured servers. |
dbt | Work with data contracts in your dbt project. |
ci | Run tests for CI/CD pipelines. |
export | Convert a data contract to a target format. |
import | Create a data contract from a source format. |
catalog | Create an HTML catalog of data contracts. |
publish | Publish the data contract to Entropy Data. |
api | Start 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