Google Cloud Professional Data Engineer — Question 96
You need to create a near real-time inventory dashboard that reads the main inventory tables in your BigQuery data warehouse. Historical inventory data is stored as inventory balances by item and location. You have several thousand updates to inventory every hour. You want to maximize performance of the dashboard and ensure that the data is accurate. What should you do?
Answer options
- A. Leverage BigQuery UPDATE statements to update the inventory balances as they are changing.
- B. Partition the inventory balance table by item to reduce the amount of data scanned with each inventory update.
- C. Use the BigQuery streaming the stream changes into a daily inventory movement table. Calculate balances in a view that joins it to the historical inventory balance table. Update the inventory balance table nightly.
- D. Use the BigQuery bulk loader to batch load inventory changes into a daily inventory movement table. Calculate balances in a view that joins it to the historical inventory balance table. Update the inventory balance table nightly.
Correct answer: C
Explanation
The correct answer is C because using BigQuery streaming allows for real-time data updates, enabling the dashboard to reflect changes almost immediately while maintaining historical accuracy. The other options either do not provide real-time updates (A and D) or may lead to performance issues due to unnecessary scanning of data (B).