Microsoft

DP-420 Free Practice Questions

This is the free Microsoft DP-420 practice question bank — 70 of 134 total questions, each with a full explanation, free to read with no signup required. Updated 2026-10-13.

Every answer is verified against official Microsoft documentation — see our methodology.

Question 1

You have an Azure subscription that contains an Azure Cosmos DB for NoSQL database named DB1. You develop a software as a service (SaaS) app named App1 that uses DB1. App1 will be used by multiple vendors to manage their customers. You need to create a container in DB1 that will store customer and order details for each vendor. The solution must meet the following requirements: • Each vendor must have a unique tenant ID. • The performance of the container must be optimized for reads. • Customer IDs can be duplicated across the container but must be unique for each vendor. • The container must be optimized for concurrent queries from multiple customers. Each query will return data for a single vendor. How should you configure the container?

A. Add a partition key to the tenant ID and a unique key policy to the customer ID.
B. Add hierarchical partition key on (tenant identifier, customer identifier).
C. Add a partition key to the customer ID and a unique key policy to the tenant ID.
D. Add hierarchical partition key on (customer identifier, tenant identifier).
Show Answer
Correct Answer: A
Explanation:
Use the tenant ID as the partition key so each vendor’s queries target its own partition, supporting efficient and concurrent vendor-specific reads. A unique key policy on the customer ID enforces uniqueness within each logical partition, while allowing the same customer ID in different vendors’ partitions.

Question 1

You have an Azure subscription. The subscription contains an Azure Cosmos DB for NoSQL account named account1 that uses strong consistency and is deployed to the East US, West US, and Central US Azure regions. The round-trip time (RTT) between the regions is shown in the following table. Which write latency should you estimate for write requests against account1?

Illustration for DP-420 question 1
A. 150 ms
B. 232 ms
C. 282 ms
D. 572 ms
Show Answer
Correct Answer: C
Explanation:
With strong consistency across multiple regions, estimate write latency as approximately twice the RTT to the farthest region, plus about 10 ms. The largest RTT is 136 ms (East US–West US), so 2 × 136 + 10 = 282 ms.

Question 2

You have an on-premises computer named Computer1 that runs Windows 11. On Computer1, you install the Azure Cosmos DB Emulator by using the default settings. You need to connect to the API for NoSQL clients hosted by the emulator. What should you use?

A. Computer1 and the credentials used when installing the emulator
B. localhost:443 and the built-in Administrator user account credentials
C. Computer1 and a randomly-generated key
D. localhost:8081 and a well-known key
Show Answer
Correct Answer: D
Explanation:
The Azure Cosmos DB Emulator uses the local endpoint https://localhost:8081 by default and authenticates clients with its well-known emulator key.

Question 2

HOTSPOT You have an Azure subscription that contains the resources shown in the following table. You need to query Container1 from the serverless SQL pool of workspace1. How should you complete the query? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-420 question 2 Illustration for DP-420 question 2
Show Answer
Correct Answer: FROM: OPENROWSET( After SERVER_CREDENTIAL: ) WITH
Explanation:
OPENROWSET connects the serverless SQL pool to the Cosmos DB container. The WITH clause defines the columns returned by the query.

Question 3

You are designing an Azure Cosmos DB for NoSQL solution to store data from IoT devices. Writes from the devices will occur every second. Data will be retained indefinitely. The following is a sample of the data. You need to select a partition key that meets the following requirements for writes: • Minimizes the partition skew • Avoids capacity limits • Avoids hot partitions What should you do?

Illustration for DP-420 question 3
A. Use deviceId as the partition key.
B. Create a new synthetic key that contains deviceId and timestamp.
C. Use sensor1value as the partition key.
D. Create a new synthetic key that contains deviceId and sensor1Value.
Show Answer
Correct Answer: B
Explanation:
Use a synthetic partition key combining deviceId and timestamp. This creates many distinct partition-key values and distributes the frequent writes more evenly. Using deviceId alone can concentrate writes from a busy device in one logical partition, while sensor1Value has very low cardinality and would cause severe skew.

Question 3

HOTSPOT You have an Azure Cosmos DB for NoSQL database that hosts a container named Container1. You are evaluating whether to implement Always Encrypted for Container1. How will the JSON components of the data in Container1 be affected by implementing Always Encrypted? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-420 question 3
Show Answer
Correct Answer: Leaf values: Encrypted Intermediate sub-property names: In plain text
Explanation:
Always Encrypted encrypts the values at configured JSON paths, while the intermediate property names remain readable.

Question 4

You are designing an Azure Cosmos DB for NoSQL solution to store data from IoT devices. Writes from the devices will occur every second. Data will be retained indefinitely. The following is a sample of the data. You need to select a partition key that meets the following requirements for writes: • Minimizes the partition skew • Avoids capacity limits • Avoids hot partitions What should you do?

Illustration for DP-420 question 4
A. Use deviceId as the partition key.
B. Create a new Synthetic key that contains deviceId and deviceManufacturer.
C. Use deviceManufacturer as the partition key.
D. Create a new synthetic key that contains deviceId and a random number.
Show Answer
Correct Answer: D
Explanation:
Use a synthetic partition key containing deviceId and a random value. The random component distributes a device’s frequent writes across multiple logical partitions, reducing hot partitions and helping avoid the logical partition storage limit when data is retained indefinitely. A key based only on deviceId—or deviceId plus manufacturer—would keep that device’s data in one logical partition.

Question 4

HOTSPOT You have an Azure Cosmos DB for NoSQL account that hosts a container named Container1. The items in Container1 are stored in the following format. You need to write a query to return the Given and Family names of the children in Family1. How should you complete the code? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-420 question 4 Illustration for DP-420 question 4
Show Answer
Correct Answer: JOIN c IN f.children WHERE f.id = 'Family1'
Explanation:
The JOIN iterates over the children array, and the WHERE clause selects the item whose id is Family1.

Question 5

You have an Azure subscription that contains an Azure Cosmos DB for NoSQL account named account1. You plan to configure the Apache Kafka service as a data source for account1. What should you use to store the Kafka configuration?

A. Apache Gremlin
B. Apache ZooKeeper
C. Apache Tomcat
D. Azure Key Vault
Show Answer
Correct Answer: B
Explanation:
Apache ZooKeeper is used to store and manage Apache Kafka cluster metadata and configuration.

Question 5

You are designing an Azure Cosmos DB for NoSQL solution to store data from IoT devices. Writes from the devices will occur every second. Data will be retained indefinitely. The following is a sample of the data. You need to select a partition key that meets the following requirements for writes: • Minimizes the partition skew • Avoids capacity limits • Avoids hot partitions What should you do?

Illustration for DP-420 question 5
A. Create a new synthetic key that contains deviceId and timestamp.
B. Use timestamp as the partition key.
C. Use sensor1Value as the partition key.
D. Create a new synthetic key that contains deviceId and deviceManufacturer.
Show Answer
Correct Answer: A
Explanation:
Use a synthetic partition key containing deviceId and timestamp. This creates many distinct partition-key values, spreading writes across logical partitions and reducing skew and hot partitions. It also avoids accumulating an individual device’s indefinitely retained data under a single partition key. Timestamp alone can concentrate simultaneous writes, while sensor values and manufacturer-based keys can have low or uneven cardinality.

$19

Get all 134 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.