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
  • Install the Soda CLI
  • Connect to Soda Cloud (optional)
  • Create the config file
  • Add your API keys
  • Test the connection
  • Configure Your Data Source
  • Connect with Soda Core
  • Use an existing Data Source via Soda Agent

Was this helpful?

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

Install and Configure

PreviousGit-managed Data ContractsNextCreate and Edit Contracts

Last updated 5 days ago

Was this helpful?

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.

Install the Soda CLI

Install the Soda Library using pip:

pip install -i https://pypi.dev.sodadata.io "soda-core>=4.0.0.dev1" -U

Connect to Soda Cloud (optional)

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? to get started.

Create the config file

soda cloud create -f sc.yml

This generates a basic Soda Cloud configuration file.

Add your API keys

Open sc.yml and fill in your API key and organization details.

Learn more about how to generate keys: Generate API keys

Test the connection

soda cloud test -sc sc.yml

This ensures the CLI can authenticate and communicate with Soda Cloud.

Configure Your Data Source

To verify a contract, Soda needs to know how to connect to your data source. You have two options:

Connect with Soda Core

If you prefer to define your own connection locally (or aren’t using a Soda Agent), you can create a data source config file for Soda Core.

Install the required package for your data source. For example, for PostgreSQL:

pip install -i https://pypi.dev.sodadata.io "soda-postgres>=4.0.0.dev1" -U

See the Data source reference for Soda Core for supported packages and configurations.

Create the config file

soda data-source create -f ds.yml

Open sc.yml and provide the necessary credentials

For example with PostgreSQL:

type: postgres;
name: postgres_d;
connection: host: localhost;
port: 5432;
user: soda;
password: database: default_db;

Refer to the Data source reference for Soda Core for the configurations of each data source type.

Avoid hardcoding secrets. Use environment variables or a secrets manager where possible.

Test the connection:

soda data-source test -ds ds.yml

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.

You just need to ensure you have set up the connection with Soda Cloud.


Choose the method that best fits your setup:

Use Soda Agent for a centralized, cloud-managed connection, or local configuration if you want full control within your environment.

Sign up here