DP-420 · Question #18
DP-420 Question #18: Real Exam Question with Answer & Explanation
The correct answer is B: Configure the report to query a new aggregate container. Populate the aggregates by using the. {"question_number": 5, "correct_answer": "B", "explanation": "Running aggregation queries (total items per month by item type) directly against the raw 'orders' container requires scanning large volumes of documents across multiple partitions - especially since the partition key
Question
The following is a sample of a document in orders. The orders container uses customerId as the partition key. You need to provide a report of the total items ordered per month by item type. The solution must meet the following requirements: - Ensure that the report can run as quickly as possible. - Minimize the consumption of request units (RUs). What should you do?
Options
- AConfigure the report to query orders by using a SQL query.
- BConfigure the report to query a new aggregate container. Populate the aggregates by using the
- CConfigure the report to query orders by using a SQL query through a dedicated gateway.
- DConfigure the report to query a new aggregate container. Populate the aggregates by using SQL
Explanation
{"question_number": 5, "correct_answer": "B", "explanation": "Running aggregation queries (total items per month by item type) directly against the raw 'orders' container requires scanning large volumes of documents across multiple partitions - especially since the partition key is 'customerId', not 'itemType' or 'date'. This is expensive in RU/s and slow. The optimal solution is to maintain a separate aggregate container pre-computed from the raw data. The Azure Cosmos DB change feed is ideal for populating this aggregate container in near real-time: every time an order document changes, a change feed processor updates the aggregate. When the report runs, it queries the small, pre-aggregated container, resulting in minimal RU consumption and maximum speed. Option D (SQL queries) cannot produce continuous, incremental aggregates the way the change feed can.", "generated_by": "claude-sonnet", "llm_judge_score": 4}
Topics
Community Discussion
No community discussion yet for this question.