Microsoft

DP-420 Free Practice Questions — Page 6

Question 51

HOTSPOT You have an on-premises network. You have an Azure subscription that contains an Azure Cosmos DB account named account1 and an Azure virtual network named VNet1. VNet1 contains two virtual machines named VM1 and VM2. VNet1 is connected to the on-premises network by using a Site-to-Site (S2S) VPN. You need to meet the following requirements: • Block access to the public endpoint of account1. • Allow only VM1 to access account1. What should you include in the solution? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-420 question 51
Show Answer
Correct Answer: Network connectivity: Private endpoint Allow only VM1: Network security group (NSG) inbound rules
Explanation:
A private endpoint provides private connectivity to account1, allowing its public endpoint to be disabled. Enable network policies on the private endpoint’s subnet, then use NSG inbound rules to permit VM1 and deny other sources.

Question 52

HOTSPOT You have two Azure Cosmos for NoSQL containers named Container1 and Container2. You plan to process the change feed for each container by using the following: • Container1: Pull model • Container2: Change feed processor You need to track the current processing point for each change feed. What should you use for each container? To answer, select the appropriate options in the answer area.

Illustration for DP-420 question 52
Show Answer
Correct Answer: Container1: A continuation token Container2: A lease in the lease container
Explanation:
The pull model uses a continuation token to resume reading the change feed. The change feed processor stores its processing position in a lease container.

Question 53

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?

A. Yes
B. No
Show Answer
Correct Answer: B
Explanation:
Azure Event Hubs provides streaming input to Azure Stream Analytics, not reference data. Sending Cosmos DB change-feed events to an event hub therefore does not make the container’s contents available as reference data.

Question 54

HOTSPOT You have an Azure Cosmos DB for NoSQL container that contains the following item. You need to update the OrderQty value to 5 by using a patch operation. How should you complete the JSON Patch document? To answer, select the appropriate options in the answer area.

Illustration for DP-420 question 54 Illustration for DP-420 question 54
Show Answer
Correct Answer: Operation: increment Path: /Items/0/OrderQty
Explanation:
The item is at array index 0. Incrementing its OrderQty of 10 by the specified value of -5 sets it to 5.

Question 55

You have an Azure Cosmos DB for NoSQL account that contains a database named DB1 and a container named Container1. You need to manage the account by using the Azure Cosmos DB SDK. What should you do?

A. Create a container in DB1.
B. List the physical partitions of Container1.
C. Read a stored procedure in Container1.
D. Create a user defined function (UDF) in Container1.
Show Answer
Correct Answer: A
Explanation:
Use the SDK to create a container in DB1, for example with the container-creation API. The question is somewhat ambiguous because Cosmos DB SDKs can also expose APIs for stored procedures and UDFs; however, creating a container is the intended account/resource-management choice. Listing physical partitions is not a standard container-management operation.

Question 56

You plan to create an Azure Cosmos DB for NoSQL account that will have a single write region and three read regions. You need to set the consistency level for the account. The solution must meet the following requirements: • In the write region, writes must replicate synchronously across at least three replicas. • In the read regions, reads must see writes in order for transactional batches. • Throughput for reads and writes must be maximized. Which consistency level should you select?

A. Consistent Prefix
B. Bounded Staleness
C. Eventual
D. Strong
Show Answer
Correct Answer: A
Explanation:
Select Consistent Prefix. It preserves the order of writes when they are read, including writes in transactional batches. Like other consistency levels weaker than Strong, it synchronously replicates writes to at least three replicas in the write region, while avoiding the lower read throughput associated with Strong and Bounded Staleness. Eventual consistency does not guarantee write ordering.

Question 57

You plan to create an Azure Cosmos DB for NoSQL database named db1 that will contain two containers. One of the containers will contain blog posts, and the other will contain users. Each item in the blog post container will include: • A single blog post • The top 10 comments associated to the blog post • The names of the users who created the blog post and the associated comments You need to automatically update the usernames in the blog post container whenever a username in the user container changes. What should you implement for the user container?

A. a stored procedure
B. a change feed processor
C. a post-trigger
D. a user-defined function (UDF)
Show Answer
Correct Answer: B
Explanation:
Implement a change feed processor for the user container. It can detect username changes and run application logic to update the corresponding blog-post items in the other container. Stored procedures and triggers execute in the context of a single container, while a UDF cannot perform updates.

Question 58

HOTSPOT You have an Azure Cosmos DB for NoSQL account that contains a container named container1. You plan to use container1 as a key-value store that will perform point reads on the item ID and partition key. You need to define an indexing policy for container1. The solution must meet the following requirements: • Provide the ability to set DefaultTimeToLive for container1. • Minimize implementation time. • Minimize costs. How should you complete the JSON definition of the indexing policy? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-420 question 58
Show Answer
Correct Answer: indexingMode: "consistent" includedPaths: [{"path": "/_ts/?"}]
Explanation:
TTL requires indexing to remain active and uses the system timestamp (_ts). Indexing only _ts avoids indexing other properties, reducing costs for a container used solely for point reads.

Question 59

HOTSPOT You plan to create an Azure Cosmos DB database named db1 that will contain two containers. One of the containers will contain blog posts, and the other will contain users. Each item in the blog post container will include: • A single blog post • All the comments associated to the blog post • The names of the users who created the blog post and added the comments You need to design a solution to update usernames in the user container without causing data integrity issues. The solution must minimize administrative and development effort. What should you include in the solution? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-420 question 59
Show Answer
Correct Answer: User container: The change feed processor Blog post container: A stored procedure
Explanation:
The change feed processor detects username updates and invokes a stored procedure to update the denormalized usernames in affected blog posts.

Question 60

HOTSPOT You have an Azure Cosmos DB for NoSQL account named account1 in a resource group named RG1. The Azure regions for account1 are shown in the following table. You need to fail over account1 from the East US region to the Central US region by using Azure Command-Line Interface (CLI). How should you complete the command? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-420 question 60 Illustration for DP-420 question 60
Show Answer
Correct Answer: 1. failover-priority-change 2. --failover-policies
Explanation:
Set Central US to priority 0 to make it the write region, followed by West US at 1 and East US at 2.

$19

Get all 177 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.