Open Worm4047 opened 6 years ago
Yes I tried that, but even after using WITH clause, a new schema is created and takes over the previous schema. The new schema is from ksql data source.
Sorry, I meant: What is "the schema" for you? KSQL's internal data schema? An Avro schema? Or do you mean sth else?
My topic has avro schema. And one of the field is like : Id: 1 But when CSAS is used the schema is changed to this form: Id: {int,1}
That's exactly what I'm experiencing right now.
Scenario: You've got two topics that are populated by kafka REST and they've got the same schema. Then you've got a stream streaming the data from one topic to the other based on avro.
The data coming from kafka REST look like {"key": "value"}
, the data coming from the stream looks like {"key": {"string":"value"}}
. The reason is: KSQL transforms all fields into nullable fields which means the data structure changes.
Is there a way to configure KSQL not to treat everything as nullable, but to use exactly the schema it relies on?
Related, since if KSQL can use an existing schema then we have a workaround for this issue: https://github.com/confluentinc/ksql/issues/2427
What do you mean by "with some default schema"?
You can customize settings such as number of partitions or the replication factor via the
WITH
clause of CSAS. See https://docs.confluent.io/current/ksql/docs/developer-guide/syntax-reference.html#create-table-reserved.