Microsoft Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB - DP-420 Exam Practice Test
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 a container named container1 in an Azure Cosmos DB for NoSQL account.
You need to make the contents of container1 available as reference data for an Azure Stream Analytics job.
Solution: You create an Azure function to copy data to another Azure Cosmos DB for NoSQL container.
Does this meet the goal?
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 a container named container1 in an Azure Cosmos DB for NoSQL account.
You need to make the contents of container1 available as reference data for an Azure Stream Analytics job.
Solution: You create an Azure function to copy data to another Azure Cosmos DB for NoSQL container.
Does this meet the goal?
Correct Answer: A
Vote an answer
You have an Azure Cosmos DB account named account1 that uses the Core (SQL) API.
You have a web service that receives JSON-based messages.
You need to recommend a solution that will process and store the messages in a container in account1. The solution must minimize latency.
What should you include in the recommendation?
You have a web service that receives JSON-based messages.
You need to recommend a solution that will process and store the messages in a container in account1. The solution must minimize latency.
What should you include in the recommendation?
Correct Answer: D
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
Hotspot Question
You have an Azure subscription that contains an Azure Cosmos DB for NoSQL account.
You define and implement an encryption policy by using the following C# code:

For each of the following statements, select Yes if the statement is true, otherwise select No.
NOTE: Each correct selection is worth one point.

You have an Azure subscription that contains an Azure Cosmos DB for NoSQL account.
You define and implement an encryption policy by using the following C# code:

For each of the following statements, select Yes if the statement is true, otherwise select No.
NOTE: Each correct selection is worth one point.

Correct Answer:

Hotspot Question
You are developing an application that will connect to an Azure Cosmos DB for NoSQL account.
The account has a single read-write region and one additional read region. The regions are configured for automatic failover.
The account has the following connection strings. (Line numbers are included for reference only.)

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.

You are developing an application that will connect to an Azure Cosmos DB for NoSQL account.
The account has a single read-write region and one additional read region. The regions are configured for automatic failover.
The account has the following connection strings. (Line numbers are included for reference only.)

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.

Correct Answer:

Explanation:
Box 1: No
The same connection string can still be used.
Azure Cosmos DB Core read write region connection strings
Azure Cosmos DB "primary write region" failover "connection string"
Box 2: No
The AccountEndpoint for both are the same.
Box 3: Yes
The ConnectionPolicy.PreferredLocations property gets and sets the preferred locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. For example, "East US" as the preferred location.
When EnableEndpointDiscovery is true and the value of this property is non-empty, the SDK uses the locations in the collection in the order they are specified to perform operations, otherwise if the value of this property is not specified, the SDK uses the write region as the preferred location for all operations.
Reference:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.documents.client.connectionpolicy.preferredlocations
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 a container named container1 in an Azure Cosmos DB Core (SQL) API account.
You need to make the contents of container1 available as reference data for an Azure Stream Analytics job.
Solution: You create an Azure function that uses Azure Cosmos DB for NoSQL change feed as a trigger and Azure event hub as the output.
Does this meet the goal?
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 a container named container1 in an Azure Cosmos DB Core (SQL) API account.
You need to make the contents of container1 available as reference data for an Azure Stream Analytics job.
Solution: You create an Azure function that uses Azure Cosmos DB for NoSQL change feed as a trigger and Azure event hub as the output.
Does this meet the goal?
Correct Answer: B
Vote an answer
Hotspot Question
You have an Azure Cosmos DB for NoSQL container. The container contains items that have the following properties.

You need to protect the data stored in the container by using Always Encrypted. For each property, you must use the strongest type of encryption and ensure that queries execute properly.
What is the strongest type of encryption that you can apply to each property? To answer, select the appropriate options in the answer area.

You have an Azure Cosmos DB for NoSQL container. The container contains items that have the following properties.

You need to protect the data stored in the container by using Always Encrypted. For each property, you must use the strongest type of encryption and ensure that queries execute properly.
What is the strongest type of encryption that you can apply to each property? To answer, select the appropriate options in the answer area.

Correct Answer:

Hotspot Question
You have an Azure Cosmos DB for NoSQL account that hosts a container named Container1.
You are developing an Azure Function named Function1.
You need to ensure that Function1 will be triggered when an item is created or updated in Container1.
How should you complete the function? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

You have an Azure Cosmos DB for NoSQL account that hosts a container named Container1.
You are developing an Azure Function named Function1.
You need to ensure that Function1 will be triggered when an item is created or updated in Container1.
How should you complete the function? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Correct Answer:

You plan to create an Azure Cosmos DB for NoSQL account that will use customer-managed keys stored in Azure Key Vault.
You need to configure an access policy in Key Vault to allow Azure Cosmos DB access to the keys.
Which three permissions should you enable in the access policy? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
You need to configure an access policy in Key Vault to allow Azure Cosmos DB access to the keys.
Which three permissions should you enable in the access policy? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
Correct Answer: A,B,C
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
Hotspot Question
You have an Azure subscription that contains an Azure Cosmos DB for NoSQL account. The account hosts two containers named Customers and Sale Transactions. The Customers container stores customer data.
Each customer data item includes a field named numberOfSales that must be updated when an item is added to the SaleTransactions container.
You need to ensure referential integrity between the containers. The solution must meet the following requirements:
- Detect changes to the SaleTransactions container.
- Apply a new aggregate count to the related items in the Customers
container.
What should you use to implement each requirement? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

You have an Azure subscription that contains an Azure Cosmos DB for NoSQL account. The account hosts two containers named Customers and Sale Transactions. The Customers container stores customer data.
Each customer data item includes a field named numberOfSales that must be updated when an item is added to the SaleTransactions container.
You need to ensure referential integrity between the containers. The solution must meet the following requirements:
- Detect changes to the SaleTransactions container.
- Apply a new aggregate count to the related items in the Customers
container.
What should you use to implement each requirement? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Correct Answer:
