Expand description
Autonomous schema evolution
Automatically detects schema changes from ingested events and manages
schema evolution without manual intervention. Works alongside the existing
SchemaRegistry to:
- Infer schemas from event payloads on first ingestion of a new event type
- Detect drift when new events have fields not in the registered schema
- Auto-register backward-compatible schema versions (new optional fields)
- Flag breaking changes that require manual review (type changes, removed required fields)
§How it works
On each event ingestion, the SchemaEvolutionManager compares the event’s
payload structure against the latest registered schema for that event type.
If differences are detected:
- New optional fields → auto-registered as a new schema version
- Type changes or missing required fields → flagged as breaking, not auto-registered
§Limitations
- Only analyzes top-level and one level of nested fields
- Type inference is basic: string, number, boolean, array, object, null
- Does not handle polymorphic types (field sometimes string, sometimes number)
- No automatic data migration — schemas describe shape, don’t transform data
Structs§
- Evolution
Record - A record of a schema evolution event
- Field
Schema - An inferred field schema
- Field
Type Change - A field type change (potential breaking change)
- Inferred
Schema - Schema shape inferred from a payload
- Schema
Diff - Diff between two schemas
- Schema
Evolution Manager - Schema evolution manager — tracks inferred schemas and evolution history
- Schema
Evolution Stats - Schema evolution statistics
Enums§
- Evolution
Action - Schema evolution event types
- Inferred
Type - Inferred JSON type for a field
Functions§
- compute_
diff - Compute the diff between an existing schema and a new payload’s inferred schema
- infer_
schema - Infer a schema shape from a JSON payload
- to_
json_ schema - Convert an inferred schema to a JSON Schema document