How can I create a KSQL stream with a struct as key?
How can I create a KSQL stream with a struct as key?
ksql> CREATE STREAM S1 (k STRUCT<k int> KEY, v VARCHAR) WITH (kafka_topic='s1', partitions=1, key_format='avro', value_format='avro');
ksql> INSERT INTO s1 (k, v) VALUES (STRUCT(k := 1), 'foo');
You can also refer the following doc for dealing with other structured data types - https://docs.ksqldb.io/en/latest/how-to-guides/query-structured-data/