Validating Data from PostgreSQL¶
This page covers PostgreSQL-specific setup for Data validation. For workflow field definitions, see Data validation configuration reference.
Prerequisites¶
- Npgsql driver on Workers (no ODBC install). Same
ssl_modeguidance as Migrating Data from PostgreSQL.
Connectivity¶
Reuse [connections.source.postgresql] Worker TOML from data migration:
Set source_platform: postgresql in the validation workflow YAML. Set ssl_mode in Worker TOML to match your PostgreSQL host’s TLS requirement (Disable, Allow, Prefer, Require, or VerifyFull).
Example workflow excerpt:
Data type mappings¶
| PostgreSQL type | Snowflake target type | Supported for validation | Notes |
|---|---|---|---|
| integer, bigint, numeric, decimal | NUMBER | Yes | |
| real, double precision | FLOAT | Yes | |
| boolean | BOOLEAN | Yes | |
| date | DATE | Yes | |
| time, timestamp types | TIME / TIMESTAMP | Yes | |
| character varying, text | VARCHAR | Yes | |
| bytea | BINARY | Yes | |
| uuid | VARCHAR | Yes | |
| json, jsonb, xml | VARIANT | No | |
| money | NUMBER | No | |
| bit, bit varying | BINARY | No | |
| point | GEOMETRY | No | |
| oid | VARCHAR | No | |
| interval, range types | VARCHAR | No | Compared as VARCHAR text |
| PostGIS geometry/geography | GEOMETRY / GEOGRAPHY | No |
Platform-specific suggestions¶
- Confirm the Worker’s
ssl_modematches your PostgreSQL host before running validation workflows; a mismatch fails connectivity, not just validation. use_copy = truespeeds up source reads on large tables; confirm your role and network allow the PostgreSQLCOPYpath.- Anti-locking: No automatic hint is added on PostgreSQL. Set
queryModifiersonly when you need custom source SQL hints. See Anti-locking and query modifiers.