Class 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.
    • Field Detail

      • struct

        private final String struct
        The struct ("source", "transaction") hosting the given field, or null 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 "__"
    • Constructor Detail

      • FieldReference

        private FieldReference​(String prefix,
                               String field)
    • Method Detail

      • determineStruct

        private static String determineStruct​(String simpleFieldName)
        Determines the struct hosting the given unqualified field.
      • 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)