Your team wants to create a monthly report to analyze inventory data that is updated daily. You need to aggregate the inventory counts by using only the most recent month of data, and save the results to be used in a Looker Studio dashboard.
What should you do?
- Create a materialized view in BigQuery that uses the SUM( ) function and the DATE_SUB( ) function.
- Create a saved query in the BigQuery console that uses the SUM( ) function and the DATE_SUB( ) function. Re-run the saved query every month, and save the results to a BigQuery table.
- Create a BigQuery table that uses the SUM( ) function and the _PARTITIONDATE filter.
- Create a BigQuery table that uses the SUM( ) function and the DATE_DIFF( ) function.
Answer(s): A
Explanation:
Creating a materialized view in BigQuery with the SUM() function and the DATE_SUB() function is the best approach. Materialized views allow you to pre-aggregate and cache query results, making them efficient for repeated access, such as monthly reporting. By using the DATE_SUB() function, you can filter the inventory data to include only the most recent month. This approach ensures that the aggregation is up-to-date with minimal latency and provides efficient integration with Looker Studio for dashboarding.
Reveal Solution Next Question