Time Constraints
When an event store contains many millions of events it is usually not required to search through all the events. You can add time constraints to the pipeline to only search recent events.
- 
last X minutes 
- 
last X hours 
- 
last X days 
- 
last X weeks 
- 
last X months 
- 
last X years 
last 2 minutesReturns all events from the last 2 minutes.
aggregateSequenceNumber = 0 | last hourAll events with aggregateSequenceNumber 0 for the last hour.
last minute | groupby(payloadType, count())
groupby(payloadType, count()) | last minuteThese 2 are the same. The time constraint may be anywhere in the pipeline, always applies to the timestamp of the event.
To search for events in a specific time range, you can use the formatDate function:
formatDate(timestamp, "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "UTC") >= "2023-01-01T00:00:00.000Z" and formatDate(timestamp, "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "UTC") <= "2023-01-31T23:59:59.999Z"