Interface ColumnMapper

All Known Implementing Classes:
MaskStrings, PropagateSourceTypeToSchemaParameter, TruncateStrings
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ColumnMapper
A factory for a function used to map values of a column.
Author:
Randall Hauch
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    alterFieldSchema(Column column, org.apache.kafka.connect.data.SchemaBuilder schemaBuilder)
    Optionally annotate the schema with properties to better capture the mapping behavior.
    create(Column column)
    Create for the given column a function that maps values.
    default void
    Initialize the ColumnMapper instance based upon the connector's configuration.
  • Method Details

    • initialize

      default void initialize(Configuration config)
      Initialize the ColumnMapper instance based upon the connector's configuration.
      Parameters:
      config - the connector's configuration
    • create

      ValueConverter create(Column column)
      Create for the given column a function that maps values.
      Parameters:
      column - the column description; never null
      Returns:
      the function that converts the value; may be null
    • alterFieldSchema

      default void alterFieldSchema(Column column, org.apache.kafka.connect.data.SchemaBuilder schemaBuilder)
      Optionally annotate the schema with properties to better capture the mapping behavior.
      Parameters:
      column - the column definition; never null
      schemaBuilder - the builder for the Field's schema; never null