Package io.debezium.relational.mapping
Class ColumnMappers.Builder
java.lang.Object
io.debezium.relational.mapping.ColumnMappers.Builder
- Enclosing class:
- ColumnMappers
A builder of
Selectors.- Author:
- Randall Hauch
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<ColumnMappers.MapperRule>private final Selectors.TableIdToStringMapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()fullyQualifiedColumnDatatype(TableId tableId, Column column) fullyQualifiedColumnName(TableId tableId, Column column) map(String fullyQualifiedColumnNames, ColumnMapper mapper) Set a mapping function for the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.map(String fullyQualifiedColumnNames, Class<ColumnMapper> mapperClass) Set a mapping function for the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.map(String fullyQualifiedColumnNames, Class<ColumnMapper> mapperClass, Configuration config) Set a mapping function for the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.Set a mapping function for the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.map(String fullyQualifiedColumnNames, String mapperClassName, Configuration config) Set a mapping function for the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.mapByDatatype(String columnDatatypes, ColumnMapper mapper) mappedTableColumnDatatype(TableId tableId, Column column) mappedTableColumnName(TableId tableId, Column column) private TableIdmappedTableId(TableId tableId) maskStrings(String fullyQualifiedColumnNames, int numberOfChars) Use a string of the specified number of '*' characters to mask the string values for each of the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.maskStrings(String fullyQualifiedColumnNames, int numberOfChars, char maskChar) Use a string of the specified number of characters to mask the string values for each of the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.maskStrings(String fullyQualifiedColumnNames, String maskValue) Use the specified string to mask the string values for each of the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.maskStringsByHashing(String fullyQualifiedColumnNames, String hashAlgorithm, String salt) maskStringsByHashingV2(String fullyQualifiedColumnNames, String hashAlgorithm, String salt) propagateSourceTypeToSchemaParameter(String fullyQualifiedColumnNames, String value) propagateSourceTypeToSchemaParameterByDatatype(String columnDatatypes, String value) truncateStrings(String fullyQualifiedColumnNames, int maxLength) Truncate to a maximum length the string values for each of the columns with the fully-qualified names.
-
Field Details
-
rules
-
tableIdMapper
-
-
Constructor Details
-
Builder
-
-
Method Details
-
map
Set a mapping function for the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.- Parameters:
fullyQualifiedColumnNames- the comma-separated list of fully-qualified column names; may not be nullmapper- the column mapping function that will be used to map actual values into values used in the output record; null if an existing mapping function should be removed- Returns:
- this object so that methods can be chained together; never null
-
fullyQualifiedColumnName
-
mappedTableColumnName
-
mapByDatatype
-
fullyQualifiedColumnDatatype
-
mappedTableColumnDatatype
-
map
Set a mapping function for the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.- Parameters:
fullyQualifiedColumnNames- the comma-separated list of fully-qualified column names; may not be nullmapperClass- the Java class that implementsBiFunction<Column, Object, Object>and that will be used to map actual values into values used in the output record; may not be null- Returns:
- this object so that methods can be chained together; never null
-
map
public ColumnMappers.Builder map(String fullyQualifiedColumnNames, Class<ColumnMapper> mapperClass, Configuration config) Set a mapping function for the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.- Parameters:
fullyQualifiedColumnNames- the comma-separated list of fully-qualified column names; may not be nullmapperClass- the Java class that implementsBiFunction<Column, Object, Object>and that will be used to map actual values into values used in the output record; may not be nullconfig- the configuration to pass to theColumnMapperinstance; may be null- Returns:
- this object so that methods can be chained together; never null
-
truncateStrings
Truncate to a maximum length the string values for each of the columns with the fully-qualified names. Only columnsStringvalues can be truncated.- Parameters:
fullyQualifiedColumnNames- the comma-separated list of fully-qualified column names; may not be nullmaxLength- the maximum number of characters to appear in the value- Returns:
- this object so that methods can be chained together; never null
-
maskStrings
Use a string of the specified number of '*' characters to mask the string values for each of the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.- Parameters:
fullyQualifiedColumnNames- the comma-separated list of fully-qualified column names; may not be nullnumberOfChars- the number of mask characters to be used in the mask value- Returns:
- this object so that methods can be chained together; never null
-
maskStrings
public ColumnMappers.Builder maskStrings(String fullyQualifiedColumnNames, int numberOfChars, char maskChar) Use a string of the specified number of characters to mask the string values for each of the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.- Parameters:
fullyQualifiedColumnNames- the comma-separated list of fully-qualified column names; may not be nullnumberOfChars- the number of mask characters to be used in the mask valuemaskChar- the character to be used; may not be null- Returns:
- this object so that methods can be chained together; never null
-
maskStrings
Use the specified string to mask the string values for each of the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.- Parameters:
fullyQualifiedColumnNames- the comma-separated list of fully-qualified column names; may not be nullmaskValue- the value to be used in place of the actual value; may not be null- Returns:
- this object so that methods can be chained together; never null
-
maskStringsByHashing
public ColumnMappers.Builder maskStringsByHashing(String fullyQualifiedColumnNames, String hashAlgorithm, String salt) -
maskStringsByHashingV2
public ColumnMappers.Builder maskStringsByHashingV2(String fullyQualifiedColumnNames, String hashAlgorithm, String salt) -
propagateSourceTypeToSchemaParameter
public ColumnMappers.Builder propagateSourceTypeToSchemaParameter(String fullyQualifiedColumnNames, String value) -
propagateSourceTypeToSchemaParameterByDatatype
public ColumnMappers.Builder propagateSourceTypeToSchemaParameterByDatatype(String columnDatatypes, String value) -
map
Set a mapping function for the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.- Parameters:
fullyQualifiedColumnNames- the comma-separated list of fully-qualified column names; may not be nullmapperClassName- the name of the Java class that implementsBiFunction<Column, Object, Object>and that will be used to map actual values into values used in the output record; null if an existing mapping function should be removed- Returns:
- this object so that methods can be chained together; never null
-
map
public ColumnMappers.Builder map(String fullyQualifiedColumnNames, String mapperClassName, Configuration config) Set a mapping function for the columns with fully-qualified names that match the given comma-separated list of regular expression patterns.- Parameters:
fullyQualifiedColumnNames- the comma-separated list of fully-qualified column names; may not be nullmapperClassName- the name of the Java class that implementsBiFunction<Column, Object, Object>and that will be used to map actual values into values used in the output record; null if an existing mapping function should be removedconfig- the configuration to pass to theColumnMapperinstance; may be null- Returns:
- this object so that methods can be chained together; never null
-
build
Build thePredicatethat determines whether a table identified by a givenTableIdis to be included.- Returns:
- the table selection predicate; never null
-
mappedTableId
-