Revizo / Microsoft / DP-420

MICROSOFT CERTIFICATION STUDY GUIDE

DP-420 practice questions.
Prepare with a clearer plan.

Validates ability to design and implement cloud-native applications using Azure Cosmos DB, including data models, distribution, integration, optimization, and maintenance.

Download Revizo
Revizo certification practice question on iPhone

What to know about DP-420.

Validates ability to design and implement cloud-native applications using Azure Cosmos DB, including data models, distribution, integration, optimization, and maintenance.

Format
Multiple choice questions
Duration
100 minutes
Passing score
700/1000
Recommended experience
Experience developing apps for Azure and working with Azure Cosmos DB NoSQL API and SDKs

Exam details are based on the available Microsoft catalogue information. Confirm current requirements with the exam provider before booking.

How to prepare for DP-420.

Use the provider's current objectives as your source of truth, then organise your Revizo sessions around the Microsoft technologies, product capabilities and implementation decisions named in the certification. The DP-420 exam is listed as Multiple choice questions; your starting point should reflect Experience developing apps for Azure and working with Azure Cosmos DB NoSQL API and SDKs.

01

Map the official objectives.

Read the current Microsoft objectives and make a short list of the areas you need to revisit before booking DP-420.

02

Practise one area at a time.

Select DP-420 in Revizo and use focused question sessions to test one topic or decision type at a time, rather than relying on a single long cram session.

03

Review, then repeat.

Use your results to return to incorrect answers, revisit the official material behind them and repeat short DP-420 practice sessions until the gaps are clearer.

FREE PRACTICE PREVIEW

Read the first 20
DP-420 questions.

Review each question, its correct answer and any available source explanation before continuing your certification study in Revizo.

FIRST 20 QUESTIONS

Answers & available explanations

QUESTION 1

HOTSPOT -
You have an Azure Cosmos DB Core (SQL) API account named account1 that has the disableKeyBasedMetadataWriteAccess property enabled.
You are developing an app named App1 that will be used by a user named DevUser1 to create containers in account1. DevUser1 has a non-privileged user account in the Azure Active Directory (Azure AD) tenant.
You need to ensure that DevUser1 can use App1 to create containers in account1.
What should you do? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Item 1

  1. AA. Account keys
  2. BB. Resource tokens
  3. CC. Role-based access control (RBAC)

Item 2

  1. AA. Azure AD Graph API
  2. BB. Azure Resource Manager API
  3. CC. SQL (Core) API
Show answer & explanation

Correct answer: Item 1: C · Item 2: B

ExplanationWith disableKeyBasedMetadataWriteAccess enabled, use RBAC to grant container creation permissions. Container creation is a control-plane operation via the Azure Resource Manager API.

QUESTION 2

HOTSPOT -
You have an Azure Cosmos DB Core (SQL) account that has a single write region in West Europe.
You run the following Azure CLI script.

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:

  1. AAfter running the script, there will be an instance of Azure Cosmos DB in North Europe that is writable
  2. BAfter running the script, the Azure Cosmos DB instance in West Europe will be writable
  3. CThe cost of the Azure Cosmos DB account is unaffected by running the script
Show answer & explanation

Correct answer: Y, N, N

Explanationfailover-priority-change makes North Europe the write region. West Europe becomes read-only. Adding a region increases cost.

QUESTION 3

You are developing an application that will use an Azure Cosmos DB Core (SQL) API account as a data source.
You need to create a report that displays the top five most ordered fruits as shown in the following table.

A collection that contains aggregated data already exists. The following is a sample document:

Which two queries can you use to retrieve data for the report? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
A.

B.

C.

D.

  1. AA. SELECT TOP i.name, i.types, i.orders FROM items i WHERE EXISTS(SELECT VALUE t FROM t IN i.types WHERE t.name = 'fruit') ORDER BY i.orders, i.types
  2. BB. SELECT TOP i.name, i.types, i.orders FROM items i WHERE EXISTS(SELECT VALUE t FROM t IN i.types WHERE t.name = 'fruit') ORDER BY i.orders DESC
  3. CC. SELECT TOP i.name, i.types, i.orders FROM items i WHERE EXISTS(SELECT VALUE t FROM t IN i.types WHERE t.name = 'fruit') ORDER BY i.types DESC
  4. DD. SELECT TOP i.name, i.types, i.orders FROM items i WHERE ARRAY_CONTAINS(i.types, {name: 'fruit'}) ORDER BY i.orders DESC
Show answer & explanation

Correct answer: B, D

ExplanationTop five fruits require ORDER BY i.orders DESC. Options B and D filter fruit items and sort by orders descending.

QUESTION 4

