You can view, modify, delete, and adjust compatibility levels of a Schema. The commands for these actions are shown in the table below.

defaultChange the Schema registry compatibility globally.
getView the details of a particular schema using its name.
remove-schemaDelete a schema and its versions.
remove-versionDelete a specific version of a schema.
setChange the compatibility mode of a schema.
subjectsList all registered subjects.
writeUpdate or create a schema if it doesn’t exist.

View all schemas 

View the current schemas registered:

lenses-cli schema-registry subjects

View a schema 

Schemas can be filtered by name:

lenses-cli schema-registry get --name [TOPIC_NAME]

View schema compatibility levels 

Schema compatibility levels can be viewed and filtered by name:

lenses-cli schema-registry get --name [TOPIC_NAME] -q compatibility

Delete schemas 

Delete all versions of a schema by name:

lenses-cli schema-registry remove-schema --name [SCHEMA_NAME]

Change compatibility of a Schema 

Change the compatibility level of a schema:

lenses-cli schema-registry set --compatibility FULL --name [SCHEMA_NAME]

Register a schema 

Register a new schema for a name/subject by the command line or file:

lenses-cli schema-registry write --name [GROUP_NAME] --format AVRO --schema \
 '{"type": "record","name": "test","fields": [{"name": "field","type": "string"}]}'
Last modified: July 3, 2024