Class ColumnMappers.Builder

    • Method Detail

      • map

        public 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.
        Parameters:
        fullyQualifiedColumnNames - the comma-separated list of fully-qualified column names; may not be null
        mapper - 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

        public String fullyQualifiedColumnName​(TableId tableId,
                                               Column column)
      • mappedTableColumnName

        public String mappedTableColumnName​(TableId tableId,
                                            Column column)
      • fullyQualifiedColumnDatatype

        public String fullyQualifiedColumnDatatype​(TableId tableId,
                                                   Column column)
      • mappedTableColumnDatatype

        public String mappedTableColumnDatatype​(TableId tableId,
                                                Column column)
      • map

        public 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.
        Parameters:
        fullyQualifiedColumnNames - the comma-separated list of fully-qualified column names; may not be null
        mapperClass - 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 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 null
        mapperClass - 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 null
        config - the configuration to pass to the ColumnMapper instance; may be null
        Returns:
        this object so that methods can be chained together; never null
      • truncateStrings

        public 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. Only columns String values can be truncated.
        Parameters:
        fullyQualifiedColumnNames - the comma-separated list of fully-qualified column names; may not be null
        maxLength - the maximum number of characters to appear in the value
        Returns:
        this object so that methods can be chained together; never null
      • maskStrings

        public 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.
        Parameters:
        fullyQualifiedColumnNames - the comma-separated list of fully-qualified column names; may not be null
        numberOfChars - 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 null
        numberOfChars - the number of mask characters to be used in the mask value
        maskChar - the character to be used; may not be null
        Returns:
        this object so that methods can be chained together; never null
      • maskStrings

        public 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.
        Parameters:
        fullyQualifiedColumnNames - the comma-separated list of fully-qualified column names; may not be null
        maskValue - 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
      • propagateSourceTypeToSchemaParameterByDatatype

        public ColumnMappers.Builder propagateSourceTypeToSchemaParameterByDatatype​(String columnDatatypes,
                                                                                    String value)
      • map

        public 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.
        Parameters:
        fullyQualifiedColumnNames - the comma-separated list of fully-qualified column names; may not be null
        mapperClassName - 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 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 null
        mapperClassName - 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 removed
        config - the configuration to pass to the ColumnMapper instance; may be null
        Returns:
        this object so that methods can be chained together; never null
      • build

        public ColumnMappers build()
        Build the Predicate that determines whether a table identified by a given TableId is to be included.
        Returns:
        the table selection predicate; never null