Package io.debezium.transforms
Class ExtractNewRecordState.FieldReference
- java.lang.Object
-
- io.debezium.transforms.ExtractNewRecordState.FieldReference
-
- Enclosing class:
- ExtractNewRecordState<R extends org.apache.kafka.connect.connector.ConnectRecord<R>>
private static class ExtractNewRecordState.FieldReference extends Object
Represents a field that should be added to the outgoing record as a header attribute or struct field.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
FieldReference(String prefix, String field)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static String
determineStruct(String simpleFieldName)
Determines the struct hosting the given unqualified field.(package private) static List<ExtractNewRecordState.FieldReference>
fromConfiguration(String fieldPrefix, String addHeadersConfig)
String
getNewField()
(package private) org.apache.kafka.connect.data.Schema
getSchema(org.apache.kafka.connect.data.Schema originalRecordSchema)
(package private) Object
getValue(org.apache.kafka.connect.data.Struct originalRecordValue)
-
-
-
Field Detail
-
struct
private final String struct
The struct ("source", "transaction") hosting the given field, ornull
for "op" and "ts_ms".
-
field
private final String field
The simple field name.
-
newField
private final String newField
The name for the outgoing attribute/field, e.g. "__op" or "__source_ts_ms" when the prefix is "__"
-
-
Method Detail
-
determineStruct
private static String determineStruct(String simpleFieldName)
Determines the struct hosting the given unqualified field.
-
fromConfiguration
static List<ExtractNewRecordState.FieldReference> fromConfiguration(String fieldPrefix, String addHeadersConfig)
-
getNewField
public String getNewField()
-
getValue
Object getValue(org.apache.kafka.connect.data.Struct originalRecordValue)
-
getSchema
org.apache.kafka.connect.data.Schema getSchema(org.apache.kafka.connect.data.Schema originalRecordSchema)
-
-