Be first to try Soda's new AI-powered metrics observability, and collaborative data contracts.
Try Soda Now!
LogoLogo
  • What is Soda?
  • Quickstart
  • Data Observability
    • Metric Monitoring dashboard
      • Dataset monitors
      • Column monitors
    • Metric monitor page
  • Data Testing
    • Git-managed Data Contracts
      • Install and Configure
      • Create and Edit Contracts
      • Verify a contract
    • Cloud-managed Data Contract
      • Author a Contract in Soda Cloud
      • Verify a contract
  • Onboard datasets on Soda Cloud
  • Manage Issues
    • Organization dashboard
    • Browse Datasets
    • Dataset dashboard
    • Browse Checks
    • Check and dataset attributes
    • Analyze monitor and check results
    • Notifications
    • Incidents
  • Dataset Attributes & Responsibilities
  • Deployment options
    • Deploy Soda Agent
      • Deploy a Soda Agent in a Kubernetes cluster
      • Deploy a Soda Agent in an Amazon EKS cluster
      • Deploy a Soda Agent in an Azure AKS cluster
      • Deploy a Soda Agent in a Google GKE cluster
      • Soda Agent Extra
  • Organization and Admin Settings
    • General Settings
    • User management
    • User And User Group Management with SSO
    • Global and Dataset Roles
    • Integrations
  • Integrations
    • Alation
    • Atlan
    • Metaphor
    • Purview
    • Jira
    • ServiceNow
    • Slack
    • MS Teams
    • Webhook
  • Reference
    • Generate API keys
    • Python API
    • CLI Reference
    • Contract Language Reference
    • Data source reference for Soda Core
    • Rest API
    • Webhook API
Powered by GitBook
On this page
  • Using Soda Core
  • With variable overrides
  • Publish results to Soda Cloud
  • Using Soda Agent
  • With variable overrides
  • Publish results to Soda Cloud

Was this helpful?

Export as PDF
  1. Data Testing
  2. Git-managed Data Contracts

Verify a contract

PreviousCreate and Edit ContractsNextCloud-managed Data Contract

Last updated 5 days ago

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

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.yml --contract contract.yaml

This 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.yml --contract contract.yaml --set START_DATE=2024-05-01

Learn about variables in Data Contract:

Publish results to Soda Cloud

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

soda contract verify --data-source ds.yml --contract contract.yaml --publish --soda-cloud sc.yml

This is recommended if you want stakeholders to see the outcomes in Soda Cloud or include them in dashboards and alerting.

Using Soda Agent

Soda Agent executes verifications using data sources configured in Soda Cloud.

soda contract verify --contract contract.yaml --use-agent --soda-cloud sc.yml

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

With variable overrides

You can pass variables defined in the contract using the --set flag:

soda contract verify --contract contract.yaml --use-agent --soda-cloud sc.yml --set START_DATE=2024-05-01

Publish results to Soda Cloud

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

soda contract verify --dataset datasource/db/schema/table --publish --use-agent --soda-cloud sc.yml

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:

Connect to Soda Cloud
Make contracts dynamic with variables
Make contracts dynamic with variables