Test Online Free Microsoft DP-420 Exam Questions and Answers

The questions for DP-420 were last updated On Nov.16 2023

Get DP-420 Full Access
 / 3

Question No : 1
HOTSPOT
You need to recommend indexes for con-product and con-productVendor. The solution must meet the product catalog requirements and the business requirements.
Which type of index should you recommend for each container? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.



Answer:

Question No : 2
You have a database in an Azure Cosmos DB Core (SQL) API account. The database is backed up every two hours.
You need to implement a solution that supports point-in-time restore.
What should you do first?

Answer:
Explanation:
Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/provision-account-continuous-backup

Question No : 3
HOTSPOT
You have an Apache Spark pool in Azure Synapse Analytics that runs the following Python code in a notebook.



For each of the following statements, select Yes if the statement is true. Otherwise, select No. NOTE: Each correct selection is worth one point.



Answer:


Explanation:
New and updated orders will be added to contoso-erp.orders: Yes
The code performs bulk data ingestion from contoso-app: No
Both contoso-app and contoso-erp have Analytics store enabled: Yes
The code uses the spark.readStream method to read data from a container named orders in a database named contoso-app. The data is then filtered by a condition and written to another container named orders in a database named contoso-erp using the spark.writeStream method. The write mode is set to “append”, which means that new and updated orders will be added to the destination container1.
The code does not perform bulk data ingestion from contoso-app, but rather stream processing. Bulk data ingestion is a process of loading large amounts of data into a data store in batches. Stream processing is a process of continuously processing data as it arrives in real-time2.
Both contoso-app and contoso-erp have Analytics store enabled, because they are both accessed by Spark pools using the spark.cosmos.oltp method. This method requires that the containers have Analytics store enabled, which is a feature that allows Spark pools to query data stored in Azure Cosmos DB containers using SQL APIs3.

Question No : 4
HOTSPOT
You have an Azure Cosmos DB for NoSQL account.
You plan 10 create a container named container1. The container1 container will store items that include two properties named nm and age.
The most commonly executed queries will query container1 for a specific name.
The following is a sample of the query.



You need to define an opt-in Indexing policy for container1.
The solution must meet the following requirements:
• Minimize the number of request units consumed by the queries.
• Ensure that the _etag property is excluded from indexing.
How should you define the indexing poky? To answer, select the appropriate options in the answer area. NOTE: Each correct selection Is worth one point.



Answer:

Question No : 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.



Answer:


Explanation:
Box 1: Yes
Records with different OrderIDs will match.
Box 2: Yes
Records with different OrderIDs will match.
Box 3: No
Only records with one specific OrderId will match

Question No : 6
You have a container named container1 in an Azure Cosmos DB for NoSQL account named account1 that is set to the session default consistency level. The average size of an item in container1 is 20 KB.
You have an application named App1 that uses the Azure Cosmos DB SDK and performs a point read on the same set of items in container1 every minute.
You need to minimize the consumption of the request units (RUs) associated to the reads by App1.
What should you do?

Answer:
Explanation:
The cost of a point read for a 1 KB item is 1 RU. The cost of other operations depends on factors such as item size, indexing policy, consistency level, and query complexity1. To minimize the consumption of RUs, you can optimize these factors according to your application needs.
For your scenario, one possible way to minimize the consumption of RUs associated to the reads by App1 is to change the consistency level of read requests to consistent prefix. Consistent prefix is a lower consistency level than session, which is the default consistency level for Azure Cosmos DB. Lower consistency levels consume fewer RUs than higher consistency levels2. Consistent prefix guarantees that reads never see out-of-order writes and that monotonic reads are preserved1. This may be suitable for your application if you can tolerate some eventual consistency.

Question No : 7
HOTSPOT
You have an Azure Cosmos DB Core (SQL) API account named account1.
In account1, you run the following query in a container that contains 100GB of data.
SELECT *
FROM c
WHERE LOWER(c.categoryid) = "hockey"
You view the following metrics while performing the query.



For each of the following statements, select Yes if the statement is true. Otherwise, select No. NOTE: Each correct selection is worth one point.



Answer:


Explanation:
Box 1: No
Each physical partition should have its own index, but since no index is used, the query is not cross-partition.
Box 2: No
Index utilization is 0% and Index Look up time is also zero.
Box 3: Yes
A partition key index will be created, and the query will perform across the partitions.

Question No : 8
You have an Azure Cosmos DB Core (SQL) API account that uses a custom conflict resolution policy. The account has a registered merge procedure that throws a runtime exception.
The runtime exception prevents conflicts from being resolved.
You need to use an Azure function to resolve the conflicts.
What should you use?

Answer:
Explanation:
The Azure Cosmos DB Trigger uses the Azure Cosmos DB Change Feed to listen for inserts and updates across partitions. The change feed publishes inserts and updates, not deletions.
Reference: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb

Question No : 9
Topic 2, Misc. Questions

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.



Answer:


Explanation:
Box 1: Resource tokens
Resource tokens provide access to the application resources within a database. Resource tokens:
Provide access to specific containers, partition keys, documents, attachments, stored procedures, triggers, and UDFs.
Box 2: Azure Resource Manager API
You can use Azure Resource Manager to help deploy and manage your Azure Cosmos DB accounts, databases, and containers.

Question No : 10
HOTSPOT
You have an Azure Cosmos DB account named account1 that has a default consistency level of session.
You have an app named App1.
You need to ensure that the read operations of App1 can request either bounded staleness or consistent prefix consistency.
What should you modify for each consistency level? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.



Answer:


Explanation:
Box 1 = The request level options
Azure Cosmos DB offers five well-defined consistency levels: strong, bounded staleness, session, consistent prefix and eventual. You can configure the default consistency level on your Azure Cosmos DB account at any time2. The default consistency level applies to all databases and containers under that account1. You can also override the default consistency level for a specific request by using the request options2. Box 2 = The request level options
To modify the consistency level of a read operation in Azure Cosmos DB, you can use request-level options to override the account's default consistency setting. Therefore, to ensure that the read operations of App1 can request either consistent prefix or session consistency, you need to modify the request-level options for each operation.
Reference: - https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels

 / 3
  TOP 50 Exam Questions
Exam