Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB
Exam Details
Exam Code
:DP-420
Exam Name
:Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB
Certification
:Microsoft Certifications
Vendor
:Microsoft
Total Questions
:158 Q&As
Last Updated
:Mar 23, 2025
Microsoft Microsoft Certifications DP-420 Questions & Answers
Question 1:
You have a container in an Azure Cosmos DB for NoSQL account. You need to create an alert based on a custom Log Analytics query. Which signal type should you use?
A. Log
B. Metrics
C. Activity Log
D. Resource Health
Correct Answer: A
Explanation:
You can receive an alert based on the metrics, activity log events, or Log Analytics logs on your Azure Cosmos DB account:
*-> Log Analytics logs– This alert triggers when the value of a specified property in the results of a Log Analytics query crosses a threshold you assign. For example, you can write a Log Analytics query to monitor if the storage for a logical
partition key is reaching the 20 GB logical partition key storage limit in Azure Cosmos DB.
Incorrect:
Metrics - The alert triggers when the value of a specified metric crosses a threshold you assign. For example, when the total request units consumed exceed 1000 RU/s. This alert is triggered both when the condition is first met and then
afterwards when that condition is no longer being met.
Activity log events – This alert triggers when a certain event occurs. For example, when the keys of your Azure Cosmos DB account are accessed or refreshed.
You develop an application that uses Azure Cosmos DB Core (SQL) API.
You create an Azure pipeline to build and deploy the application.
You need to change the pipeline to run integration tests that you wrote for the application. The solution must execute entirely in the pipeline.
What should you add to the pipeline?
A. a deployment group named Cosmos DB testing
B. an Azure Cosmos DB Emulator task
C. a NuGet service connection that uses an Azure Cosmos DB API key
D. a secret variable that has a connection string to an Azure Cosmos DB database
Correct Answer: B
Explanation:
Set up a CI/CD pipeline with the Azure Cosmos DB Emulator build task in Azure DevOps
The Azure Cosmos DB Emulator provides a local environment that emulates the Azure Cosmos DB service for development purposes. The emulator allows you to develop and test your application locally, without creating an Azure
You have an Azure Cosmos DB database that contains a container named container1. The container1 container is configured with a maximum of 20,000 RU/s and currently contains 240 GB of data.
You need to estimate the costs of container1 based on the current usage.
How many RU/s will be charged?
A. 240
B. 4,000
C. 20,000
D. 24,000
Correct Answer: B
Incorrect:
Not A: Request Units in Azure Cosmos DB
The minimum RU/s is here MAX(400, 240 * 1 RU/s per GB, 20,000 RU/s / 100) = MAX(400, 240, 200)=400 RU/s.
Note: Minimum throughput on container
To estimate the minimum throughput required of a container with manual throughput, find the maximum of:
400 RU/s
Current storage in GB * 1 RU/s
Highest RU/s ever provisioned on the container / 100
For example, you have a container provisioned with 400 RU/s and 0-GB storage. You increase the throughput to 50,000 RU/s and import 20 GB of data. The minimum RU/s is now MAX(400, 20 * 1 RU/s per GB, 50,000 RU/s / 100) = 500 RU/
s. Over time, the storage grows to 2000 GB. The minimum RU/s is now MAX(400, 2000 * 1 RU/s per GB, 50,000 / 100) = 2000 RU/s.
You have an Azure Cosmos DB for NoSQL account named account1.
You need to create a container named Container1 in account1 by using the Azure Cosmos DB .NET SDK. The solution must ensure that the items in Container1 never expire.
What should you set?
A. TimeToLivePropertyPath to null
B. TimeToLivePropertyPath to 0
C. DefaultTimeToLive to null
D. DefaultTimeToLive to –1
Correct Answer: D
Explanation:
Time to live for containers and items
The time to live value is set in seconds, and it is interpreted as a delta from the time that an item was last modified. You can set time to live on a container or an item within the container:
Time to Live on a container (set using DefaultTimeToLive):
If missing (or set to null), items are not expired automatically.
If present and the value is set to "-1", it is equal to infinity, and items don't expire by default.
If present and the value is set to some non-zero number "n" – items will expire "n" seconds after their last modified time.
You have an Azure Cosmos DB for NoSQL account configured for global distribution across four regions.
At connection time, the SQL SDK needs to identify the optimal endpoint for reading and writing.
Which two factors can influence the SDK? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
A. the consistency level in RequestOptions
B. regional latency
C. the default consistency level
D. the PreferredLocations configuration
E. a region being available
Correct Answer: DE
Explanation:
Connecting to a preferred region using the API for NoSQL
The SDKs accept an optional parameter PreferredLocations that is an ordered list of Azure regions.
The SDK will automatically send all writes to the current write region. All reads will be sent to the first available region in the preferred locations list. If the request fails, the client will fail down the list to the next region.
The SDK will only attempt to read from the regions specified in preferred locations. So, for example, if the Azure Cosmos DB account is available in four regions, but the client only specifies two read(non-write) regions within the
PreferredLocations, then no reads will be served out of the read region that is not specified in PreferredLocations. If the read regions specified in the PreferredLocations list are not available, reads will be served out of write region.
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:
{
"name": "apple",
"type": ["fruit", "exotic"],
"orders": 10000
}
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. Option A
B. Option B
C. Option C
D. Option D
Correct Answer: BD
ARRAY_CONTAINS returns a Boolean indicating whether the array contains the specified value. You can check for a partial or full match of an object by using a boolean expression within the command. Incorrect Answers:
A: Default sorting ordering is Ascending. Must use Descending order.
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:
1.
Minimizes the partition skew
2.
Avoids capacity limits
3.
Avoids hot partitions What should you do?
A. Use timestampas the partition key.
B. Create a new synthetic key that contains deviceIdand sensor1Value.
C. Create a new synthetic key that contains deviceIdand deviceManufacturer.
D. Create a new synthetic key that contains deviceIdand a random number.
Correct Answer: D
Use a partition key with a random suffix. Distribute the workload more evenly is to append a random number at the end of the partition key value. When you distribute items in this way, you can perform parallel write operations across partitions.
Incorrect Answers:
A: You will also not like to partition the data on “DateTime”, because this will create a hot partition. Imagine you have partitioned the data on time, then for a given minute, all the calls will hit one partition. If you need to retrieve the data for a customer, then it will be a fan-out query because data may be distributed on all the partitions.
B: Senser1Value has only two values.
C: All the devices could have the same manufacturer.
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Microsoft exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your DP-420 exam preparations and Microsoft certification application, do not hesitate to visit our Vcedump.com to find your solutions here.