Package org.apache.kafka.connect.data
Class SchemaProjector
java.lang.Object
org.apache.kafka.connect.data.SchemaProjector
SchemaProjector is utility to project a value between compatible schemas and throw exceptions when non compatible schemas are provided.
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
SchemaProjectorpublic SchemaProjector()
 
- 
- 
Method Details- 
projectpublic static Object project(Schema source, Object record, Schema target) throws SchemaProjectorException This method project a value between compatible schemas and throw exceptions when non compatible schemas are provided- Parameters:
- source- the schema used to construct the record
- record- the value to project from source schema to target schema
- target- the schema to project the record to
- Returns:
- the projected value with target schema
- Throws:
- SchemaProjectorException- if the target schema is not optional and does not have a default value
 
 
-