A building-management system emits temperature, humidity, and CO2 readings from a gallery's HVAC controller, and all three values for a given moment always carry the exact same timestamp because they are sampled together. An engineer wants to group and combine those three simultaneous readings into a single row per timestamp, without introducing any time-span logic. Which windowing function matches this need?
Select an answer to reveal the explanation.
Short Explanation
When every value you want in one row already shares the exact same timestamp, you don't need a time span at all — you need a window that groups by "same instant." That's a snapshot window: no duration, no gap, just events that tie on timestamp collapsed together.
Full Explanation
A snapshot window groups events that carry an identical timestamp value into a single result, with no notion of a duration or a sliding span at all — it is purely a same-instant grouping. Because the HVAC controller emits temperature, humidity, and CO2 readings that are stamped with the exact same moment by design, a snapshot window is the direct match: it combines those three readings into one row per timestamp without introducing any artificial time-bucket logic.
A tumbling window with a one-minute duration would work only by coincidence if all three readings always land in the same one-minute bucket, but it also risks bundling in unrelated readings from other moments within that same minute, which is not what the requirement asks for. A hopping window adds overlap on top of that same imprecision, making it an even worse fit for a same-instant grouping. A session window keys off gaps of inactivity between events, which is irrelevant here since the three readings are simultaneous by construction rather than separated by any gap to measure.
A caveat: a snapshot window only behaves correctly when the source truly guarantees identical timestamps for the values that should be grouped; if the controller's three sensors were ever stamped even a millisecond apart, they would land in separate snapshot groups. Operationally, spot-check a handful of grouped rows to confirm each one contains exactly the temperature, humidity, and CO2 reading for a single shared timestamp, with none split across rows.