exam questions

Exam AZ-303 All Questions

View all questions & answers for the AZ-303 exam

Exam AZ-303 topic 1 question 68 discussion

Actual exam question from Microsoft's AZ-303
Question #: 68
Topic #: 1
[All AZ-303 Questions]

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You have an Azure Cosmos DB database that contains a container named Container1. The partition key for Container1 is set to /day. Container1 contains the items shown in the following table.

You need to programmatically query Azure Cosmos DB and retrieve Item1 and Item2 only.
Solution: You run the following query.

SELECT day -
WHERE value = "10"
You set the EnableCrossPartitionQuery property to False.
Does this meet the goal?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
Returns Item1 only as EnableCrossPartitionQuery property to False. If EnableCrossPartitionQuery property is set to true, it will return Item1 and Item3.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/sql-query-where

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
syu31svc
3 years, 9 months ago
Answer is No for sure
upvoted 3 times
...
AravindITGuy
3 years, 11 months ago
Took exam today passed this morning was on there 6/21/2021
upvoted 3 times
...
nfett
3 years, 11 months ago
answer is correct.
upvoted 4 times
...
pkr0895
4 years ago
EnableCrossPartitionQuery is automatically set based on the query. code: https://github.com/Azure/azure-cosmos-dotnet-v3/blob/e534de251bdadafd1adb960da83c15d463486a66/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs#L173-L177 doc:https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-query-container
upvoted 2 times
...
st003
4 years ago
Same as questions 29. 30. 31. The answer is No.
upvoted 2 times
...
azurellc
4 years ago
On exam 5/15/2021
upvoted 4 times
...
mesk
4 years, 2 months ago
given answer is correct, because value=15 for item 2. The query will retrieve item1 only.
upvoted 4 times
...
kwaazaar
4 years, 3 months ago
Will result in BadRequestException: Cross partition query is required but disabled.
upvoted 3 times
...
xaccan
4 years, 5 months ago
No The query will retrieve item1 and item3.(value=10)
upvoted 3 times
Motorzep
4 years, 5 months ago
The answer is No. It will only retrieve item1 because EnableCrossPartitionQuery property was set to False.
upvoted 3 times
erms
4 years, 4 months ago
Actually xaccan is right, it will return Items 1 and 3. Please check what EnableCrossPartitionQuery really means.
upvoted 1 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 ...