Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Who agreed with this topic

Change data type of a field in schema registry

avatar
New Contributor

Is it possible to change the type of a field in the schema registry? I created a schema in the registry, and it defaulted to backward compatibility. Right after I created it, I realized I mis-labeled one of the field types as a "long" when it was supposed to be "string." So

{"name": "Emp_ID", "type": "long" }

should instead be

{ "name": "Emp_ID", "type": "string"}

Since the schema is set to backward compatibility, if I try to create a new version with the updated type, I get an error "reader type:STRING not compatible with writer type:LONG" so I'm unable to update the schema. Since there's not really a great way to delete schemas from the registry (aside from logging directly into the backing SQL database), I was hoping to be able to update the schema so it is still usable, rather than have a bunch of junk schemas that I can't use anymore.

A colleague of mine said that with the confluent schema registry, they will disable compatibility checks, publish the new schema and then re-enable the compatibility as necessary. Is there a way to do something similar with Hortonworks Schema Registry? I haven't seen any setting that would allow me to change the compatibility mode.

Thanks

Who agreed with this topic