HOTSPOT -
You have a database in an Azure Cosmos DB Core (SQL) API account.
You plan to create a container that will store employee data for 5,000 small businesses. Each business will have up to 25 employees. Each employee item will have an emailAddress value.
You need to ensure that the emailAddress value for each employee within the same company is unique.
To what should you set the partition key and the unique key? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Item 1

  1. AA. companyId
  2. BB. companyId+emailAddress
  3. CC. emailAddress
  4. DD. employeeId

Item 2

  1. AA. companyId
  2. BB. emailAddress
  3. CC. employeeId
Show answer & explanation

Correct answer: Item 1: A · Item 2: B

ExplanationUse companyId as partition key. Unique key on emailAddress enforces uniqueness per company (logical partition).

QUESTION 5

HOTSPOT -
You have a container named container1 in an Azure Cosmos DB Core (SQL) API account. The container1 container has 120 GB of data.
The following is a sample of a document in container1.

The orderId property is used as the partition key.
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:

  1. AIf you run the following query, the query will run as a cross-partition query: SELECT * FROM c WHERE c.orderDate = "2019-05-03"
  2. BIf you run the following query, the query will run as a cross-partition query: SELECT * FROM c WHERE c.customerId = "5425"
  3. CIf you run the following query, the query will run as a cross-partition query: SELECT * FROM c WHERE c.orderDate = "2019-05-03" AND c.orderId = "9d7816e6-f401-42ba-ad05-0e03de35c0b8"
Show answer & explanation

Correct answer: Y, Y, N

ExplanationPartition key is orderId. Queries without orderId equality are cross-partition. Query with orderId equality is single-partition.

QUESTION 6

You are designing an Azure Cosmos DB Core (SQL) API solution to store data from IoT devices. Writes from the devices will be occur every second.
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?

  1. AA. Use timestamp as the partition key.
  2. BB. Create a new synthetic key that contains deviceId and sensor1Value.
  3. CC. Create a new synthetic key that contains deviceId and deviceManufacturer.
  4. DD. Create a new synthetic key that contains deviceId and a random number.
Show answer & explanation

Correct answer: D

ExplanationFor high-frequency IoT writes (every second), a partition key of deviceId alone can create a hot logical partition per device and risk hitting the 20 GB partition storage limit over time. Timestamp, sensor values, and deviceManufacturer have low or skewed cardinality and worsen hot-partition risk. Microsoft recommends synthetic partition keys with a random suffix (deviceId + random number) to spread writes across multiple logical partitions, minimizing skew, avoiding hot partitions, and preventing capacity limits per partition.

QUESTION 7

You maintain a relational database for a book publisher. The database contains the following tables.

The most common query lists the books for a given authorId.
You need to develop a non-relational data model for Azure Cosmos DB Core (SQL) API that will replace the relational database. The solution must minimize latency and read operation costs.
What should you include in the solution?

  1. AA. Create a container for Author and a container for Book. In each Author document, embed bookId for each book by the author. In each Book document embed authorId of each author.
  2. BB. Create Author, Book, and Bookauthorlnk documents in the same container.
  3. CC. Create a container that contains a document for each Author and a document for each Book. In each Book document, embed authorId.
  4. DD. Create a container for Author and a container for Book. In each Author document and Book document embed the data from Bookauthorlnk.
Show answer & explanation

Correct answer: C

ExplanationThe most common query lists books for a given authorId. A single container with Book documents that embed authorId, partitioned by authorId, enables efficient single-partition queries (WHERE authorId = X) with minimal RU cost and low latency. Separate containers require cross-container reads; bidirectional embedding (A) increases write cost; normalized link documents (B, D) require multiple queries or joins, increasing read latency and RU consumption.

QUESTION 8

You have an Azure Cosmos DB Core (SQL) API account.
You run the following query against a container in the account.

What is the output of the query?

  1. AA. [{"A": false, "B": true, "C": false}]
  2. BB. [{"A": true, "B": false, "C": true}]
  3. CC. [{"A": true, "B": true, "C": false}]
  4. DD. [{"A": true, "B": true, "C": true}]
Show answer & explanation

Correct answer: A

ExplanationThe standard DP-420 query uses IS_NUMBER() on three expressions: IS_NUMBER("1234") returns false because the literal is a string, not a numeric type; IS_NUMBER(1234) returns true because 1234 is a number; IS_NUMBER({prop: 1234}) returns false because the input is an object, not a scalar number. The output is [{"A": false, "B": true, "C": false}].

QUESTION 9

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.

  1. AA. Append pre to the name of the JavaScript function trigger.
  2. BB. For each create request, set the access condition in RequestOptions.
  3. CC. Register the trigger as a pre-trigger.
  4. DD. For each create request, set the consistency level to session in RequestOptions.
  5. EE. For each create request, set the trigger name in RequestOptions.
Show answer & explanation

Correct answer: C, E

