public static class DeriveColumnsFromTimeTransform.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
DeriveColumnsFromTimeTransform.Builder |
addIntegerDerivedColumn(String columnName,
org.joda.time.DateTimeFieldType type)
Add an integer derived column - for example, the hour of day, etc.
|
DeriveColumnsFromTimeTransform.Builder |
addStringDerivedColumn(String columnName,
String format,
org.joda.time.DateTimeZone timeZone)
Add a String column (for example, human readable format), derived from the time
|
DeriveColumnsFromTimeTransform |
build()
Create the transform instance
|
DeriveColumnsFromTimeTransform.Builder |
insertAfter(String columnName)
Where should the new columns be inserted?
By default, they will be inserted after the source column
|
public Builder(String timeColumnName)
timeColumnName - The name of the time column from which to derive the new valuespublic DeriveColumnsFromTimeTransform.Builder insertAfter(String columnName)
columnName - Name of the column to insert the derived columns afterpublic DeriveColumnsFromTimeTransform.Builder addStringDerivedColumn(String columnName, String format, org.joda.time.DateTimeZone timeZone)
columnName - Name of the new/derived columnformat - Joda time format, as per http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.htmltimeZone - Timezone to use for formattingpublic DeriveColumnsFromTimeTransform.Builder addIntegerDerivedColumn(String columnName, org.joda.time.DateTimeFieldType type)
columnName - Name of the columntype - Type of field (for example, DateTimeFieldType.hourOfDay() etc)public DeriveColumnsFromTimeTransform build()
Copyright © 2019. All rights reserved.