Changelog

EXCLUDE COLUMNS from PostgreSQL sources

11.10.2025

Materialize now supports excluding specific columns when ingesting data from PostgreSQL sources. This feature allows you to:

  • Skip columns with unsupported data types
  • Reduce hydration times by ignoring unnecessary columns

Example

Suppose you have an upstream PostgreSQL table t, with columns a and b. You can exclude column a during ingestion:

1
CREATE SOURCE mz_source 
2
FROM POSTGRES CONNECTION pg_conn (PUBLICATION 'mz_source', EXCLUDE COLUMNS (t.a))
3
FOR ALL TABLES;
sql

To validate that column a was excluded:

1
SELECT * FROM t; -- Will return only one column, b
sql

For more information and additional examples, see our PostgresQL source documentation.