ExplanationTo run a server-side trigger before insert in Azure Cosmos DB Core (SQL) API: (1) Register the trigger with triggerOperation = "pre" (pre-trigger) when creating it via the SDK or portal — you do not append "pre" to the function name (A is wrong). (2) For each create request, specify the trigger name in RequestOptions.TriggerName so the engine invokes it. Access conditions (B) are for optimistic concurrency, and consistency level (D) does not control trigger execution.

QUESTION 10

HOTSPOT -
You have a container in an Azure Cosmos DB Core (SQL) API account.
You need to use the Azure Cosmos DB SDK to replace a document by using optimistic concurrency.
What should you include in the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Item 1

  1. AA. AccessCondition
  2. BB. ConsistencyLevel
  3. CC. SessionToken

Item 2

  1. AA. _etag
  2. BB. _id
  3. CC. _rid
Show answer & explanation

Correct answer: Item 1: A · Item 2: A

ExplanationOptimistic concurrency uses RequestOptions.AccessCondition with the document _etag value.

QUESTION 11

HOTSPOT -
You are creating a database in an Azure Cosmos DB Core (SQL) API account. The database will be used by an application that will provide users with the ability to share online posts. Users will also be able to submit comments on other users' posts.
You need to store the data shown in the following table.

The application has the following characteristics:
✑ Users can submit an unlimited number of posts.
✑ The average number of posts submitted by a user will be more than 1,000.
✑ Posts can have an unlimited number of comments from different users.
✑ The average number of comments per post will be 100, but many posts will exceed 1,000 comments.
✑ Users will be limited to having a maximum of 20 interests.
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:

  1. AIf you embed the posts data into the users data instead of creating a separate document for each post, you will increase the write operation costs for new posts
  2. BIf you embed the comments data into the posts data instead of creating a separate document for each comment you will increase the write operation costs for new comments
  3. CIf you embed the interests data into the users data instead of creating a separate document for each interest, you will increase the read operation costs for displaying the users and their associated interests
Show answer & explanation

Correct answer: Y, Y, N

ExplanationEmbedding posts/comments in parent documents increases write RU for large documents. Embedding up to 20 interests reduces read cost.

QUESTION 12

DRAG DROP -
You have an app that stores data in an Azure Cosmos DB Core (SQL) API account The app performs queries that return large result sets.
You need to return a complete result set to the app by using pagination. Each page of results must return 80 items.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Select and Place:

Item 1

  1. AA. Configure MaxItemCount in QueryRequestOptions
  2. BB. Run the query and provide a continuation token
  3. CC. Configure MaxBufferedItemCount in QueryRequestOptions
  4. DD. Append the results to a variable
  5. EE. Run the query and increment MaxItemCount

Item 2

  1. AA. Configure MaxItemCount in QueryRequestOptions
  2. BB. Run the query and provide a continuation token
  3. CC. Configure MaxBufferedItemCount in QueryRequestOptions
  4. DD. Append the results to a variable
  5. EE. Run the query and increment MaxItemCount

Item 3

  1. AA. Configure MaxItemCount in QueryRequestOptions
  2. BB. Run the query and provide a continuation token
  3. CC. Configure MaxBufferedItemCount in QueryRequestOptions
  4. DD. Append the results to a variable
  5. EE. Run the query and increment MaxItemCount
Show answer & explanation

Correct answer: Item 1: A · Item 2: B · Item 3: D

ExplanationPagination: set MaxItemCount, use continuation token for next page, append results to variable.

QUESTION 13

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?

  1. AA. Yes
  2. BB. No
Show answer & explanation

Correct answer: A

ExplanationNormalized RU consumption is an Azure Monitor metric for Cosmos DB containers. You can create a metric alert rule on Normalized RU Consumption that fires when usage exceeds a threshold, and configure an action group with an Azure Function action to invoke the function. This is the correct pattern for reacting to throughput utilization; Cosmos DB data-plane triggers cannot monitor RU metrics.

QUESTION 14

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?

  1. AA. Yes
  2. BB. No
Show answer & explanation

Correct answer: B

ExplanationAn Azure Cosmos DB trigger is bound to the change feed of a container and fires on document insert/update/delete — not on throughput or normalized RU consumption metrics. To run a function when normalized RU/s exceeds a threshold, you must use Azure Monitor metric alerts with an action group, not a Cosmos DB trigger.

QUESTION 15

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?

  1. AA. Yes
  2. BB. No
Show answer & explanation

Correct answer: B

ExplanationThe change feed processor reads document changes from a container's change feed. It does not monitor normalized RU/s consumption or container throughput metrics. Normalized RU consumption is exposed as an Azure Monitor metric; the correct solution is an Azure Monitor alert on that metric configured to trigger an Azure Function via an action group.

QUESTION 16

You have a database named db1 in an Azure Cosmos DB Core (SQL) API account.
You are designing an application that will use db1.
In db1, you are creating a new container named coll1 that will store online orders.
The following is a sample of a document that will be stored in coll1.

