Closed maver1ck closed 6 years ago
KSQL only accepts avro values. The keys themselves are always interpreted as strings. Do you have a use case for accessing fields within an avro encoded key?
No. I wanted to group by key. And don't know how. (whole key so it can by string)
Have you seen our documentation on https://github.com/confluentinc/ksql? It has plenty of examples for grouping by key.
@maver1ck whilst there's no support for Avro keys currently, you can use KSQL to re-key a topic (PARTITION BY
). The resulting topic will have String keys and can then be correctly used for joining, grouping, etc. This blog posts demonstrates this feature in action: https://www.confluent.io/blog/ksql-in-action-real-time-streaming-etl-from-oracle-transactional-data
Track support for avro keys in #824
Hi, I'm using KSQL for querying data where both key and value are serialized with Avro. How can I specify the format for KEY ?