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
  • Run a dry test (Contract Validation)
  • Publish the Contract

Was this helpful?

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

Create and Edit Contracts

With Git-managed contracts, you define your expectations as code using YAML. This gives you full control over how your data is validated, and allows you to manage contracts just like any other code artifact: versioned, tested, and deployed via Git.

To learn all about the structure and supported features, refer to the full specification in the Contract Language Reference

The contract structure includes:

  • Dataset and column structure

  • Available check types (missing, invalid, duplicate, freshness, etc.)

  • Filters (dataset-level and check-level)

  • Threshold configuration

  • Use of variables

  • Scheduling

  • ...and more

Run a dry test (Contract Validation)

Before publishing or verifying your contract, you can run a dry test to ensure the contract is correctly defined and points to a valid dataset.

soda contract test --data-source ds.yml --contract contract.yaml

This will:

  • Validate the YAML syntax

  • Confirm that the referenced dataset exists

  • Check for any issues with variables, filters, or structure

Run this as part of your development workflow or CI to catch errors early.

Publish the Contract

If you have Soda Cloud, once your contract is finalized and tested, you can publish it to Soda Cloud, making it the authoritative version for verification and scheduling.

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 publish --contract contract.yaml --soda-cloud sc.yml

Publishing:

  • Uploads the contract to Soda Cloud

  • Makes it available for manual, scheduled, or programmatic verifications

  • Enables visibility and collaboration through the UI

Once published, the contract becomes the source of truth for the dataset until a new version is published.

You’re now ready to start verifying your contract and monitoring your data.

PreviousInstall and ConfigureNextVerify a contract

Last updated 5 days ago

Was this helpful?

Learn how to connect the CLI to Soda Cloud:

Connect to Soda Cloud