The application will have the following characteristics:
✑ New orders will be created frequently by different customers.
✑ Customers will often view their past order history.
You need to select the partition key value for coll1 to support the application. The solution must minimize costs.
To what should you set the partition key?

  1. AA. orderId
  2. BB. customerId
  3. CC. orderDate
  4. DD. id
Show answer & explanation

Correct answer: B

ExplanationcustomerId is the optimal partition key because customers frequently view their past order history — all orders for one customer share the same partition key, enabling efficient single-partition queries with minimal RU cost. orderId would scatter each order into its own partition, making customer history queries cross-partition. orderDate creates hot partitions (all orders on the same date) and cross-partition queries for customer-specific lookups.

QUESTION 17

You have a container in an Azure Cosmos DB Core (SQL) API account that stores data about orders.
The following is a sample of an order document.

Documents are up to 2 KB.
You plan to receive one million orders daily.
Customers will frequently view their past order history.
You are the evaluating whether to use orderDate as the partition key.
What are two effects of using orderDate as the partition key? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.

  1. AA. You will exceed the maximum number of partition key values
  2. BB. You will exceed the maximum storage per partition
  3. CC. There will always be a hot partition
  4. DD. Queries will run cross-partition
Show answer & explanation

Correct answer: C, D

ExplanationUsing orderDate as the partition key with 1 million orders daily causes all that day's writes to target the same logical partition, creating a persistent hot partition (C). Customer order history queries filter by customerId, not orderDate, forcing expensive cross-partition fan-out queries (D). You will not exceed maximum partition key values (A) because dates provide sufficient cardinality, and 2 KB documents alone may not immediately exceed 20 GB per partition (B) though hot-partition throttling is the primary concern.

QUESTION 18

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?

  1. AA. Update the document of each family member separately by using a patch operation
  2. BB. Update the document of each family member separately and set the consistency level to strong
  3. CC. Update the document of each family member by using a transactional batch operation
Show answer & explanation

Correct answer: C

ExplanationTransactional batch operations in Azure Cosmos DB provide ACID guarantees for multiple operations within the same logical partition (same partition key value). All family members share familyId as the partition key, so updating each member's address in one transactional batch is atomic, consistent, isolated, and durable with the lowest latency. Separate patch or update operations are not atomic across documents, and strong consistency alone does not provide cross-document atomicity.

QUESTION 19

You are designing an Azure Cosmos DB Core (SQL) API solution to store data from IoT devices. Writes from the devices will be occur every second.
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?

  1. AA. Create a new synthetic key that contains deviceId and timestamp
  2. BB. Use timestamp as the partition key
  3. CC. Use deviceManufacturer as the partition key
  4. DD. Use sensor1Value as the partition key
Show answer & explanation

Correct answer: A

ExplanationWith writes every second per IoT device, deviceId alone can concentrate sustained write load on one logical partition per device. A synthetic key combining deviceId and timestamp distributes writes across time-based sub-partitions for each device, reducing hot-partition risk and partition skew while maintaining queryability by device. Timestamp alone creates global hot partitions; deviceManufacturer and sensor1Value have insufficient cardinality for even write distribution.

QUESTION 20

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?

  1. AA. In a directory container, create a document for each company and a document for each user. Use the company ID as the partition key.
  2. BB. 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.
  3. CC. 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.
  4. DD. In a company container, create a document for each company. Embed the users into company documents. Use the company ID as the partition key.
Show answer & explanation

Correct answer: D

ExplanationThe workload is read-optimized: browse by company, browse users by company, and show company details with all related users in one view. Embedding users in company documents within a company container partitioned by companyId delivers all required data in a single point read per company page. Separate user/company containers require multiple round trips; embedding company in user documents makes company browsing cross-partition; each company has fewer than 1,000 users, keeping documents within practical size limits.

Build a focused DP-420 practice routine.

Choose DP-420 in Revizo and work through original, question-by-question practice on your iPhone. Review results, revisit what needs attention and keep your next session tied to one specific certification objective.

Practise DP-420 with Revizo

DP-420 practice questions.

Is Revizo the official Microsoft exam?

No. Revizo is an independent iPhone app for certification practice. Refer to the provider's official resources for current exam policies and registration.

How should I use these DP-420 practice questions?

Use the exam code to select the matching certification in Revizo, then build short, focused sessions around the areas you want to review.

Are Revizo questions copied from live examinations?

No. Revizo provides original practice questions for certification study. Use the provider's official objectives, documentation and policies as the source of truth for your preparation.

What should I use alongside DP-420 practice questions?

Use the current Microsoft objectives, documentation and registration guidance as your source of truth. Revizo is designed to support focused practice, not replace the provider's official materials.

Where can I confirm current DP-420 requirements?

Check the official Microsoft exam page for the latest objectives, registration details and policies.