Question: 1 / 70

What type of windowing should you choose for continuous calculations of total sales per hour in a streaming data pipeline?

Hopping windows

Session windows

Global window

Tumbling windows

When performing continuous calculations of total sales per hour in a streaming data pipeline, tumbling windows are the most suitable choice. Tumbling windows divide the data flow into fixed-size, non-overlapping intervals. Each interval is distinct and collects data points that fall within that specific time frame. This is beneficial for calculating total sales per hour because you can aggregate the sales data precisely for each one-hour interval without any overlap or mixing of data from different time periods.

With tumbling windows, the computation for each window is done in isolation, allowing for clear, straightforward aggregation of the sales data within each hourly segment. This leads to accurate insights into sales trends hour by hour.

While other options might have their own use cases, such as hopping windows, which allow for overlapping time frames, or session windows, which are based on the activity and gaps in the data, they do not serve the purpose of producing precise per-hour calculations as effectively as tumbling windows do. Global windows, on the other hand, would aggregate all data until the end of the input stream, which is not helpful for hour-specific calculations.

Next

Report this question