Ensure you have an existing Kafka connection object and, if using Avro, a schema registry connection.
Run CREATE SINK <sink_name> IN CLUSTER <cluster_name> FROM <view_or_source> INTO KAFKA CONNECTION <conn> (TOPIC '<output_topic>') FORMAT AVRO USING CONFLUENT SCHEMA REGISTRY CONNECTION <sr_conn> ENVELOPE DEBEZIUM.
Specify the cluster that will power the sink; sinks require a dedicated or shared compute cluster.
Monitor sink progress using the mz_sink_statistics or mz_sinks system catalog views.
Consume the output topic with a standard Kafka consumer to verify that inserts and retractions are emitted correctly.
Drop and recreate the sink if you change the upstream view schema, as sinks do not auto-adapt to schema changes.
Known gotchas
Materialize sinks emit a DEBEZIUM-envelope diff stream by default; downstream consumers must understand before/after semantics and cannot treat the topic as a simple append log.
The output topic must either not exist or be configurable by Materialize; pre-existing topics with incompatible partition counts can cause errors.
Sink lag metrics are in the system catalog; set up monitoring before relying on the sink for downstream SLAs.
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