Free DP-420 Sample Questions — Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB

Free DP-420 sample questions for the Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB exam. No account required: study at your own pace.

Want an interactive quiz? Take the full DP-420 practice test

Looking for more? Click here to get the full PDF with 68+ practice questions for $10 for offline study and deeper preparation.

Question 1

You need to select the partition key for con-iot1. The solution must meet the IoT telemetry requirements. What should you select?

  • A. the timestamp
  • B. the humidity
  • C. the temperature
  • D. the device ID
Show Answer
Correct Answer:
D. the device ID
Question 2

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
Show Answer
Correct Answer:
A. Log
Question 3

You have an Azure Cosmos DB for NoSQL account that uses the default consistency level. How can the consistency level be modified as part of a query request?

  • A. stronger consistency for write operations
  • B. weaker consistency for write operations
  • C. stronger consistency for read operations
  • D. weaker consistency for read operations
Show Answer
Correct Answer:
D. weaker consistency for read operations
Question 4

Your company develops an application named App1 that uses the Azure Cosmos DB SDK and the Eventual consistency level. App1 queries an Azure Cosmos DB for NoSQL account named account1. You need to identify which consistency level to assign to App1 to meet the following requirements: • Maximize the throughput of the queries generated by App1 without increasing the number of request units currently used by the queries. • Provide the highest consistency guarantees. Which consistency level should you identify?

  • A. Strong
  • B. Bounded Staleness
  • C. Session
  • D. Consistent Prefix
Show Answer
Correct Answer:
B. Bounded Staleness
Question 5

You provision an Azure Cosmos DB for NoSQL container. You set the throughput to Autoscale, and the maximum request units per second (RU/s) to 20,000. For how many RU/s will you be charged when the actual RU/s usage is zero?

  • A. 0
  • B. 200
  • C. 2,000
  • D. 4,000
  • E. 10,000
Show Answer
Correct Answer:
C. 2,000
Question 6

You need to configure an Apache Kafka instance to ingest data from an Azure Cosmos DB Core (SQL) API account. The data from a container named telemetry must be added to a Kafka topic named iot. The solution must store the data in a compact binary format. Which three configuration items should you include in the solution? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  • A. "connector.class": "com.azure.cosmos.kafka.connect.source.CosmosDBSourceConnector"
  • B. "key.converter": "org.apache.kafka.connect.json.JsonConverter"
  • C. "key.converter": "io.confluent.connect.avro.AvroConverter"
  • D. "connect.cosmos.containers.topicmap": "iot#telemetry"
  • E. "connect.cosmos.containers.topicmap": "iot"
  • F. "connector.class": "com.azure.cosmos.kafka.connect.source.CosmosDBSinkConnector"
Show Answer
Correct Answer:
  • A. "connector.class": "com.azure.cosmos.kafka.connect.source.CosmosDBSourceConnector"
  • C. "key.converter": "io.confluent.connect.avro.AvroConverter"
  • D. "connect.cosmos.containers.topicmap": "iot#telemetry"
Question 7

You have a container named container1 in an Azure Cosmos DB Core (SQL) API account. You need to provide a user named User1 with the ability to insert items into container1 by using role-based access control (RBAC). The solution must use the principle of least privilege. Which roles should you assign to User1?

  • A. CosmosDB Operator only
  • B. DocumentDB Account Contributor and Cosmos DB Built-in Data Contributor
  • C. DocumentDB Account Contributor only
  • D. Cosmos DB Built-in Data Contributor only
Show Answer
Correct Answer:
D. Cosmos DB Built-in Data Contributor only
Question 8

You plan to store order data in an Azure Cosmos DB Core (SQL) API account. The data contains information about orders and their associated items. You need to develop a model that supports order read operations. The solution must minimize the number of requests. What should you do?

  • A. Create a database for orders and a database for order items
  • B. Create a single database that contains a container for orders and a container for order items
  • C. Create a single database that contains one container. Store orders and order items in separate documents in the container
  • D. Create a single database that contains one container. Create a separate document for each order and embed the order items into the order documents
Show Answer
Correct Answer:
D. Create a single database that contains one container. Create a separate document for each order and embed the order items into the order documents
Question 9

You have an Azure Cosmos DB for NoSQL account. You configure the diagnostic settings to send all log information to a Log Analytics workspace. You need to identify when the provisioned request units per second (RU/s) for resources within the account were modified. You write the following query. AzureDiagnostics - | where Category == "ControlPlaneRequests" What should you include in the query?

  • A. | where OperationName startswith "RegionAddComplete"
  • B. | where OperationName startswith "SqlContainersCreate"
  • C. | where OperationName startswith "MongoCollectionsThroughputUpdate"
  • D. | where OperationName startswith "SqlContainersThroughputUpdate"
Show Answer
Correct Answer:
D. | where OperationName startswith "SqlContainersThroughputUpdate"
Question 10

You plan to create an Azure Cosmos DB for NoSQL account that will have a single write region and three read regions. You need to set the consistency level for the account. The solution must meet the following requirements: • In the write region, writes must replicate synchronously across at least three replicas. • In the read regions, reads must see writes in order for transactional batches. • Throughput for reads and writes must be maximized. Which consistency level should you select?

  • A. Consistent Prefix
  • B. Bounded Staleness
  • C. Eventual
  • D. Strong
Show Answer
Correct Answer:
A. Consistent Prefix
Question 11

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
Show Answer
Correct Answer:
C. DefaultTimeToLive to null
Question 12

