Verify a contract
Once your contract is authored and published (or available locally), you can verify whether the actual data complies with the defined expectations. Soda provides two execution options:
Soda Core – run verifications locally, typically in CI/CD pipelines or dev environments.
Soda Runner – run verifications remotely using a runner deployed in your environment, triggered via Soda Cloud.
Both approaches support variable overrides, publishing results to Soda Cloud, and integration into automated workflows.
Learn more about Deployment options
Using Soda Core
Soda Core runs the verification locally, connecting to your data source using the defined data source configuration file.
soda contract verify --data-source ds_config.yml --contract contract.yamlThis command:
Connects to your database using the local config
Loads the contract
Runs all checks and returns a pass/fail result
With variable overrides
You can pass variables defined in the contract using the --set flag:
soda contract verify --data-source ds_config.yml --contract contract.yaml --set START_DATE=2024-05-01Learn about variables in Data Contract: Make contracts dynamic with variables
Publish results to Soda Cloud
To send verification results to Soda Cloud for visibility and reporting.
Add the flag --publish to the command.
Learn how to connect the CLI to Soda Cloud: Connect to Soda Cloud
This is recommended if you want stakeholders to see the outcomes in Soda Cloud or include them in dashboards and alerting.
Run a subset of checks
Use --check-filter (or -cf) to run only specific checks from your contract. Each filter is a key=value expression that matches checks by their properties such as type, column, name, or custom attributes.
Write a filter as key!=value to leave out the checks that match it instead:
You can also use --check-paths (or -cp) to select checks by their YAML path.
Learn more about check filters, check paths, wildcards, and combinations in the CLI reference.
Using Soda Runner
Soda Runner executes verifications using data sources configured in Soda Cloud.
This setup:
Runs verifications through the Soda Runner connected to your data source
Fetches the published contract from Soda Cloud
Returns the result locally in the CLI
With variable overrides
You can pass variables defined in the contract using the --set flag:
Learn about variables in Data Contract: Make contracts dynamic with variables
Publish results to Soda Cloud
You can also push results to Soda Cloud from the runner-based run.
Add the flag --publish to the command.
This is recommended if you want stakeholders to see the outcomes in the Soda Cloud or include them in dashboards and alerting.
Last updated
Was this helpful?
