Open marcus-007 opened 2 years ago
Thanks for reporting this issue. -- I agree that the PARTITION BY payload->NAME
should imply that NAME
becomes the key, and there is no (duplicated) "value column" NAME
.
Not sure if it's related to AVRO/JSON conversion, or if it's because of the struct dereferencing payload->NAME
in the PARTITION BY
clause (or something else).
Maybe you can try to split it into multiple queries to work around the bug?
Hi @mjsax : yep i worked around this issue like you mentioned in a 2 step approach by setting the key after conversion to avro without a key first and then i reassign the keys in a second query
Describe the bug When converting the payload from a stream and topic which has the value format of json without a key, an error occurs when trying to create a stream on top with value format avro and a defined key for the stream/topic
To Reproduce Steps to reproduce the behavior, include: **1. The version of KSQL is 0.23.1
3. Any SQL statements you ran The topic data looks like this:
Step 1: Create Stream on top of topic data
Option 1: Create CSAS
Option 2: Create empty stream with insert afterwards
Expected behavior By utilizing the partition by clause i would expect that the column is created as key and no schema mismatch occurs.
Actual behaviour Schema mismatch does not allow to create streams or inserts as key column is twice in physical schema CLI Output for Option 1
CLI Output for Option 2
Additional context Add any other context about the problem here.