How can I create a KSQL stream with a struct as key?
Asked
Active
Viewed 571 times
1 Answers
1
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/

Bonnie Varghese
- 2,158
- 1
- 16
- 11