This project serves as a Proof of Concept (POC) for implementing a data contract using Soda Core. It demonstrates the orchestration and automation of tasks related to data contracts, including connecting to a Vertica database, generating a data contract, and performing checks using Soda SQL.
Why Vertica? because Vertica creates initial data when starting the container, which makes it easier to test the POC.
-
Clone the repository:
git clone https://github.com/yourusername/soda-contract-poc.git cd soda-contract-poc
-
Install dependencies:
pip install -r requirements.txt
-
Manually start the Vertica container:
docker-compose -f ./docker/docker-compose.yml up -d
If you are using Mac M1 Processor then use the following command to install Vertica container:
export DOCKER_DEFAULT_PLATFORM=linux/arm64 export DOCKER_BUILDKIT=0 docker-compose -f ./docker/docker-compose.yml up -d
Run the following command to generate a data contract and perform checks:
python scripts/main_script.py