QuestionQ154

VerifiedCost & Performance Optimisation

The business intelligence team has configured a dashboard to monitor several retail-store summary metrics. These include total sales for the previous day, as well as totals and averages across various time periods. The fields needed to populate this dashboard use the following schema:

Question Image

For demand forecasting, the Lakehouse contains a validated table of all itemized sales that is updated incrementally in near real time. This table, named products_per_order, has the following fields:

Question Image

Because reporting on long-term sales trends is less volatile, analysts using the new dashboard need the data refreshed only once per day. Because many users will query the dashboard interactively throughout a normal business day, it must return results quickly while reducing the total compute associated with each materialization.

Which solution satisfies end-user expectations while controlling and limiting potential costs?

Explanation

A nightly batch job can calculate the required sales aggregates once and store the result in a summary table that is overwritten daily. The dashboard can then read precomputed values quickly for every interactive request, avoiding repeated aggregation of the detailed products_per_order data. A scheduled one-time batch update is appropriate when strict low-latency updates are unnecessary and reduces the compute cost of continuous streaming or repeated view evaluation.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!