public class StringListToCategoricalSetTransform extends BaseTransform
inputSchema| Constructor and Description |
|---|
StringListToCategoricalSetTransform(String columnName,
List<String> newColumnNames,
List<String> categoryTokens,
String delimiter) |
| Modifier and Type | Method and Description |
|---|---|
String |
columnName()
Returns a singular column name
this op is meant to run on
|
String[] |
columnNames()
Returns column names
this op is meant to run on
|
List<Writable> |
map(List<Writable> writables)
Transform a writable
in to another writable
|
Object |
map(Object input)
Transform an object
in to another object
|
Object |
mapSequence(Object sequence)
Transform a sequence
|
String |
outputColumnName()
The output column name
after the operation has been applied
|
String[] |
outputColumnNames()
The output column names
This will often be the same as the input
|
void |
setInputSchema(Schema inputSchema)
Set the input schema.
|
String |
toString() |
Schema |
transform(Schema inputSchema) |
getInputSchema, mapSequencepublic StringListToCategoricalSetTransform(String columnName, List<String> newColumnNames, List<String> categoryTokens, String delimiter)
columnName - The name of the column to convertnewColumnNames - The names of the new columns to createcategoryTokens - The possible tokens that may be present. Note this list must have the same length and order
as the newColumnNames listdelimiter - The delimiter for the Strings to convertpublic void setInputSchema(Schema inputSchema)
ColumnOpsetInputSchema in interface ColumnOpsetInputSchema in class BaseTransformpublic String toString()
toString in class BaseTransformpublic List<Writable> map(List<Writable> writables)
Transformwritables - the record to transformpublic Object map(Object input)
input - the record to transformpublic String outputColumnName()
public String[] outputColumnNames()
public String[] columnNames()
public String columnName()
Copyright © 2020. All rights reserved.