Microsoft DP-420 Exam Practice Questions (P. 5)
- Full Access (150 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #21
You are building an application that will store data in an Azure Cosmos DB Core (SQL) API account. The account uses the session default consistency level. The account is used by five other applications. The account has a single read-write region and 10 additional read region.
Approximately 20 percent of the items stored in the account are updated hourly.
Several users will access the new application from multiple devices.
You need to ensure that the users see the same item values consistently when they browse from the different devices. The solution must NOT affect the other applications.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
Approximately 20 percent of the items stored in the account are updated hourly.
Several users will access the new application from multiple devices.
You need to ensure that the users see the same item values consistently when they browse from the different devices. The solution must NOT affect the other applications.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
- ASet the default consistency level to eventual
- BAssociate a session token to the deviceMost Voted
- CUse implicit session management when performing read requestsMost Voted
- DProvide a stored session token when performing read requests
- EAssociate a session token to the user account
Correct Answer:
DE
Use Session consistency and use Stateful Entities in Durable Functions or something similar that will allow you to implement a distributed mutex to store and update the Session token across multiple Cosmos client instances.
Note: The session consistency is the default consistency that you get while configuring the cosmos DB account. This level of consistency honors the client session. It ensures a strong consistency for an application session with the same session token. What that means is that whatever is written by a session will return the latest version for reads as well, from that same session.
Incorrect:
Not A: Eventual consistency is the weakest consistency level of all. The first thing to consider in this model is that there is no guarantee on the order of the data and also no guarantee of how long the data can take to replicate. As the name suggests, the reads are consistent, but eventually.
This model offers high availability and low latency along with the highest throughput of all. This model suits the application that does not require any ordering guarantee. The best usage of this type of model would be the count of retweets, likes, non-threaded comments where the count is more important than any other information.
Not B: The reads should be the same from different devices.
Reference:
https://stackoverflow.com/questions/64084499/can-i-use-a-client-constructed-session-token-for-cosmosdb
DE
Use Session consistency and use Stateful Entities in Durable Functions or something similar that will allow you to implement a distributed mutex to store and update the Session token across multiple Cosmos client instances.
Note: The session consistency is the default consistency that you get while configuring the cosmos DB account. This level of consistency honors the client session. It ensures a strong consistency for an application session with the same session token. What that means is that whatever is written by a session will return the latest version for reads as well, from that same session.
Incorrect:
Not A: Eventual consistency is the weakest consistency level of all. The first thing to consider in this model is that there is no guarantee on the order of the data and also no guarantee of how long the data can take to replicate. As the name suggests, the reads are consistent, but eventually.
This model offers high availability and low latency along with the highest throughput of all. This model suits the application that does not require any ordering guarantee. The best usage of this type of model would be the count of retweets, likes, non-threaded comments where the count is more important than any other information.
Not B: The reads should be the same from different devices.
Reference:
https://stackoverflow.com/questions/64084499/can-i-use-a-client-constructed-session-token-for-cosmosdb
send
light_mode
delete
Question #22
HOTSPOT -
You have a container that stores data about families.
The following is a sample document.

You run the following query against the container.

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

You have a container that stores data about families.
The following is a sample document.

You run the following query against the container.

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

Correct Answer:
Box 1: No -
The result is empty, since the cross product of each item from source and an empty set is empty:
Note: Joins result in a complete cross product of the sets participating in the join. The result of an N-way join is a set of N-element tuples, where each value in the tuple is associated with the aliased set participating in the join and can be accessed by referencing that alias in other clauses.
Box 2: No -
The cross join is not on the pets.
Box 3: Yes -
The cross join is not on the pets.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-join

Box 1: No -
The result is empty, since the cross product of each item from source and an empty set is empty:
Note: Joins result in a complete cross product of the sets participating in the join. The result of an N-way join is a set of N-element tuples, where each value in the tuple is associated with the aliased set participating in the join and can be accessed by referencing that alias in other clauses.
Box 2: No -
The cross join is not on the pets.
Box 3: Yes -
The cross join is not on the pets.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-join
send
light_mode
delete
Question #23
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 Core (SQL) API 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 Azure Event Grid to send events to the function by using an Event Grid trigger in the function.
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 an Azure Cosmos DB Core (SQL) API 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 Azure Event Grid to send events to the function by using an Event Grid trigger in the function.
Does this meet the goal?
- AYes
- BNo
Correct Answer:
B
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
B
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
send
light_mode
delete
Question #24
You have an application named App1 that reads the data in an Azure Cosmos DB Core (SQL) API account. App1 runs the same read queries every minute. The default consistency level for the account is set to eventual.
You discover that every query consumes request units (RUs) instead of using the cache.
You verify the IntegratedCacheiteItemHitRate metric and the IntegratedCacheQueryHitRate metric. Both metrics have values of 0.
You verify that the dedicated gateway cluster is provisioned and used in the connection string.
You need to ensure that App1 uses the Azure Cosmos DB integrated cache.
What should you configure?
You discover that every query consumes request units (RUs) instead of using the cache.
You verify the IntegratedCacheiteItemHitRate metric and the IntegratedCacheQueryHitRate metric. Both metrics have values of 0.
You verify that the dedicated gateway cluster is provisioned and used in the connection string.
You need to ensure that App1 uses the Azure Cosmos DB integrated cache.
What should you configure?
- Athe indexing policy of the Azure Cosmos DB container
- Bthe consistency level of the requests from App1
- Cthe connectivity mode of the App1 CosmosClientMost Voted
- Dthe default consistency level of the Azure Cosmos DB account
Correct Answer:
C
Because the integrated cache is specific to your Azure Cosmos DB account and requires significant CPU and memory, it requires a dedicated gateway node.
Connect to Azure Cosmos DB using gateway mode.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/integrated-cache-faq
C
Because the integrated cache is specific to your Azure Cosmos DB account and requires significant CPU and memory, it requires a dedicated gateway node.
Connect to Azure Cosmos DB using gateway mode.
Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/integrated-cache-faq
send
light_mode
delete
Question #25
HOTSPOT -
You provision Azure resources by using the following Azure Resource Manager (ARM) template.

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

You provision Azure resources by using the following Azure Resource Manager (ARM) template.

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

Correct Answer:
Box 1: No -
An alert is triggered when the DB key is regenerated, not when it is used.
Note: The az cosmosdb keys regenerate command regenerates an access key for a Azure Cosmos DB database account.
Box 2: No -
Only an SMS action will be taken.
Emailreceivers is empty so no email action is taken.
Box 3: Yes -
Yes, an alert is triggered when the DB key is regenerated.
Reference:
https://docs.microsoft.com/en-us/cli/azure/cosmosdb/keys

Box 1: No -
An alert is triggered when the DB key is regenerated, not when it is used.
Note: The az cosmosdb keys regenerate command regenerates an access key for a Azure Cosmos DB database account.
Box 2: No -
Only an SMS action will be taken.
Emailreceivers is empty so no email action is taken.
Box 3: Yes -
Yes, an alert is triggered when the DB key is regenerated.
Reference:
https://docs.microsoft.com/en-us/cli/azure/cosmosdb/keys
send
light_mode
delete
All Pages