Free DP-420 sample questions

Real questions from the Azure Cosmos DB Developer practice bank, with the correct answer and an explanation for each one. No junk, no filler.

Try them in the simulator Same questions, with study, timed and flashcard modes.

Showing 10 of 20 free sample questions.

Question 1Choose one

A global e-commerce platform uses Azure Cosmos DB for NoSQL with multi-region writes enabled to reduce latency for a worldwide user base. The consistency level is set to Session. To handle concurrent updates to a user's shopping cart, a custom conflict resolution policy has been implemented using a merge stored procedure. The policy is designed to merge the items from conflicting writes. During a sales event, users in Europe report that items they add to their cart are occasionally disappearing. Users in North America do not report this issue. The primary write region is North America. What is the most probable cause of this issue?

Question 2Choose 2

You are building an event-sourcing solution where all changes to application state are captured as a sequence of events. You use Azure Cosmos DB for NoSQL and an Azure Function with a Cosmos DB trigger to process these events. The function archives events to cold storage and updates several materialized views in other containers. During testing, you notice that if the Azure Function fails while processing a batch of changes, it re-processes the same batch again upon restart, leading to duplicate data in the materialized views. Which two actions should you take to make the function idempotent and prevent data duplication? (Select TWO)

Question 3Choose one

You are managing a large Azure Cosmos DB for NoSQL container that stores user session data. The container is configured with the default indexing policy (automatic indexing of all properties). You identify that a specific property, `sessionTrace`, contains large JSON blobs used only for debugging and is never queried. To reduce storage costs and improve write performance, you decide to exclude this property from indexing. Which JSON snippet represents the correct indexing policy to achieve this?

Question 4Choose one

A DevOps engineer is tasked with automating the deployment of an Azure Cosmos DB for NoSQL account using Azure Resource Manager (ARM) templates. The requirement is to configure the account with two regions: 'East US' as the primary write region and 'West US' as a read region. The deployment must also specify the automatic failover policy with 'West US' having a failover priority of 1. Which property within the `Microsoft.DocumentDB/databaseAccounts` resource in the ARM template should be configured to define the regions and failover priorities?

Question 5Choose one

True or False: When using the Azure Cosmos DB for NoSQL SDK and performing a transactional batch operation, all operations within the batch must target documents that reside within the same logical partition.

Question 6Choose one

You are monitoring an Azure Cosmos DB for NoSQL account using Azure Monitor. You notice that the 'Max RU/s Per Partition' metric shows one partition consistently at 10,000 RU/s, while other partitions are below 1,000 RU/s. The container is configured with autoscale throughput up to 40,000 RU/s. Despite having ample overall throughput, the application is experiencing throttling (HTTP 429 errors). What is this condition called and what is the primary solution? graph TD subgraph "RU Consumption per Physical Partition" P1["Partition 1: 10,000 RU/s"] -->|Throttling| App{Application} P2["Partition 2: 800 RU/s"] --> App P3["Partition 3: 500 RU/s"] --> App P4["Partition 4: 950 RU/s"] --> App end style P1 fill:#f77,stroke:#333,stroke-width:2px

Question 7Choose one

A developer needs to implement a point-in-time restore for a critical Azure Cosmos DB for NoSQL account. The requirement is to be able to restore the account to any state within the last 15 days with a granularity of one second. The account currently has periodic backup configured with a 4-hour interval and 2 copies retained. What is the first and most critical step the developer must take to meet the new requirement?

Question 8Choose one

You need to implement security for an Azure Cosmos DB for NoSQL account to ensure that developers on your team can only manage database and container settings (control plane operations) but cannot read or write data (data plane operations). The developers must be able to perform their tasks through the Azure portal. Which Azure role should you assign to the developers at the Cosmos DB account scope?

Question 9Choose one

An IoT application writes telemetry data to an Azure Cosmos DB for NoSQL container. The data model includes a `deviceId` and a `timestamp`. To ensure even write distribution, a synthetic partition key is created by combining `deviceId` and the current month and year (e.g., `DEVICE123-2024-08`). The application frequently queries for all data for a specific device within a given date range. An example query is `SELECT * FROM c WHERE c.deviceId = 'DEVICE123' AND c.timestamp >= '2024-08-15T00:00:00Z' AND c.timestamp <= '2024-08-15T23:59:59Z'`. How will this query execute in terms of partitioning?

Question 10Choose 3

A developer is using the Azure Cosmos DB for NoSQL .NET SDK. To optimize performance and resource utilization, they are implementing the recommended singleton pattern for the `CosmosClient` instance. Which of the following are key reasons why using a singleton `CosmosClient` is a critical best practice? (Select THREE)

10 more free samples are waiting

Create a free account to unlock the whole DP-420 sample bank, or get full access to all 183 practice questions in the simulator.

Create account