Changelog

Custom Partitioning for Kafka Sinks is Now Generally Available

04.22.2025

Our support for custom partitioning with Kafka sinks is now generally available. This feature allows users to specify a SQL expression that computes a hash for each message, which determines what partition to assign to the message.

1
-- General syntax.
2
CREATE SINK ... INTO KAFKA CONNECTION <name> (PARTITION BY = <expression>) ...;
3

4
-- Example.
5
CREATE SINK ... INTO KAFKA CONNECTION <name> (
6
    PARTITION BY = kafka_murmur2(name || address)
7
) ...;
sql

See our full documentation for more information on configuring custom partitioning for Kafka sinks.