Write SodaCL checks and invoke a programmatic Soda v3 scan from within a Python pipeline

domain: docs.soda.io · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install soda-core along with the warehouse-specific package (e.g., soda-core-snowflake, soda-core-bigquery); create a configuration YAML file with your data source connection details and optionally a Soda Cloud API key pair
  2. Write checks in a SodaCL file using built-in metrics such as 'row_count > 0', 'missing_percent(email) < 1%', or 'duplicate_count(order_id) = 0'; SodaCL supports over 25 built-in metrics and custom SQL expressions
  3. Invoke the scan programmatically using the Soda Library Python API: instantiate a Scan object, call scan.set_data_source_name(), scan.add_configuration_yaml_file(), scan.add_sodacl_yaml_file(), then scan.execute()
  4. Inspect results via scan.get_scan_results_json() or scan.assert_no_checks_fail() which raises SodaScanError if any check fails; use this in CI/CD pipelines to block deployments on data quality failures
  5. To push results to Soda Cloud for trend tracking, include the cloud_api_key_id and cloud_api_key_secret in configuration YAML; Soda Cloud stores historical scan results and supports alert notifications

Known gotchas

Related routes

Write SodaCL checks and run a Soda Core scan against a warehouse table
data-engineering · 5 steps · unrated
Trigger a Soda Cloud scan via the API and poll for scan completion
docs.soda.io · 5 steps · unrated
Soda Core data quality scan
docs.soda.io · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans