Does this meet the goal?

Posted by: Pdfprep Category: AZ-303 Tags: , ,

Note: This question is part of 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.

You set the EnableCrossPartitionQuery property to True.

Does this meet the goal?
A . Yes
B . No

Answer: A

Explanation:

Returns Item1 and Item2 only.

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql-query-where

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.documents.client.feedoptions.enablecrosspartitionquery?view =azure-dotnet

Leave a Reply

Your email address will not be published.