Free DP-420 Exam Braindumps
Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Questions 21–25 (page: 6)

Updated On: 16-Nov-2026
View Related Case Study

You need to implement a trigger in Azure Cosmos DB for NoSQL that will run before an item is inserted into a container.
Which two actions should you perform to ensure that the trigger runs? Each correct answer presents part of the solution.
Note: Each correct selection is worth one point.

  1. Append pre to the name of the JavaScript function trigger.
  2. For each create request, set the access condition in RequestOptions.
  3. Register the trigger as a pre-trigger.
  4. For each create request, set the consistency level to session in RequestOptions.
  5. For each create request, set the trigger name in RequestOptions.

Answer(s): C

Explanation:

C: When triggers are registered, you can specify the operations that it can run with.
F: When executing, pre-triggers are passed in the RequestOptions object by specifying PreTriggerInclude and then passing the name of the trigger in a List object.


Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/sql/how-to-use-stored-procedures-triggers-udfs



View Related Case Study

HOTSPOT (Drag and Drop is not supported)
You plan to use a multi-region Azure Cosmos DB for NoSQL account to store data for a new application suite. The suite contains the applications shown in the following table.

Each application should use the weakest consistency level possible.
Which consistency level should you configure for each application? To answer, select the appropriate options in the answer area.
Note: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: Eventual
Eventual consistency
Like all consistency levels weaker than Strong, writes are replicated to a minimum of three replicas (in a four replica set) in the local region, with asynchronous replication to all other regions.
In Eventual consistency, the client issues read requests against any one of the four replicas in the specified region. This replica may be lagging and could return stale or no data.
Eventual consistency is the weakest form of consistency because a client may read the values that are older than the ones it read in the past. Eventual consistency is ideal where the application doesn't require any ordering guarantees. Examples include count of Retweets, Likes, or non-threaded comments. The following graphic illustrates the eventual consistency with musical notes.
Box 2: Bounded Staleness
Reads when using Bounded Staleness returns the latest data available in that region by reading from two available replicas in that region. Since writes within a region always replicate to a local majority (three out of four replicas), consulting two replicas return the most updated data available in that region.
Box 3: Strong
Strong consistency
Strong consistency offers a linearizability guarantee. Linearizability refers to serving requests concurrently. The reads are guaranteed to return the most recent committed version of an item. A client never sees an uncommitted or partial write. Users are always guaranteed to read the latest committed write.
Note: Azure Cosmos DB offers five well-defined levels. From strongest to weakest, the levels are:
Strong
Bounded staleness
Session
Consistent prefix
Eventual


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels



View Related Case Study

DRAG DROP (Drag and Drop is not supported)
You have an Azure Cosmos DB container named owners. Each item in owners represents an owner and their pets.
The following is a sample of the JSON

You are writing a query that will retrieve the average age of each pet owned by each owner, if the pet is older than two years.
How should you complete the query? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Note: Each correct selection is worth one point.
Select and Place:

  1. See Explanation section for answer.

Answer(s): A

Explanation:




VALUE: The subquery should select the age of each pet, so VALUE is used to extract just the age value from each pet document.
IN: The correct keyword to iterate through the pets array within each owner is IN.



View Related Case Study

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 for NoSQL account named account1 that uses autoscale throughput.
You need to run an Azure function when the normalized request units per second for a container in account1 exceeds a specific value.
Solution: You configure the function to have an Azure Cosmos DB trigger.
Does this meet the goal?

  1. Yes
  2. No

Answer(s): B

Explanation:

Instead configure an Azure Monitor alert to trigger the function.
You can set up alerts from the Azure Cosmos DB pane or the Azure Monitor service in the Azure portal.


Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/create-alerts



View Related Case Study

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 for NoSQL account named account1 that uses autoscale throughput.
You need to run an Azure function when the normalized request units per second for a container in account1 exceeds a specific value.
Solution: You configure an application to use the change feed processor to read the change feed and you configure the application to trigger the function.
Does this meet the goal?

  1. Yes
  2. No

Answer(s): B

Explanation:

Instead configure an Azure Monitor alert to trigger the function.
You can set up alerts from the Azure Cosmos DB pane or the Azure Monitor service in the Azure portal.


Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/create-alerts



Viewing page 6 of 61
Viewing questions 26 - 30 out of 296 questions


Post your Comments and Discuss Microsoft DP-420 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!