- Newest
- Most votes
- Most comments
In Avro, adding a default value to an existing field is considered a backward-compatible change. This means that the new schema version can be read by consumers using the previous version of the schema.
Backward-compatible changes do not automatically create a new schema version in Glue. This is because the new schema is still compatible with the previous version, and consumers can continue to use the previous version without any issues.
To register the new schema version with the default value, you can use the
UpdateSchema
API operation in the AWS Glue API. This will create a new version of the schema in the registry.
Here's an example of how you can use the UpdateSchema API to create a new version:
aws glue update-schema
--schema-id '{"SchemaName": "my-schema-name", "RegistryName": "my-registry-name"}'
--schema-definition file://my-schema-definition.json
Replace "my-schema-name" , "my-registry-name" , and "my-schema-definition.json" with the appropriate values for your use case.
I'm able to reproduce this behavior that after added,"default":"default" the new schema is not successfully saved. Even if I disabled Compatibility check, the new version still failed to register. I'd try to reach out to our internal team to confirm the root cause of this. In the meanwhile, please feel free to cut a support ticket from your account to engage AWS support.
Relevant content
- asked 2 years ago
- asked 5 months ago
- AWS OFFICIALUpdated 5 years ago
- AWS OFFICIALUpdated 2 months ago

Isn't adding an entirely new field also considered a backward-compatible change too though?
The aws cli has the same behavior (attempting to register a new schema with the default value is a no-op).
(Also, the correct command appears to be
register-schema-version, notupdate-schema.)