Registry / database / soda-core-postgres

soda-core-postgres

JSON →
library3.5.6pypypiunverified

Extends Soda Core to connect to PostgreSQL databases for data quality monitoring and testing. Current version 3.5.6, released on 2025-11-05. Release cadence is irregular, tied to soda-core releases.

pip install soda-core-postgres
INSTALL
IMPORT
SIG · SODA-CORE-POSTGRES
S
soda-core-postgres
databasepythonv3.5.6
Install
6.6s avg
Import
1938ms
Disk
59MB
Pass rate
10/ 10
Env Coverage10 / 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
installs and imports cleanly · install 0.0s · import 1.308s · 58.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 6.6s · import 1.018s · 62MB
59MB installed
● package 59MB
Code
Verified usage

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

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

Runs a Soda scan against a PostgreSQL table using environment variables for credentials.

from soda.scan import Scan scan = Scan() scan.set_scan_definition_name('test') scan.set_data_source_name('postgres') scan.add_configuration_yaml_str(''' data_source postgres: type: postgres host: localhost port: 5432 username: ${POSTGRES_USER} password: ${POSTGRES_PASSWORD} database: postgres ''') scan.add_sodacl_yaml_str(''' checks for dim_customer: - row_count > 0 ''') exit_code = scan.execute() print(scan.get_logs_text())
soda --version
Debug
Known issues
gotchaThe configuration file must use 'type: postgres' exactly. Using 'postgresql' or other variants will fail silently.
fix
Use 'type: postgres' in the YAML configuration.
affects: all
gotchaSoda Core requires the PostgreSQL driver (psycopg2 or asyncpg) to be installed separately. soda-core-postgres does not install it automatically.
fix
Run 'pip install psycopg2-binary' or 'pip install asyncpg' in the same environment.
affects: all
gotchaThe 'data_source' key in YAML must be lowercase; using 'data_source: Postgres' (capitalized) will be ignored.
fix
Write 'data_source postgres:' exactly as lower_snake_case.
affects: all
Upgrade
Version history
3.5.6latest on PyPI · released Sep 24, 2025
Audit
Dependencies
soda-corerequiredCore library required; soda-core-postgres is an extension.
psycopg2-binaryoptionalPostgreSQL driver; may need to pin version for compatibility.
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
soda-core-postgres — pip install soda-core-postgres · libregistry