v.19.11New Feature

Implement _topic, _offset, _key Columns for Kafka Engine #5382 (ivan) Note That Kafka Is Broken in This Version.

Implement _topic, _offset, _key columns for Kafka engine #5382 (Ivan) Note that Kafka is broken in this version.
Introduces the special columns _topic, _offset, and _key for the Kafka engine, enabling users to access Kafka message metadata directly in ClickHouse queries.

Why it matters

This feature provides access to Kafka message metadata such as the topic name, message offset, and message key within ClickHouse. It solves the problem of lacking visibility into Kafka internals when consuming messages, offering better data traceability and integration by exposing these important message attributes.

How to use it

When querying from a Kafka engine table, users can reference the special columns <code>_topic</code>, <code>_offset</code>, and <code>_key</code> alongside their usual data fields to retrieve the respective Kafka message metadata.