{"id":10241,"library":"soda-core-redshift","title":"Soda Core Redshift","description":"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.","status":"active","version":"3.5.6","language":"python","source_language":"en","source_url":"https://github.com/sodadata/soda-core-redshift","tags":["data quality","redshift","aws","data governance","etl"],"install":[{"cmd":"pip install soda-core-redshift","lang":"bash","label":"Install Soda Core Redshift"}],"dependencies":[{"reason":"Soda Core Redshift is a driver for the main Soda Core library.","package":"soda-core","optional":false},{"reason":"Required for connecting to Redshift; typically installed as a dependency of soda-core-redshift.","package":"psycopg2-binary","optional":false}],"imports":[{"wrong":"from soda.scan import Scan","symbol":"Scan","correct":"from soda.scan import Scan"}],"quickstart":{"code":"import os\nfrom soda.scan import Scan\n\n# Configure Redshift connection details using environment variables for security\nredshift_host = os.environ.get('REDSHIFT_HOST', 'your_redshift_host.com')\nredshift_port = os.environ.get('REDSHIFT_PORT', '5439')\nredshift_database = os.environ.get('REDSHIFT_DATABASE', 'your_db_name')\nredshift_username = os.environ.get('REDSHIFT_USERNAME', 'your_username')\nredshift_password = os.environ.get('REDSHIFT_PASSWORD', 'your_password')\n\n# Define the Soda Core configuration as a string\nconfiguration_yaml = f'''\ndata_source redshift:\n  type: redshift\n  host: {redshift_host}\n  port: {redshift_port}\n  database: {redshift_database}\n  username: {redshift_username}\n  password: {redshift_password}\n'''\n\n# Define data quality checks as a string\nchecks_yaml = '''\nchecks for dim_users:\n  - row_count > 0\n  - duplicate_count(user_id) = 0\n  - missing_count(email) = 0\n'''\n\n# Initialize and execute the Soda Scan\nscan = Scan()\nscan.set_data_source_name('redshift')\nscan.add_configuration_yaml_str(configuration_yaml)\nscan.add_checks_yaml_str(checks_yaml)\n\nprint(\"Running Soda Scan...\")\nscan.execute()\n\nif scan.has_failures():\n    print(\"Scan finished with failures.\")\n    exit(1)\nelif scan.has_warnings():\n    print(\"Scan finished with warnings.\")\nelif scan.has_errors():\n    print(\"Scan finished with errors.\")\n    exit(1)\nelse:\n    print(\"Scan finished successfully.\")\n","lang":"python","description":"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."},"warnings":[{"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.","message":"Ensure `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.","severity":"gotcha","affected_versions":"All versions"},{"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.","message":"Redshift connection details (host, port, database, username, password) are sensitive. Hardcoding them in configuration files is a security risk.","severity":"gotcha","affected_versions":"All versions"},{"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.","message":"Connectivity issues to Redshift are often due to network firewalls, security groups, or incorrect database credentials/permissions.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'3.5.6':50 'allow':29 'amazon':19 'aw':71 'check':17 'connector':27 'core':2,5,12,31,63 'current':47 'cycl':57 'data':15,21,43,68,72 'enabl':14 'etl':74 'execut':39 'fetch':36 'follow':54 'frequent':66 'govern':73 'interact':33 'librari':64 'main':60 'metadata':37 'monitor':45 'necessari':26 'plugin':9 'provid':24 'qualiti':16,44,69 'queri':41 'redshift':3,6,20,35,70 'releas':56 'soda':1,4,11,30,62 'soda-cor':61 'sql':40 'typic':53 'updat':67 'version':48 'warehous':22","created_at":"2026-04-17T01:23:07.170192+00:00","updated_at":"2026-04-17T01:23:07.170192+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmp01jgfetz/venv/lib/python3.12/site-packages/soda/scan.py\", line 12, in <module>\n    from soda.common.env_helper import EnvHelper\n  File \"/tmp/tmp01jgfetz/venv/lib/python3.12/site-packages/soda/common/env_helper."},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"3.5.6","cli_name":"soda","cli_version":"soda-core, version 3.5.6","type":"library","homepage":"https://www.soda.io","github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/soda-core-redshift/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["aws","data","database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}