Date Time Extractor
On this Page
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.
The Date Time Extractor Snap is an alternative to the Date
class in the expression language.
Expected 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, JSON Parser, etc.
- Expected downstream Snaps: Any Snap that has a document input stream. For example, Aggregate, Profile, etc.
Prerequisite
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. |
---|---|
Output | This Snap has exactly one document output view. |
Error | This Snap has at most one document error view. |
Troubleshooting
None
Limitations and Known Issues
None
Modes
- Ultra Pipelines: Works in Ultra Pipelines.
Snap Settings
Label | Required. 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. Select the Ensure the field is in Default value: None |
Component | Choose the component that the Snap must extract from the input field. The available options are:
Default value: Date |
Result field | Required. Specify 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 Execution | Select one of the following three modes in which the Snap executes:
Default Value: Execute only |
Example
Simple Date Time Extraction
This pipeline demonstrates how we can extract date and time components from an input data using the Date Time Extractor Snap.
Download this pipeline.
Snap Pack History
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.