DP-420 practice questions
You have an Azure Cosmos DB Core (SQL) API account named account1 that is configured for automatic failover. The account1 account has a single read-write region in West US and a read region in East US. You run the following PowerShell command. Update-AzCosmosDBAccountFailoverPriority -ResourceGroupName `rg1` -Name `account1` -FailoverPolicy @(`East US`, `West US`) What is the effect of running the command?
A. The account will be unavailable to writes during the change
B. The provisioned throughput for account1 will increase
C. The account will be configured for multi-region writes
D. A manual failover will occur
Discussion forum
Question
You plan to store order data in an Azure Cosmos DB Core (SQL) API account. The data contains information about orders and their associated items. You need to develop a model that supports order read operations. The solution must minimize the number of requests. What should you do?
A. Create a database for orders and a database for order items.
B. Create a single database that contains a container for orders and a container for order items.
C. Create a single database that contains one container. Store orders and order items in separate documents in the container.
D. Create a single database that contains one container. Create a separate document for each order and embed the order items into the order documents.
Discussion forum
Question
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?
A. the indexing policy of the Azure Cosmos DB container
B. the consistency level of the requests from App1
C. the connectivity mode of the App1 CosmosClient
D. the default consistency level of the Azure Cosmos DB account
Discussion forum
Question
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?
A. Yes
B. No
Discussion forum
Question
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.
A. Set the default consistency level to eventual
B. Associate a session token to the device
C. Use implicit session management when performing read requests
D. Provide a stored session token when performing read requests
E. Associate a session token to the user account
Discussion forum
Question
You need to create a data store for a directory of small and medium-sized businesses (SMBs). The data store must meet the following requirements: ✑ Store companies and the users employed by them. Each company will have less than 1,000 users. ✑ Some users have data that is greater than 2 KB. ✑ Associate each user to only one company. ✑ Provide the ability to browse by company. ✑ Provide the ability to browse the users by company. ✑ Whenever a company or user profile is selected, show a details page for the company and all the related users. ✑ Be optimized for reading data. Which design should you implement to optimize the data store for reading data?
A. In a directory container, create a document for each company and a document for each user. Use the company ID as the partition key.
B. Create a user container that uses the user ID as the partition key and a company container that uses the company ID as the partition key. Add the company ID to each user document.
C. In a user container, create a document for each user. Embed the company into each user document. Use the user ID as the partition key.
D. In a company container, create a document for each company. Embed the users into company documents. Use the company ID as the partition key.
Discussion forum
Question
You have a container in an Azure Cosmos DB Core (SQL) API account. The container stores data about families. Data about parents, children, and pets are stored as separate documents. Each document contains the address of each family. Members of the same family share the same partition key named familyId. You need to update the address for each member of the same family that share the same address. The solution must meet the following requirements: ✑ Be atomic, consistent, isolated, and durable (ACID). ✑ Provide the lowest latency. What should you do?
A. Update the document of each family member separately by using a patch operation
B. Update the document of each family member separately and set the consistency level to strong
C. Update the document of each family member by using a transactional batch operation
Discussion forum
Question
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 account 1 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?
A. Yes
B. No
Discussion forum
Question
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 account 1 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 CosmosDB trigger. Does this meet the goal?
A. Yes
B. No
Discussion forum
Question
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 account 1 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 CosmosDB trigger. Does this meet the goal?
A. Yes
B. No
Discussion forum
Question
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 account 1 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 CosmosDB trigger. Does this meet the goal?
A. Yes
B. No
Discussion forum
Question
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 account 1 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 Azure Monitor alert to trigger the function. Does this meet the goal?
A. Yes
B. No
Discussion forum
Question
You need to implement a trigger in Azure Cosmos DB Core (SQL) API 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.
A. Append pre to the name of the JavaScript function trigger.
B. For each create request, set the access condition in RequestOptions.
C. Register the trigger as a pre-trigger.
D. For each create request, set the consistency level to session in RequestOptions.
E. For each create request, set the trigger name in RequestOptions.
Discussion forum
Question