Support Questions
Find answers, ask questions, and share your expertise

Delete schema from Schema Registry

Explorer

Hi

Is is possible to delete schemas from the Schema Registry, and if not, can this functionality be added to the front end?

In my development environment I've created a bunch of old schema's I'd like to delete to avoid clutter and confusion between not-in-use schemas.

Thanks

1 ACCEPTED SOLUTION

Explorer

In schema registry (HDF-3.0), a schema is immutable & you can't delete/modify a schema.

View solution in original post

11 REPLIES 11

Explorer

In schema registry (HDF-3.0), a schema is immutable & you can't delete/modify a schema.

Explorer

The above answer is not fully correct. A schema can be modified but a schema + version appears to be immutable.

Since delete functionality does not exist - can it be added?

If a mistake is made when adding a schema then it cannot be deleted. The schema evolution compatibility prevents me from completely replacing an existing schema and I can't rename it. So instead it seems we need to create a new schema each time, and change configuration elsewhere to now use the new schema name. The old schema still appears in the list which over time becomes confusing as to which schema is correct and in use.

For example in development environments I end up with a lot of schemas which are no longer needed, eg my_schema, my_schema_1, test_my_schema, test_1, schema, working_schema .... which will cause confusion.

Super Guru

Deleting or marking invalid for schemas is a good idea, I have mentioned to the team as I would like to do so as well. I have some I created by mistake.

New Contributor

I am able to delete a schema now by going to the underlying MySQL database and deleting the relevant records.

I agree with Bjorn Olsen and Timothy Spann, ability to edit or remove mistaken schemas would be valuable. I've already messed up my sandbox by getting the forward/backward compatibility wrong on one schema, and marking others with group 'Test' and 'test' when I wanted them in the same group for example.

New Contributor

Hi,

Which is the table/records that we have to delete in order to delete all the versions of a schema ?

Is there a command available in hortonworks to delete a schema by specifying subject name ? (Confluent Schema registry command - curl -X DELETE http://localhost:8081/subjects/{subject_name}/versions/1)

I'm using hortonworks-registry-0.5.1

Explorer

@ Vino chithra Sriraman

Al ejecutar el comando se genera un error, ¿cómo puedo eliminar los esquemas que no uso?

curl -X BORRAR http: // localhost: 7788 / subject / TEST_2 / versions / 1 {"responseMessage": "Se produjo una excepción con el mensaje [Método HTTP 405 No permitido] mientras se procesaba la solicitud."}

Super Guru

it can be done with sql

The above question and the entire reply thread below was originally posted in the Community Help track. On Thu Jun 27 00:33 UTC 2019, a member of the HCC moderation staff moved it to the Data Ingestion & Streaming track. The Community Help Track is intended for questions about using the HCC site itself, not technical questions about services in HDF.

Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

New Contributor

Has any progress been made in developing a GUI to manage the Schema Registry ??? It appears many of us need the ability to Delete, Rename and otherwise manage the Schema's in the Schema Registry, I realize the brute force using SQL is a possibility but it is too error prone and clumsy which us unacceptable for a production environment. We really need a GUI that is fully supported to manage the Schema Registry entries so we can correct errors and Delete unwanted Schema's. It appears this question has not been updated in a long while so I wanted to see what is being done to resolve the issue. This doesn't sound like a heavy life for the technical team to add a little functionality to the existing Schema Registry GUI. Lets hear from the Hortonworks/Cloudera experts what the status is and when we might see a production ready solution.

New Contributor

Due the GUI still doesn't include the delete option, the workaround I'm using is to execute this curl comand:

CURL -X DELETE http://localhost:9090/api/v1/schemaregistry/schemas/<name>

 

Using the last version at this moment, hortonworks-registry-0.8.0-rc3, which includes a fix for ISSUE-574 that avoids error re-creating a previously deleted schema with the same name, works fine.

 

Hope it helps.

Regards

Marcelo.

; ;