Metadata fields
This page describes access Kafka message metadata in Lenses SQL Studio.
When running queries against Kafka, Snapshot Engine enables you to access the record metadata through the special _meta
facet.
These are the available meta fields:
Field | Description |
---|---|
| The offset of the record in its Kafka topic partition |
| The Kafka topic partition of the record |
| The Kafka record timestamp |
| The length in bytes of the raw key stored in Kafka |
| The length in bytes of the raw value stored in Kafka |
Select all the meta fields
The following query will select all the meta fields listed above:
View headers
To view the value of a specific header you can run:
Filter on record timestamp
Filter on table partition
To read records from a specific partition, the following query can be used:
Search for a record on a specific offset
Here is the query to use when the record offset and partition are known:
Get the latest N records per partition
This query will get the latest 100 records per partition (assuming the topic is not compacted):
This instead will get the latest 100 records for a given partition (again assuming the topic is not compacted):
Last updated