Class StringListToCategoricalSetTransform

    • Constructor Detail

      • StringListToCategoricalSetTransform

        public StringListToCategoricalSetTransform​(String columnName,
                                                   List<String> newColumnNames,
                                                   List<String> categoryTokens,
                                                   String delimiter)
        Parameters:
        columnName - The name of the column to convert
        newColumnNames - The names of the new columns to create
        categoryTokens - The possible tokens that may be present. Note this list must have the same length and order as the newColumnNames list
        delimiter - The delimiter for the Strings to convert
    • Method Detail

      • transform

        public Schema transform​(Schema inputSchema)
      • map

        public List<Writable> map​(List<Writable> writables)
        Description copied from interface: Transform
        Transform a writable in to another writable
        Parameters:
        writables - the record to transform
        Returns:
        the transformed writable
      • map

        public Object map​(Object input)
        Transform an object in to another object
        Parameters:
        input - the record to transform
        Returns:
        the transformed writable
      • mapSequence

        public Object mapSequence​(Object sequence)
        Transform a sequence
        Parameters:
        sequence -
      • outputColumnName

        public String outputColumnName()
        The output column name after the operation has been applied
        Returns:
        the output column name
      • outputColumnNames

        public String[] outputColumnNames()
        The output column names This will often be the same as the input
        Returns:
        the output column names
      • columnNames

        public String[] columnNames()
        Returns column names this op is meant to run on
        Returns:
      • columnName

        public String columnName()
        Returns a singular column name this op is meant to run on
        Returns: