Open-source Python CLI for ODCS data contracts: lint, test data sources, export to many formats.
100K+
The Data Contract CLI is an open-source command-line tool for working with data contracts. It natively supports the Open Data Contract Standard (ODCS) to lint data contracts, connect to data sources and execute schema and quality tests, and export to different formats. It can be used as a standalone CLI tool, in a CI/CD pipeline, as a REST API server, or directly as a Python library.
Mount your working directory to /home/datacontract:
docker run --rm -v "${PWD}:/home/datacontract" datacontract/cli init datacontract.yaml
docker run --rm -v "${PWD}:/home/datacontract" datacontract/cli lint datacontract.yaml
docker run --rm -v "${PWD}:/home/datacontract" datacontract/cli test datacontract.yaml
Create an alias to use it like a local install:
alias datacontract='docker run --rm -v "${PWD}:/home/datacontract" datacontract/cli:latest'
Credentials for your data sources are passed as environment variables, for example -e DATACONTRACT_SNOWFLAKE_USERNAME=... -e DATACONTRACT_SNOWFLAKE_PASSWORD=.... See the documentation for each server type.
The output of Docker is limited to 80 columns and may include line breaks. Use the --output option instead of piping to files when you export code.
Run the CLI as a web server for testing, linting, and exporting, for example as the test backend of the Data Contract Editor:
docker run --rm -p 4242:4242 datacontract/cli api --host 0.0.0.0
Then open http://localhost:4242 for the OpenAPI documentation. See API.
Maintained by Entropy Data.
Content type
Image
Digest
sha256:4b8392dd6…
Size
297.1 MB
Last updated
13 days ago
docker pull datacontract/cliPulls:
1,812
Last week