Prompt
how to sync Postgres to Snowflake
Latest observation
Oct 8, 2026
OpenAI APIWeb search: off
The best way to sync Postgres → Snowflake depends on whether you want:
- One-time / batch loads
- Near real-time CDC (change data capture)
- Bi-directional sync (rarely recommended)
Common approaches
1) ELT/ETL tools
Good for easiest setup.
Examples:
- Fivetran
- Airbyte
- Matillion
- Stitch
- Rivery
How it works:
- Connect Postgres as source
- Connect Snowflake as destination
- Tool handles initial full load + ongoing incremental sync
Best for:
- Minimal engineering effort
- Managed operations
- Reliable incremental updates
2) CDC with logical replication
Best for near real-time sync and more control.
Typical stack:
- Postgres logical replication / WAL
- Debezium
- Kafka / Kinesis / PubSub
- Snowpipe / Snowflake streaming ingestion
Flow:
- Postgres emits changes from WAL
- CDC tool captures inserts/updates/deletes
- Changes are landed in Snowflake
- Merge into target tables
Best for:
- Low-latency replication
- Custom pipelines
- Larger scale
3) Batch via file export
Good for simple periodic sync.
Flow:
- Export Postgres data to CSV/Parquet
- Upload to S3/GCS/Azure Blob
- Use Snowflake
COPY INTOor external tables
Best for:
- Daily/hourly loads
- Simpler architectures
- Lower cost
Recommended option by use case
- Fastest setup: Fivetran or Airbyte
- Near real-time: Debezium + Kafka + Snowflake ingestion
- Simple scheduled loads: Export files +
COPY INTO
Example: Airbyte setup
- Install Airbyte
- Add Postgres source credentials
- Add Snowflake destination credentials
- Select tables
- Choose sync mode:
- Full refresh
- Incremental
- Run initial sync
Example: Snowflake load pattern
If you stage files first:
COPY INTO my_table
FROM @my_stage
FILE_FORMAT = (TYPE = CSV FIELD_OPTIONALLY_ENCLOSED_BY = '"');
For CDC-style data, you usually:
- Load raw changes into a staging table
MERGEinto the final table
MERGE INTO target t
USING staging s
ON t.id = s.id
WHEN MATCHED AND s.op = 'UPDATE' THEN UPDATE SET ...
WHEN NOT MATCHED AND s.op = 'INSERT' THEN INSERT ...
WHEN MATCHED AND s.op = 'DELETE' THEN DELETE;
Things to watch out for
- Primary keys are important for updates/deletes
- Schema changes need handling
- Data type mapping between Postgres and Snowflake
- Deletes require CDC, not just simple batch append
- Timezone / timestamp precision differences
If you want the easiest production option
Use Fivetran or Airbyte.
If you want full control and low latency
Use CDC with Debezium.
If you want, I can give you:
- a step-by-step Airbyte setup,
- a Debezium + Snowflake architecture, or
- a Python script to sync Postgres to Snowflake.