Topic 1 Question 395
A developer creates an Amazon DynamoDB table. The table has OrderID as the partition key and NumberOfItemsPurchased as the sort key. The data type of the partition key and the sort key is Number.
When the developer queries the table, the results are sorted by NumberOfItemsPurchased in ascending order. The developer needs the query results to be sorted by NumberOfItemsPurchased in descending order.
Which solution will meet this requirement?
Create a local secondary index (LSI) on the NumberOfItemsPurchased sort key.
Change the sort key from NumberOfItemsPurchased to NumberOfItemsPurchasedDescending.
In the Query operation, set the ScanIndexForward parameter to false.
In the Query operation, set the KeyConditionExpression parameter to false.
ユーザの投票
コメント(4)
- 正解だと思う選択肢: C
This question was on my exam, July 23rd, 2024. Answer is C.
👍 2ahadh76212024/07/23 - 正解だと思う選択肢: C
This approach directly addresses the requirement without the need for creating additional indexes or modifying the table schema. It leverages the existing sorting capabilities of DynamoDB and provides a straightforward solution.
👍 1rdiaz2024/07/12 C. In the Query operation, set the ScanIndexForward parameter to false.
👍 1komorebi2024/07/12
シャッフルモード