Connect to Materialize using a Postgres-compatible client and confirm the version with SELECT mz_version().
Create a Kafka connection using CREATE CONNECTION specifying broker addresses and any required authentication options.
Define a source with CREATE SOURCE ... FROM KAFKA CONNECTION referencing the connection object and naming the topic.
Choose an envelope (NONE, UPSERT, or DEBEZIUM) that matches the upstream message format.
Create the materialized view with CREATE MATERIALIZED VIEW AS SELECT ... FROM the source, applying whatever streaming SQL transformations are needed.
Verify results with SELECT and check the view's freshness via mz_materialization_lag or similar system catalog tables.
Known gotchas
Materialize reingests data on source recreation; preserve source definitions in version control so you can recreate views without re-reading from the beginning of the topic unnecessarily.
Envelope choice is permanent for a given source; changing it requires dropping and recreating the source.
The system catalog and available SQL features evolve quickly — consult current docs rather than assuming function names or catalog table shapes.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp