Hi, i'm streaming from Kafka and would like to hav...
# general
k
Hi, i'm streaming from Kafka and would like to have a way to uniquely identify messages. In Kafka consumer, I can do that with offset. Is it possible to expose Kafka metadata such as offset/timestamp to Pinot clients?
m
I suppose you could write a transform function that reads that metadata and populates columns in Pinot schema.
x
actually I found it’s a good ask which can be part as a hidden column for msg consumed from kafka
m
@User is there an example for reading that metadata? Not sure what the available fields are.
k
This is an amazing idea and easy to add as part of Kafka decoder
@User this is not available as part of the data which means transform function cannot be do this. What we need is Kafka decoder to read this metadata and add it to generic row.. we already have access to this and use it for checkpointing.. should be easy to add this.. very good beginner task
m
@User is $docId guranteed to be unique in a table?
Hmm doesn’t look like it
It’s only unique within a segment
I am new to this community and the code base. If you can give me some pointers, I may help add this to the decoder
m
Thanks @User, I suspected as much, but wasn't sure.
@User Thanks for the offer, yes it would be great if you can help. We can provide you pointers.
n
m
Thakns @User
n
if you look at the fetchMessages method, you’ll see we have access to the message, and the offset.
offsets are already being pulled up all the way to the decoder. You can fetch whatever else you need.
m
@User let me take a look