You have a database named db1 in an Azure Cosmos DB Core (SQL) API account. You have a third-party application that is exposed through a REST API. You need to migrate data from the application to a container in db1 on a weekly basis. What should you use?

  • A. Azure Migrate
  • B. Azure Data Factory
  • C. Database Migration Assistant
Show Answer
Correct Answer:
B. Azure Data Factory
Question 13

You have an Azure Cosmos DB for NoSQL container named Contained that has a provisioned throughput of 1,000 request units per second (RU/s). Contained is queried by using an app named App1. Users of App1 report that several times a day, they receive the following error message: “HTTP error code 429” You need to improve the reliability of App1 without affecting the performance of the app. What are two ways to improve the reliability? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

  • A. Add a trigger to Container1
  • B. Update App1 to split large requests into several smaller requests
  • C. Update App1 to reduce the size of each request to less than 1 MB
  • D. Increase the provisioned throughout of Container1
  • E. Add retry logic to App1
Show Answer
Correct Answer:
  • D. Increase the provisioned throughout of Container1
  • E. Add retry logic to App1
Question 14

You plan to create an Azure Cosmos DB for NoSQL database named db1 that will contain two containers. One of the containers will contain blog posts, and the other will contain users. Each item in the blog post container will include: • A single blog post • The top 10 comments associated to the blog post • The names of the users who created the blog post and the associated comments You need to automatically update the usernames in the blog post container whenever a username in the user container changes. What should you implement for the user container?

  • A. a stored procedure
  • B. a change feed processor
  • C. a post-trigger
  • D. a user-defined function (UDF)
Show Answer
Correct Answer:
B. a change feed processor
Question 15

You have an Azure Cosmos DB Core (SQL) API account. You need to create an Azure Monitor query that lists recent modifications to the regional failover policy. Which Azure Monitor table should you query?

  • A. CDBControlPlaneRequests
  • B. CDBQueryRunTimeStatistics
  • C. CDBPartitionKeyStatistics
  • D. CDBDataPlaneRequests
Show Answer
Correct Answer:
A. CDBControlPlaneRequests
Question 16

You have an Azure Cosmos DB for NoSQL container named Container1 that contains 20,000 items. The items have 1,000 unique partition key values. Each item is 50 KB. You need to evaluate the cost of running cross-partition queries by using Container1. What should you do first?

  • A. Recreate Container1 by using a partition key that has higher cardinality
  • B. Increase the number of items in Container1
  • C. Recreate Container1 by using a partition key that has lower cardinality
  • D. Decrease the number of items in Container1
Show Answer
Correct Answer:
A. Recreate Container1 by using a partition key that has higher cardinality
Question 17

You need to create a database in an Azure Cosmos DB Core (SQL) API account. The database will contain three containers named coll1, coll2, and coll3. The coll1 container will have unpredictable read and write volumes. The coll2 and coll3 containers will have predictable read and write volumes. The expected maximum throughput for coll1 and coll2 is 50,000 request units per second (RU/s) each. How should you provision the collection while minimizing costs?

  • A. Create a serverless account
  • B. Create a provisioned throughput account. Set the throughput for coll1 to Autoscale. Set the throughput for coll2 and coll3 to Manual
  • C. Create a provisioned throughput account. Set the throughput for coll1 to Manual. Set the throughput for coll2 and coll3 to Autoscale
Show Answer
Correct Answer:
B. Create a provisioned throughput account. Set the throughput for coll1 to Autoscale. Set the throughput for coll2 and coll3 to Manual
Question 18

You plan to create an operational system that will store data in an Azure Cosmos DB Core (SQL) API account. You need to configure the account to meet the following requirements: • Support Spark queries. • Support the analysis of data from the last six months. • Only pay for analytical compute when running queries. Which three actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  • A. Enable Azure Synapse Link for the account
  • B. Create a container and set the analyticalTTL property to six months
  • C. Create an Azure Databricks notebook
  • D. Create an Azure Synapse linked service
  • E. Create a container and set the time to live to six months
  • F. Create an Azure Synapse pipeline
Show Answer
Correct Answer:
  • A. Enable Azure Synapse Link for the account
  • B. Create a container and set the analyticalTTL property to six months
  • C. Create an Azure Databricks notebook
Question 19

You have an Azure subscription that contains an Azure Cosmos DB for NoSQL database named DB1. In DB1, you plan to create a container that will use a hierarchical partition key. You need to identify which hierarchical partition key path to use when adding new items to the container. Which SDK class should you use?

  • A. CompositePath
  • B. PartitionKeyDefinition
  • C. PartitionKey
  • D. PartitionKeyBuilder
Show Answer
Correct Answer:
D. PartitionKeyBuilder
Question 20

You have an Azure subscription. The subscription contains an Azure Cosmos DB for NoSQL account named account1 that hosts a container named Container1. Container1 has a provisioned throughput of 100 request units per second (RU/s) and uses a single physical partition. You are evaluating the available throughput for Container1. What is the maximum burst capacity that Container1 can accumulate?

  • A. 300 RU/s
  • B. 1,000 RU/s
  • C. 30,000 RU/s
  • D. 100,000 RU/s
Show Answer
Correct Answer:
C. 30,000 RU/s

Aced these? Get the Full Exam

Download the complete DP-420 study bundle with 68+ questions in a single printable PDF.