Skip to main content

Huge thanks to ​@mark2atsafe for granting me a shiny FME Star badge!


It really gave me the push to finally share some of the custom tools I’ve built, starting with this one: the TimeSeriesGenerator.

 

The idea came up when I needed to build a time‑series dataset to plot user activity over time. My end goal was to generate an HTML report showing how users interacted with an application. 

I was starting from a log file of user requests, but if no one made a request during a given period, I’d have gaps in my data and nothing to show in the report.

 

This issue is a common one. Even FME Flow with his analytics page doesn’t handle time period with no data.

This FME Flow is idling most of the time, but the Analytics page doesn’t report that.

 

 

That’s where the TimeSeriesGenerator comes in !

 

It creates a continuous series of timestamps between a start date and an end date, at a specified interval in seconds. You can then join your actual log data to those timestamps and be sure you’ll see a value (even if it’s zero) for every interval.

Here’s how it works in FME Workbench:  
– Feed in your start date, end date, and interval  
– The transformer outputs a list called “timestamps{}”  
– Each item in that list has three attributes:  
• timestamps{}.timestampFME (FME’s native date format)  
• timestamps{}.timestampISO (ISO 8601 format)  
• timestamps{}.timestampEPOCH (Unix epoch time in seconds)

 

 

For example, you can hook up a Creator transformer → TimeSeriesGenerator → ListExploder and end up with a table of evenly spaced timestamps ready to join with your real data.

 

 

It’s also great for making sample datasets. For instance, use Creator + TimeSeriesGenerator + ListExploder to get your timestamps, then toss in a couple of RandomNumberGenerator transformers to add fake “temperature” and “humidity” readings. Now you’ve got realistic-looking sensor data over time.

 

 

 

It gets really handy when paired with the HTMLReportGenerator to plot time‑series charts in your reports.

 

I hope you find the TimeSeriesGenerator useful! Feedback and suggestions are always welcome.

You can find it here : https://hub.safe.com/publishers/abizien/transformers/timeseriesgenerator

 

Check out my FME Hub publisher page to find out about my other tools

Be the first to reply!