public static class ColumnMappers.Builder extends Object
Selectors.| Modifier and Type | Field and Description |
|---|---|
private List<ColumnMappers.MapperRule> |
rules |
private Selectors.TableIdToStringMapper |
tableIdMapper |
| Constructor and Description |
|---|
Builder(Selectors.TableIdToStringMapper tableIdMapper) |
| Modifier and Type | Method and Description |
|---|---|
ColumnMappers |
build()
|
String |
fullyQualifiedColumnDatatype(TableId tableId,
Column column) |
String |
fullyQualifiedColumnName(TableId tableId,
Column column) |
ColumnMappers.Builder |
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.
|
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.
|
ColumnMappers.Builder |
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.
|
ColumnMappers.Builder |
map(String fullyQualifiedColumnNames,
String mapperClassName)
Set a mapping function for the columns with fully-qualified names that match the given comma-separated list of regular
expression patterns.
|
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.
|
ColumnMappers.Builder |
mapByDatatype(String columnDatatypes,
ColumnMapper mapper) |
String |
mappedTableColumnDatatype(TableId tableId,
Column column) |
String |
mappedTableColumnName(TableId tableId,
Column column) |
private TableId |
mappedTableId(TableId tableId) |
ColumnMappers.Builder |
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.
|
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.
|
ColumnMappers.Builder |
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.
|
ColumnMappers.Builder |
maskStringsByHashing(String fullyQualifiedColumnNames,
String hashAlgorithm,
String salt) |
ColumnMappers.Builder |
propagateSourceTypeToSchemaParameter(String fullyQualifiedColumnNames,
String value) |
ColumnMappers.Builder |
propagateSourceTypeToSchemaParameterByDatatype(String columnDatatypes,
String value) |
ColumnMappers.Builder |
truncateStrings(String fullyQualifiedColumnNames,
int maxLength)
Truncate to a maximum length the string values for each of the columns with the fully-qualified names.
|
private final List<ColumnMappers.MapperRule> rules
private final Selectors.TableIdToStringMapper tableIdMapper
public Builder(Selectors.TableIdToStringMapper tableIdMapper)
public ColumnMappers.Builder map(String fullyQualifiedColumnNames, ColumnMapper mapper)
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 removedpublic ColumnMappers.Builder mapByDatatype(String columnDatatypes, ColumnMapper mapper)
public String fullyQualifiedColumnDatatype(TableId tableId, Column column)
public ColumnMappers.Builder map(String fullyQualifiedColumnNames, Class<ColumnMapper> mapperClass)
fullyQualifiedColumnNames - the comma-separated list of fully-qualified column names; may not be nullmapperClass - the Java class that implements BiFunction<Column, Object, Object> and that
will be used to map actual values into values used in the output record; may not be nullpublic ColumnMappers.Builder map(String fullyQualifiedColumnNames, Class<ColumnMapper> mapperClass, Configuration config)
fullyQualifiedColumnNames - the comma-separated list of fully-qualified column names; may not be nullmapperClass - the Java class that implements BiFunction<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 the ColumnMapper instance; may be nullpublic ColumnMappers.Builder truncateStrings(String fullyQualifiedColumnNames, int maxLength)
String values can be truncated.fullyQualifiedColumnNames - the comma-separated list of fully-qualified column names; may not be nullmaxLength - the maximum number of characters to appear in the valuepublic ColumnMappers.Builder maskStrings(String fullyQualifiedColumnNames, int numberOfChars)
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 valuepublic ColumnMappers.Builder maskStrings(String fullyQualifiedColumnNames, int numberOfChars, char maskChar)
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 nullpublic ColumnMappers.Builder maskStrings(String fullyQualifiedColumnNames, String maskValue)
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 nullpublic ColumnMappers.Builder maskStringsByHashing(String fullyQualifiedColumnNames, String hashAlgorithm, String salt)
public ColumnMappers.Builder propagateSourceTypeToSchemaParameter(String fullyQualifiedColumnNames, String value)
public ColumnMappers.Builder propagateSourceTypeToSchemaParameterByDatatype(String columnDatatypes, String value)
public ColumnMappers.Builder map(String fullyQualifiedColumnNames, String mapperClassName)
fullyQualifiedColumnNames - the comma-separated list of fully-qualified column names; may not be nullmapperClassName - the name of the Java class that implements BiFunction<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 removedpublic ColumnMappers.Builder map(String fullyQualifiedColumnNames, String mapperClassName, Configuration config)
fullyQualifiedColumnNames - the comma-separated list of fully-qualified column names; may not be nullmapperClassName - the name of the Java class that implements BiFunction<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 the ColumnMapper instance; may be nullpublic ColumnMappers build()
Predicate that determines whether a table identified by a given TableId is to be included.Copyright © 2021 JBoss by Red Hat. All rights reserved.