Verify a contract
Last updated
Was this helpful?
Last updated
Was this helpful?
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 Agent – run verifications remotely using an agent 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
Soda Core runs the verification locally, connecting to your data source using the defined data source configuration file.
This command:
Connects to your database using the local config
Loads the contract
Runs all checks and returns a pass/fail result
You can pass variables defined in the contract using the --set
flag:
Learn about variables in Data Contract:
To send verification results to Soda Cloud for visibility and reporting.
Add the flag --publish
to the command.
This action requires the "Manage contract" permission on the dataset; the user is identified based on the API key provided in the Soda Cloud configuration.
Learn more about permissions here: Dataset Attributes & Responsibilities
This is recommended if you want stakeholders to see the outcomes in Soda Cloud or include them in dashboards and alerting.
Soda Agent executes verifications using data sources configured in Soda Cloud.
This setup:
Runs verifications through the Soda Agent connected to your data source
Fetches the published contract from Soda Cloud
Returns the result locally in the CLI
You can pass variables defined in the contract using the --set
flag:
You can also push results to Soda Cloud from the agent-based run.
Add the flag --publish
to the command.
This action requires the "Manage contract" permission on the dataset; the user is identified based on the API key provided in the Soda Cloud configuration.
Learn more about permissions here: Dataset Attributes & Responsibilities
This is recommended if you want stakeholders to see the outcomes in the Soda Cloud or include them in dashboards and alerting.
Learn how to connect the CLI to Soda Cloud:
Learn about variables in Data Contract: