Class DeriveColumnsFromTimeTransform.Builder
- java.lang.Object
-
- org.datavec.api.transform.transform.time.DeriveColumnsFromTimeTransform.Builder
-
- Enclosing class:
- DeriveColumnsFromTimeTransform
public static class DeriveColumnsFromTimeTransform.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeriveColumnsFromTimeTransform.BuilderaddIntegerDerivedColumn(String columnName, org.joda.time.DateTimeFieldType type)Add an integer derived column - for example, the hour of day, etc.DeriveColumnsFromTimeTransform.BuilderaddStringDerivedColumn(String columnName, String format, org.joda.time.DateTimeZone timeZone)Add a String column (for example, human readable format), derived from the timeDeriveColumnsFromTimeTransformbuild()Create the transform instanceDeriveColumnsFromTimeTransform.BuilderinsertAfter(String columnName)Where should the new columns be inserted? By default, they will be inserted after the source column
-
-
-
Constructor Detail
-
Builder
public Builder(String timeColumnName)
- Parameters:
timeColumnName- The name of the time column from which to derive the new values
-
-
Method Detail
-
insertAfter
public DeriveColumnsFromTimeTransform.Builder insertAfter(String columnName)
Where should the new columns be inserted? By default, they will be inserted after the source column- Parameters:
columnName- Name of the column to insert the derived columns after
-
addStringDerivedColumn
public 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- Parameters:
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 formatting
-
addIntegerDerivedColumn
public DeriveColumnsFromTimeTransform.Builder addIntegerDerivedColumn(String columnName, org.joda.time.DateTimeFieldType type)
Add an integer derived column - for example, the hour of day, etc. Uses timezone from the time column metadata- Parameters:
columnName- Name of the columntype- Type of field (for example, DateTimeFieldType.hourOfDay() etc)
-
build
public DeriveColumnsFromTimeTransform build()
Create the transform instance
-
-