Registry / data / soda-core-snowflake

soda-core-snowflake

JSON →
library3.5.6pypypi✓ verified 21d ago

Soda Core Snowflake Connector is a plugin for Soda Core, enabling data quality monitoring and testing against Snowflake data warehouses. It extends Soda Core's capabilities to connect to and scan Snowflake databases for data quality checks. The current version is 3.5.6, and it typically releases new versions in alignment with Soda Core's release cycle.

pip install soda-core-snowflake
INSTALL
IMPORT
SIG · SODA-CORE-SNOWFLAK
S
soda-core-snowflake
datapythonv3.5.6
Install
11.9s avg
Import
1377ms
Disk
119MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.5.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 11.9s · import 0.826s · 118MB
119MB installed
● package 119MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Scan
from soda.scan import Scan
from soda.scan import Scan

This quickstart demonstrates how to programmatically connect to Snowflake using environment variables for credentials and run a simple data quality check with Soda Core. It requires `soda-core-snowflake` to be installed for the `type: snowflake` data source to be recognized.

import os from soda.scan import Scan # Configure Snowflake connection details using environment variables for security # Ensure these environment variables are set before running: # SNOWFLAKE_HOST, SNOWFLAKE_ACCOUNT, SNOWFLAKE_USERNAME, SNOWFLAKE_PASSWORD, # SNOWFLAKE_ROLE, SNOWFLAKE_WAREHOUSE, SNOWFLAKE_DATABASE, SNOWFLAKE_SCHEMA configuration_yaml_content = f""" data_source snowflake_db: type: snowflake host: {os.environ.get('SNOWFLAKE_HOST', 'your_snowflake_host.snowflakecomputing.com')} account: {os.environ.get('SNOWFLAKE_ACCOUNT', 'your_account_identifier')} username: {os.environ.get('SNOWFLAKE_USERNAME', 'your_username')} password: {os.environ.get('SNOWFLAKE_PASSWORD', 'your_password')} role: {os.environ.get('SNOWFLAKE_ROLE', 'SYSADMIN')} warehouse: {os.environ.get('SNOWFLAKE_WAREHOUSE', 'COMPUTE_WH')} database: {os.environ.get('SNOWFLAKE_DATABASE', 'SNOWFLAKE_SAMPLE_DATA')} schema: {os.environ.get('SNOWFLAKE_SCHEMA', 'TPCH_SF100')} """ # Define a simple data quality check checks_yaml_content = """ checks for snowflake_db: - row_count > 0: # Checks if the customer table in the specified schema is not empty name: Check for non-empty customer table from CUSTOMER """ # Create a Scan object from soda-core scan = Scan() scan.set_verbose(True) scan.add_configuration_yaml_str(configuration_yaml_content) scan.add_checks_yaml_str(checks_yaml_content) # Execute the scan scan.execute() # Process and print scan results if scan.has_failures(): print("\n!!! Scan completed with FAILURES !!!") else: print("\nScan completed successfully.") print("\n--- Scan Logs ---") print(scan.get_logs_text())
soda --version
Debug
Known issues
gotchaVersion compatibility between `soda-core-snowflake` and `soda-core` is critical. For example, `soda-core-snowflake==3.x.x` must be used with `soda-core==3.x.x`. Mismatched major versions often lead to runtime errors or unexpected behavior.
fix
Always install `soda-core-snowflake` and `soda-core` with matching major versions (e.g., `pip install 'soda-core>=3,<4' 'soda-core-snowflake>=3,<4'`)
affects: All versions
gotchaIncorrect or incomplete Snowflake connection parameters can cause connection failures. Common mistakes include missing `account` identifier, invalid `username`/`password`, or insufficient permissions for the specified `role`/`warehouse`/`database`/`schema`.
fix
Verify all connection parameters (host, account, username, password, role, warehouse, database, schema) are correct and that the user/role has necessary permissions. Test connection using a simple `snowflake-connector-python` script if issues persist.
affects: All versions
gotchaHardcoding sensitive credentials (username, password, account ID) directly in `configuration.yml` or Python scripts is a security risk. This can expose sensitive data in version control or logs.
fix
Use environment variables (as shown in the quickstart), a secrets management service (e.g., AWS Secrets Manager, HashiCorp Vault), or a dedicated `.env` file loaded via `python-dotenv` for managing sensitive credentials.
affects: All versions
gotchaThe `data_source` type must be correctly specified as `type: snowflake` in your `configuration.yml` (or programmatic configuration). Typographical errors or using a generic type will prevent the `soda-core-snowflake` connector from being utilized.
fix
Ensure `type: snowflake` is precisely written in your Soda Core data source configuration.
affects: All versions
Upgrade
Version history
3.5.6latest on PyPI · released Sep 24, 2025
Audit
Dependencies
soda-corerequiredThis is a plugin for Soda Core and requires 'soda-core' for its core functionality. Version compatibility (e.g., soda-core-snowflake==3.x.x requires soda-core==3.x.x) is crucial.
snowflake-connector-pythonrequiredRequired for establishing connections to Snowflake.
Agent activity
28 hits · last 30 days
node
24
OpenAI (training)
1
Resources