Data Store Management
An application uses Avro schemas in AWS Glue Schema Registry with BACKWARD compatibility. A new consumer must read existing records after a field is added. How should the engineer define the new field?
Show the answer
Correct answerA. As a field with a valid default value
AWhy this is right: A valid default lets the new reader supply a value when the field is absent from older records.
BWhy not this: Older records lack the field, and the new reader has no default value to supply.
CWhy not this: Replacing an existing field with an incompatible type can prevent the new reader from reading old records.
DWhy not this: Renaming without an alias can break field resolution and does not safely implement the requested addition.
An Avro reader can use a new field's default value when older records do not contain that field. Adding a required field without a default prevents the new reader from reading those older records.