-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue adding fields to stream using JSON_SR #7707
Comments
Partial workaround: Manually register the initial schema with
This works because the existing schema uses the closed model ( That means a second evolution of the query won't work.
It's also not possible to manually update the schema again, because once |
A more complete workaround is to always manually update the schema, with each evolution, before using ksqlDB to insert data. |
And, as @mikebin suggested, it looks like having ksqlDB itself set It's worth noting there is some general confusion about how schema evolution works with the JSON schema format: confluentinc/schema-registry#1778. I found the closed vs. open model controlled by |
Describe the bug
Issue using
CREATE OR REPLACE STREAM
to add new field(s) withJSON_SR
.To Reproduce
Version: ksqlDB 6.2.0/0.17.0
Expected behavior
New schema version will be registered containing
newfield
.Actual behaviour
Failed to insert values into 'S'. Could not serialize value: [ 'a' | '1' ]. Error serializing message to topic: s. Failed to access Avro data from topic s : Schema being registered is incompatible with an earlier schema for subject "s-value"; error code: 409
Note the error message above says
Avro
, even though this is JSON Schema. That should also be corrected.Log from schema registry:
Additional context
AVRO
andPROTOBUF
. This issue only occurs withJSON_SR
"additionalProperties": false
.The text was updated successfully, but these errors were encountered: