Registry / aws / soda-core-redshift

soda-core-redshift

JSON →
library3.5.6pypypiunverified

Soda Core Redshift is a plugin for Soda Core that enables data quality checks against Amazon Redshift data warehouses. It provides the necessary connector to allow Soda Core to interact with Redshift, fetch metadata, and execute SQL queries for data quality monitoring. The current version is 3.5.6, and it typically follows the release cycle of the main `soda-core` library, with frequent updates.

pip install soda-core-redshift
INSTALL
IMPORT
SIG · SODA-CORE-REDSHIFT
S
soda-core-redshift
awspythonv3.5.6
Install
8.6s avg
Import
1906ms
Disk
92MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.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.10–3.910 runs
installs and imports cleanly · install 0.0s · import 1.285s · 90.5MB
glibc
py 3.10–3.910 runs
installs and imports cleanly · install 8.6s · import 1.002s · 94MB
92MB installed
● package 92MB
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 run a Soda Core scan against a Redshift data source using Python. It configures the Redshift connection details, defines a simple check for a 'dim_users' table, and executes the scan. Connection details are pulled from environment variables for secure credential management.

import os from soda.scan import Scan # Configure Redshift connection details using environment variables for security redshift_host = os.environ.get('REDSHIFT_HOST', 'your_redshift_host.com') redshift_port = os.environ.get('REDSHIFT_PORT', '5439') redshift_database = os.environ.get('REDSHIFT_DATABASE', 'your_db_name') redshift_username = os.environ.get('REDSHIFT_USERNAME', 'your_username') redshift_password = os.environ.get('REDSHIFT_PASSWORD', 'your_password') # Define the Soda Core configuration as a string configuration_yaml = f''' data_source redshift: type: redshift host: {redshift_host} port: {redshift_port} database: {redshift_database} username: {redshift_username} password: {redshift_password} ''' # Define data quality checks as a string checks_yaml = ''' checks for dim_users: - row_count > 0 - duplicate_count(user_id) = 0 - missing_count(email) = 0 ''' # Initialize and execute the Soda Scan scan = Scan() scan.set_data_source_name('redshift') scan.add_configuration_yaml_str(configuration_yaml) scan.add_checks_yaml_str(checks_yaml) print("Running Soda Scan...") scan.execute() if scan.has_failures(): print("Scan finished with failures.") exit(1) elif scan.has_warnings(): print("Scan finished with warnings.") elif scan.has_errors(): print("Scan finished with errors.") exit(1) else: print("Scan finished successfully.")
soda --version
Debug
Known issues
gotchaEnsure `soda-core` and `soda-core-redshift` versions are compatible. While minor version mismatches often work, major version mismatches can lead to unexpected behavior or errors.
fix
Always install `soda-core-redshift` and `soda-core` at compatible versions, ideally by installing `soda-core-redshift` which pulls in the correct `soda-core` version, or by keeping both up-to-date.
affects: All versions
gotchaRedshift connection details (host, port, database, username, password) are sensitive. Hardcoding them in configuration files is a security risk.
fix
Always use environment variables (e.g., `os.environ.get()` in Python) or a secrets manager to pass credentials to Soda Core, especially in production environments.
affects: All versions
gotchaConnectivity issues to Redshift are often due to network firewalls, security groups, or incorrect database credentials/permissions.
fix
Verify that your Redshift cluster is accessible from where Soda Core is running (e.g., check security groups, network ACLs). Double-check host, port, database name, username, and password. Ensure the user has appropriate permissions on the database and tables being scanned.
affects: All versions
Upgrade
Version history
3.5.6latest on PyPI · released Sep 24, 2025
Audit
Dependencies
soda-corerequiredSoda Core Redshift is a driver for the main Soda Core library.
psycopg2-binaryrequiredRequired for connecting to Redshift; typically installed as a dependency of soda-core-redshift.
Agent activity
30 hits · last 30 days
node
24
OpenAI (training)
1
Resources
soda-core-redshift — pip install soda-core-redshift · libregistry