Before you can define, test, or verify Git-managed data contracts, you need to install the Soda CLI and configure your environment.
This setup gives you full control over your contracts, letting you version them in Git, execute them locally or remotely, and integrate them into your CI/CD pipelines.
1. Install the Soda Core Python Package
If you haven't already, follow the Soda Core installation flow to set up your environment, set your credentials, and install the necessary Soda extensions.
2. [Optional] Connect to Soda Cloud
If you want to interact with Soda Cloud to publish contracts and view verification results, or to use Soda Agent, you’ll need to connect the CLI to your Soda Cloud account.
Don’t have an account? Book a demo to get started.
Create the config file
Run the following command:
sodacloudcreate-fsc_config.yml
This generates a basic Soda Cloud configuration file:
sc_config.yml
soda_cloud:host:cloud.soda.io##change to cloud.us.soda.io, depending on your Soda regionapi_key_id:${SODA_CLOUD_API_KEY_ID}api_key_secret:${SODA_CLOUD_API_KEY_SECRET}
Add your API keys
To add your API keys, you can do one of the following:
Avoid hardcoding secrets. Use environment variables or a secrets manager where possible.
Test the connection:
Use an existing Data Source via Soda Agent
If your data source is already connected to Soda Cloud using a Soda Agent (hosted or self-hosted), you can reuse that connection without managing credentials or configs locally.