Avro Schema
An Avro schema uses JSON to define the field names, types, and default values of records; it travels with the data or is pre-registered, and is the metadata of Avro serialization.
Purpose
To provide a type description for Avro serialization, making data self-describing or matched against a pre-registered schema, and supporting schema evolution.
Mechanism
The schema is a JSON object: type=record, with a fields array containing name, type (scalar/complex/union), and default. A union is expressed as an array to allow nullability. Evolution allows adding optional fields and removing fields that have defaults.
Use cases
- Kafka message schemas
- Hadoop data serialization
- Schema Registry