QuestionQ76

VerifiedData Preparation and Ingestion

Your team needs to create a monthly report to analyze inventory data that is updated daily. You must aggregate inventory counts using only data from the most recent month and save the results for use in a Looker Studio dashboard. What should you do?

Explanation

A BigQuery materialized view pre-computes and stores the aggregation (SUM of inventory counts) and refreshes automatically as the underlying daily-updated base table changes, so the Looker Studio dashboard always shows current results with minimal query cost and no manual steps. Using DATE_SUB to scope to the most recent month keeps the aggregate focused on the reporting window. This is preferable to B, which needs a manual monthly re-run, and to C/D, which create one-off static tables (and DATE_DIFF/_PARTITIONDATE are not the fit-for-purpose choice for a rolling monthly aggregate serving a live dashboard). Note the practical caveat that materialized views disallow non-deterministic functions such as CURRENT_DATE(), but among the offered options the managed, auto-refreshing materialized view is the intended best answer.

Learn more

Community Discussion

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