Package org.apache.kafka.connect.data
Class SchemaProjector
- java.lang.Object
-
- org.apache.kafka.connect.data.SchemaProjector
-
public class SchemaProjector extends Object
SchemaProjector is utility to project a value between compatible schemas and throw exceptions when non compatible schemas are provided.
-
-
Constructor Summary
Constructors Constructor Description SchemaProjector()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
project(Schema source, Object record, Schema target)
This method project a value between compatible schemas and throw exceptions when non compatible schemas are provided
-
-
-
Method Detail
-
project
public 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 recordrecord
- the value to project from source schema to target schematarget
- the schema to project the record to- Returns:
- the projected value with target schema
- Throws:
SchemaProjectorException
-
-