TimeSeriesGenerator
The TimeSeriesGenerator is a custom FME transformer designed to generate a sequence of timestamped features between a specified start and end date, at user-defined intervals.
It outputs each timestamp in three formats:
FME Date Format: Suitable for internal FME date operations.
ISO 8601 Format: Human-readable format.
Epoch Time: Unix timestamp in seconds, ideal for sorting and time-based calculations.
Parameters
Start Date
Type: Date
Description: Defines the beginning of the time series. Accepts direct date input or attribute references.
End Date
Type: Date
Description: Defines the end of the time series. Accepts direct date input or attribute references.
Time Lapse (seconds)
Type: Numeric
Description: Specifies the interval between consecutive timestamps, in seconds.
Obvious Cheat Sheet
To assist in determining appropriate time lapse values:
1 min = 60 sec
5 min = 300 sec
10 min = 600 sec
30 min = 1800 sec
1 h = 3600 sec
1 d = 86400 sec
Output Ports
Series
Each feature emitted through the Series port includes the following attributes:
timestamps{}.timestampFME: Timestamp in FME's native date format.
timestamps{}.timestampISO: Timestamp in ISO 8601 format.
timestamps{}.timestampEPOCH: Timestamp as Unix epoch time (seconds since 1970-01-01).
Usage Notes
The transformer dynamically calculates the sequence of timestamps based on the provided start and end dates, and the specified time lapse.
Ensure that the Time Lapse value is a positive number to generate a forward-moving time series.
If the End Date precedes the Start Date, the transformer will not generate any output.
The Obvious Cheat Sheet serves as a quick reference to convert common time intervals into seconds.
Example
To generate timestamps every 30 minutes from January 1, 2025, 00:00 to January 1, 2025, 03:00:
Start Date: 2025-01-01 00:00
End Date: 2025-01-01 03:00
Time Lapse: 1800
This configuration will produce the following timestamps:
2025-01-01 00:00
2025-01-01 00:30
2025-01-01 01:00
2025-01-01 01:30
2025-01-01 02:00
2025-01-01 02:30
2025-01-01 03:00
Would you like to know more? Click here to find out more details!