exam questions

Exam DP-420 All Questions

View all questions & answers for the DP-420 exam

Exam DP-420 topic 1 question 12 discussion

Actual exam question from Microsoft's DP-420
Question #: 12
Topic #: 1
[All DP-420 Questions]

DRAG DROP -
You have an app that stores data in an Azure Cosmos DB Core (SQL) API account The app performs queries that return large result sets.
You need to return a complete result set to the app by using pagination. Each page of results must return 80 items.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Step 1: Configure the MaxItemCount in QueryRequestOptions
You can specify the maximum number of items returned by a query by setting the MaxItemCount. The MaxItemCount is specified per request and tells the query engine to return that number of items or fewer.
Box 2: Run the query and provide a continuation token
In the .NET SDK and Java SDK you can optionally use continuation tokens as a bookmark for your query's progress. Azure Cosmos DB query executions are stateless at the server side and can be resumed at any time using the continuation token.
If the query returns a continuation token, then there are additional query results.
Step 3: Append the results to a variable
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-pagination

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
remz
Highly Voted 1 year, 3 months ago
Correct
upvoted 9 times
...
[Removed]
Most Recent 6 months, 3 weeks ago
Correct. Yes, you should configure the MaxItemCount property to limit the number of items returned per page to 80. Additionally, you should use the continuation token returned in the response to retrieve the next page of results.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago