Topic 1 Question 102
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?
Leverage BigQuery UPDATE statements to update the inventory balances as they are changing.
Partition the inventory balance table by item to reduce the amount of data scanned with each inventory update.
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.
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.
ユーザの投票
コメント(17)
- 正解だと思う選択肢: A
A - New correct answer C - Old correct answer (for 2019)
👍 30MaxNRG2021/12/30 C is correct. It says “update Every hour” And need “ accuracy”
👍 24haroldbenites2020/08/21- 正解だと思う選択肢: C
I'm afraid that even the DML statements per day are unlimited nowadays (2022), the answer [C] remains the best option for the near real-time constraint, since updating row-by-row in BigQuery is considered by Google an anti-pattern. Quoting from https://cloud.google.com/bigquery/docs/best-practices-performance-patterns#dml_statements_that_update_or_insert_single_rows : Best practice: Avoid point-specific DML statements (updating or inserting 1 row at a time). Batch your updates and inserts. ... BigQuery DML statements are intended for bulk updates. UPDATE and DELETE DML statements in BigQuery are oriented towards periodic rewrites of your data, not single row mutations. ... If your use case involves frequent single row inserts, consider streaming your data instead.
Through this prism: [C] (streaming) > [D] (batch) > A [row-by-row]
👍 8NicolasN2022/11/05
シャッフルモード