Free DP-420 Exam Braindumps
Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Questions 26–30 (page: 7)

Updated On: 16-Nov-2026
View Related Case Study

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?

  1. Computer1 and the credentials used when installing the emulator
  2. localhost:443 and the built-in Administrator user account credentials
  3. Computer1 and a randomly-generated key
  4. localhost:8081 and a well-known key

Answer(s): D

Explanation:

Develop locally using the Azure Cosmos DB emulator
Create a new instance of CosmosClient using the emulator's credentials.
In C#
using CosmosClient client = new(
accountEndpoint: "https://localhost:8081/",
authKeyOrResourceToken: "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8m GGyPMbIZnqyMsEcaGQy67XIw/Jw=="
);


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-develop-emulator



View Related Case Study

You have an Azure Cosmos DB for NoSQL database that hosts a container named Container1.
For Container1, the DefaultTimeToLive property is -1.
You insert an item into Container1. The ttl property of the inserted item is 1000.
When will the item be deleted automatically?

  1. one second after the item is last accessed
  2. 1,000 seconds after the item is last accessed
  3. 1,000 seconds after the item is last modified
  4. never

Answer(s): C

Explanation:

The item will be deleted after 1,000 seconds (approximately 16.7 minutes) from the time it was last modified.
In Azure Cosmos DB, the Time to Live (TTL) logic follows a specific hierarchy of precedence:
TTL Logic Breakdown
Container Level (DefaultTimeToLive = -1): This setting enables TTL for the container but instructs Cosmos DB to never expire items by default.
Item Level (ttl = 1000): When an individual item has a ttl property, it overrides the container-level setting.
The Result: Because the item-level value is a positive integer, the system honors that specific duration for that specific item.


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-time-to-live



View Related Case Study

HOTSPOT (Drag and Drop is not supported)
You plan to create an Azure Cosmos DB container named account that will contain items in the following format.

You need to define a query that will return the ids of all accounts that have ever recorded a negative value for balance.
How should you complete the query? To answer select the appropriate options in the answer area.
Note: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: n IN c.balanceStatus
Subqueries in Azure Cosmos DB for NoSQL
Example: In this case, we're checking to see if the tags array contains an item named "outerwear."
SELECT p.name, p.tags
FROM
products p
WHERE
EXISTS (SELECT VALUE t FROM t IN p.tags WHERE t = "outerwear")
Box 2: n.balance
Using EXISTS can help to avoid this expensive cross-product. In this next example, the query filters on array elements within the EXISTS subquery. If an array element matches the filter, then you project it and EXISTS evaluates to true.
SELECT VALUE p.name
FROM
products p
WHERE
EXISTS (SELECT VALUE
a
FROM
a IN p.accessories
WHERE a.type = "chains" AND a.quantityOnHand >= 10)


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/subquery



View Related Case Study

You have an Azure Cosmos DB for NoSQL account named account1.
You plan to implement shared database containers in account1.
Upon which two properties is the throughput of a specific container dependent? Each correct answer presents part of the solution.
Note: Each correct answer is worth one point.

  1. the number of databases
  2. the maximum throughput of the database
  3. the number of physical partitions
  4. the choice of partition keys
  5. the number of containers

Answer(s): D,E

Explanation:

The two properties that affect the throughput of a specific container sharing database-level provisioned throughput are the number of containers in the database and the choice of partition keys across those containers.
Because all containers in a shared-throughput database share the same pool of provisioned Request Units (RU/s), Azure Cosmos DB cannot guarantee predictable performance for any single container. Instead, the throughput available to a specific container depends on these factors:
[D]
The Choice of Partition Keys
Throughput Distribution: At any given time, the throughput allocated to a shared container is distributed across its logical partitions.
Impact: If multiple containers share the same underlying physical storage partitions, an uneven distribution of the workload (or choosing a partition key that causes "hot partitions") will directly throttle or limit the remaining throughput available to other co-located containers.
[E]
The Number of Containers
Resource Dilution: All containers within the database compete for the same aggregate provisioned RU/s.
Impact: Adding more containers to the database natively reduces the slice of the throughput pool available to any individual container under heavy workloads.


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/set-throughput



View Related Case Study

HOTSPOT (Drag and Drop is not supported)
You have an Azure Cosmos DB for NoSQL account named account1.
The diagnostics logs of account1 are forwarded to a Log Analytics workspace.
You need to identify the request charge in RUs for the 100 largest queries.
How should you complete the query? To answer, select the appropriate options in the answer area.
Note: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: CDBQueryRuntimeStatistics
Example query:
To find the request charge for the 100 largest queries, run this Kusto Query Language (KQL) query in your Log Analytics workspace:
CDBQueryRuntimeStatistics
| where TimeGenerated > ago(24h)
| project TimeGenerated, ActivityId, Querytext
| join kind=inner (
CDBDataPlaneRequests
| where TimeGenerated > ago(24h)
| where OperationName in ("Query", "ExecuteJavaScript")
| project ActivityId, RequestCharge, TableName
) on ActivityId
| order by RequestCharge desc
| take 100
Box 2: CDBDataPlaneRequests


Reference:

https://medium.com/emerline-tech-talk/mastering-azure-cosmos-db-the-ultimate-guide-for-developers-7e4d6d2 9caff



Viewing page 7 of 61
Viewing questions 31 - 35 out of 296 questions


Post your Comments and Discuss Microsoft DP-420 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!