Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel3

Overview

The Date Time Extractor is a Transform type Snap that is used to extract components from datetime data and add them to the result field. You can use the Snap to prepare the data before performing aggregation or analysis. For example, to identify the total sales for each month or quarter. 

Info

The Date Time Extractor Snap is an alternative to the Date class in the expression language.

Input and Output

  • Expected input: A document with datetime fields.
  • Expected output: A document with fields that contain datetime components.
  • Expected upstream Snaps: Any Snap that has a document output stream. For example, Mapper, Categorial to Numerical, etcJSON Parser, etc.
  • Expected downstream Snaps: Any Snap that has a document input stream. For example, UniqueAggregate, FilterProfile, etc.

Prerequisites

The input document must contain datetime fields.

Configuring Accounts

Accounts are not used with this Snap.

Configuring Views

Input

This Snap has exactly one document input view.

OutputThis Snap has exactly one document output view.
ErrorThis Snap has at most one document error view.

Troubleshooting

None

Limitations and Known Issues

None

Modes


Snap Settings


LabelRequired. The name for the Snap. You can modify this to be specific, especially if you have more than one of the same Snap in your pipeline.
Policy

Specify your preferences for the date time extraction. Each policy contains an input field, component, and the result field. The Snap extracts the date or time component from the input field value and writes it to the result field.

Field

Required. Specifies the datetime field in the input document. This is a suggestible field that suggests all the fields in the incoming dataset. 

Info

Ensure the field is in datetime type. To convert text to datetime, use the Type Converter Snap.

Default value: None

Component

Specifies the component that the Snap must extract from the input field. The available options are:

  • Date
  • Date String (yyyy-MM-dd)
  • Year
  • Quarter
  • Month
  • Day
  • Hour
  • Minute
  • Second
  • Millisecond
  • Year and Month (yyyy-MM)
  • Week of Year
  • Day of Year
  • Day of Week
  • Day of Week String (Sunday)
  • Month of Year String (January)
  • Epoch
  • Epoch Millisecond

Default value: Date

Result field

Required. The result field to be used in the output map. If the Result field is the same as Field, the values are overwritten. If the Result field does not exist in the original input document, a new field is added. 

Default value: None




Snap History


Insert excerpt
ML Data Preparation Snap Pack
ML Data Preparation Snap Pack
nopaneltrue