Version: v2.4 
DateTimeFieldExtract
It creates a new DataFrame by extracting Date and Time fields.
Input
It takes in a DataFrame as Input
Output
Node to extract year/month/dayofmonth/hour/minute/seconad values from TimeStamp
Type
transform
Fields
| Name | Title | Description |
|---|---|---|
| inputCol | Column | The input column name |
| extractYear | Extract Year | Extract Year |
| extractMonth | Extract Month | Extract Month |
| extractDayOfMonth | Extract Day of Month | Extract Day of Month |
| extractHour | Extract Hour | Extract Hour |
| extractMinute | Extract Minute | Extract Minute |
| extractSecond | Extract Second | Extract Second |
| extractWeekOfYear | Extract WeekOfYear | Extract WeekOfYear |
Details
Extracts year, month, day of month, hour, minute, second and week of year in different columns.
Examples
Input
| transactionId | cardNumber | tx_timestamp | amount | merchnatId |
|---|---|---|---|---|
| StringType | StringType | TimestampType | DoubleType | StringType |
| 215667691-7 | 0003 | 2015-12-25 01:17:06 | 14952.59 | 43199-016 |
| 751006667-0 | 0012 | 2015-12-29 01:17:06 | 16603.44 | 63621-354 |
| 52339970-8 | 0001 | 2015-12-22 01:17:06 | 29175.35 | 64205-126 |
| 884800094-0 | 0003 | 2015-12-15 01:17:06 | 30190.31 | 50730-7993 |
Parameters
| Name | Value |
|---|---|
| Column | tx_timestamp |
| Extract Year | true |
| Extract Month | true |
| Extract Day of Month | true |
| Extract Hour | true |
| Extract Minute | true |
| Extract Second | true |
| Extract WeekOfYear | true |
Output
| transactionId | cardNumber | tx_timestamp | amount | merchnatId | tx_timestamp_year | tx_timestamp_month | tx_timestamp_dayofmonth | tx_timestamp_hour | tx_timestamp_minute | tx_timestamp_second | tx_timestamp_weekofyear |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 215667691-7 | 0003 | 2015-12-25 01:17:06 | 14952.59 | 43199-016 | 2015 | 12 | 25 | 01 | 17 | 06 | 52 |
| 751006667-0 | 0012 | 2015-12-29 01:17:06 | 16603.44 | 63621-354 | 2015 | 12 | 29 | 01 | 17 | 06 | 53 |
| 52339970-8 | 0001 | 2015-12-22 01:17:06 | 29175.35 | 64205-126 | 2015 | 12 | 22 | 01 | 17 | 06 | 52 |
| 884800094-0 | 0003 | 2015-12-15 01:17:06 | 30190.31 | 50730-7993 | 2015 | 12 | 15 | 01 | 17 | 06 | 51 |