This worked for me, thank you for the help!
Andrew Greer
-----Original Message-----
From: Daniel Hinojosa < dhinojosa@evolutionnext.com >
Sent: Tuesday, August 10, 2021 2:33 PM
To: users@kafka.apache.org
Subject: [EXTERNAL]Re: KSQLdb Stream, Getting Topic Key
CAUTION:This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
I had to verify myself, I wrote an example that uses a key that is not in the payload and I did where I specify the KEY and now it is a field. Notice the state down below
CREATE STREAM my_avro_orders (total BIGINT, shipping VARCHAR, state VARCHAR KEY, discount DOUBLE, gender VARCHAR) WITH (kafka_topic='my_avro_orders', value_format='AVRO');
This came out as the following with a describe:
ksql> describe my_avro_orders;
Name : MY_AVRO_ORDERS
Field | Type
-----------------------------------
...