| Modifier and Type | Method and Description |
|---|---|
static void |
convertType(String directiveName,
Row row,
String column,
String toType,
Integer scale,
RoundingMode roundingMode)
Converts the column type into another type.
|
static io.cdap.cdap.api.data.schema.Schema |
getSchemaForType(String type,
Integer scale) |
static void |
rename(String directiveName,
Row row,
String column,
String toName)
Renames a column.
|
public static void rename(String directiveName, Row row, String column, String toName) throws DirectiveExecutionException
row - source record to be modified.column - name of the column within source record.toName - the target name of the column.DirectiveExecutionException - when a column matching the target name already existspublic static void convertType(String directiveName, Row row, String column, String toType, Integer scale, RoundingMode roundingMode) throws DirectiveExecutionException
row - source record to be modified.column - name of the column within source record.toType - the target type of the column.DirectiveExecutionException - when an unsupported type is specified or the column can not be converted.public static io.cdap.cdap.api.data.schema.Schema getSchemaForType(String type, Integer scale) throws DirectiveParseException
DirectiveParseExceptionCopyright © 2024 CDAP Licensed under the Apache License, Version 2.0.