Weekend Special - 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: discactive

Microsoft DP-420 Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Exam Practice Test

Page: 1 / 20
Total 204 questions

Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Questions and Answers

Question 1

You have an Azure subscription that contains a resource group named RG1. RG1 contains an Azure Cosmos DB for NoSQL account named account1.

You plan to audit changes to the control plane of account1.

You need to ensure that audit events include the details of the security principal that performs each control plane change.

How should you complete the az command? To answer select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Question # 1

Options:

Question 2

You have an Azure subscription that contains an Azure Cosmos DB for NoSQL database named DB1. The shared throughput provisioned for DB1 is 10,000 DTU/s. DB1 contains the containers shown in the following table.

Question # 2

You need to modify the throughput for the containers. The solution must meet the following requirements:

• The maximum throughput for Container1 must be 4,000 DTU/s.

• The throughput for Contained must be shared across the containers.

• Administrative effort must be minimized.

What should you do? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Question # 2

Options:

Question 3

You have an Azure Cosmos DB database named databaset contains a container named container1. The container1 container store product data and has the following indexing policy.

Question # 3

Which path will be indexed?

Options:

A.

/product/brand

B.

/product/category

C.

/product/[ ]/category

D.

/product/brand/tailspin

Question 4

You plan to create an operational system that will store data in an Azure Cosmos OB ' or NoSQL 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.

Options:

A.

Create an Azure Synapse linked service.

B.

Create a container and set the time to live to six months.

C.

Create a container and set the analytical property to six months.

D.

Create an Azure Synapse pipeline.

E.

Create an Azure Databanks notebook.

F.

Enable Azure Synapse Link for the account

Question 5

You have an Azure Cosmos DB for NoSQL database that hosts a container named Container^

You are developing a new app named App1 that will use Container 1.

You need to ensure that when App1 attempts to delete a document in Container1, the action is blocked, and an error is returned to the app.

What should you use?

Options:

A.

a post-trigger

B.

a stored procedure

C.

a user-defined function (UDF)

D.

a pre-trigger

Question 6

The settings for a container in an Azure Cosmos DB Core (SQL) API account are configured as shown in the following exhibit.

Question # 6

Which statement describes the configuration of the container?

Options:

A.

All items will be deleted after one year.

B.

Items stored in the collection will be retained always, regardless of the items time to live value.

C.

Items stored in the collection will expire only if the item has a time to live value.

D.

All items will be deleted after one hour.

Question 7

You have a development environment that uses multiple Azure subscriptions.

You plan to deploy a single Azure Cosmos DB account that will contain a single database in each subscription.

You need to automate the deployment by using an Azure Resource Manager (ARM) template. The solution must meet the following requirements:

• Minimize Azure Cosmos DB-related charges.

• Maximize the available request units per second (RU/s) without increasing costs.

How should you complete the template? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Question # 7

Options:

Question 8

You have an Azure Cosmos DB for NoSQL 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?

Options:

A.

a function that pulls items from the change feed and is triggered by a timer trigger

B.

a function that receives items pushed from the conflicts feed and is triggered by an Azure Cosmos DB trigger

C.

a function that pulls items from the conflicts feed and is triggered by a timer trigger

D.

a function that receives items pushed from the change feed and is triggered by an Azure Cosmos DB trigger

Question 9

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have an Azure Cosmos DB Core (SQL) API account named account 1 that uses autoscale throughput.

You need to run an Azure function when the normalized request units per second for a container in account1 exceeds a specific value.

Solution: You configure an Azure Monitor alert to trigger the function.

Does this meet the goal?

Options:

A.

Yes

B.

No

Question 10

You have an Azure Cosmos DB for NoSQL database named db1 that writes to multiple Azure regions. You need to test the performance of db1 in the secondary region. Which command should you run first?

Options:

A.

az cosmosdb location show

B.

az cosmosdb failover-priority-change

C.

az cosmosdb network-rule remove

D.

az cosmosdb sql database merge

Question 11

You maintain a relational database for a book publisher. The database contains the following tables.

Question # 11

The most common query lists the books for a given authorId.

You need to develop a non-relational data model for Azure Cosmos DB Core (SQL) API that will replace the relational database. The solution must minimize latency and read operation costs.

What should you include in the solution?

Options:

A.

Create a container for Author and a container for Book. In each Author document, embed booked for each book by the author. In each Book document embed author of each author.

B.

Create Author, Book, and Bookauthorlnk documents in the same container.

C.

Create a container that contains a document for each Author and a document for each Book. In each Book document, embed authorId.

D.

Create a container for Author and a container for Book. In each Author document and Book document embed the data from Bookauthorlnk.

Question 12

You have a container in an Azure Cosmos DB Core (SQL) API account. The container stores telemetry data from IoT devices. The container uses telemetryId as the partition key and has a throughput of 1,000 request units per second (RU/s). Approximately 5,000 IoT devices submit data every five minutes by using the same telemetryId value.

You have an application that performs analytics on the data and frequently reads telemetry data for a single IoT device to perform trend analysis.

The following is a sample of a document in the container.

Question # 12

You need to reduce the amount of request units (RUs) consumed by the analytics application.

What should you do?

Options:

A.

Decrease the offerThroughput value for the container.

B.

Increase the offerThroughput value for the container.

C.

Move the data to a new container that has a partition key of deviceId.

D.

Move the data to a new container that uses a partition key of date.

Question 13

You have an Azure Cosmos DB for NoSQL 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?

Options:

A.

CDBPartitionKeyStatistics

B.

CDBQueryRunTimeStatistics

C.

CDBDataPlaneRequests

D.

CDBControlPlaneRequests

Question 14

You plan to create an Azure Cosmos DB 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

• All the comments associated to the blog post

• The names of the users who created the blog post and added the comments to the blog post

Items in the blog post container will be partitioned based on the post ID. Items in the user container will be partitioned based on the user ID.

You need to minimize the number of request units allocated to queries that list all the posts of a given user. The solution must minimize administrative and development effort

What should you include in the solution?

Options:

A.

Add a pre-trigger to the blog post container.

B.

Create a duplicate of each user item in the blog post container.

C.

Add a pre-trigger to the user container.

D.

Create a duplicate of each blog post item in the user container.

Question 15

You have a container in an Azure Cosmos DB Core (SQL) API account.

You need to use the Azure Cosmos DB SDK to replace a document by using optimistic concurrency.

What should you include in the code? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Question # 15

Options:

Question 16

You have a database in an Azure Cosmos DB SQL API Core (SQL) account that is used for development.

The database is modified once per day in a batch process.

You need to ensure that you can restore the database if the last batch process fails. The solution must minimize costs.

How should you configure the backup settings? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Question # 16

Options:

Question 17

You have an Azure Cosmos DB for NoSQL database named DB1 that hosts a container named Contained. The partition key for Container! is /city.

You are developing a cloud-native app named App1 that will store customer information in DB1. App1 will perform transactional batch operations to update the items in Contained.

You need to configure App1 to meet the following requirements:

• Ensure that batch operations are rolled back if an item ' s ETag value has changed since the value was last read.

• Ensure that all operations in the batch apply to a single partition key value.

How should you complete the C# code? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Question # 17

Options:

Question 18

You have an Azure Cosmos DB for NoSQL account named account1 that has a single read-write region and one additional read region. Account1 uses the strong default consistency level.

You have an application that uses the eventual consistency level when submitting requests to account1.

How will writes from the application be handled?

Options:

A.

Writes will use the strong consistency level.

B.

Azure Cosmos DB will reject writes from the application.

C.

The write order is not guaranteed during replication.

D.

Writes will use the eventual consistency level.

Question 19

You have an Azure Cosmos DB Core (SQL) API account named storage1 that uses provisioned throughput capacity mode.

The storage1 account contains the databases shown in the following table.

Question # 19

The databases contain the containers shown in the following table.

Question # 19

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

NOTE: Each correct selection is worth one point.

Question # 19

Options:

Question 20

You have an Azure Cosmos DB for NoSQL account named account1.

You have an app named App1 that connects to account1 and uses strong consistency for all requests.

You implement the Azure Cosmos DB integrated cache for account1.

You need to ensure that App1 uses the integrated cache.

What should you do?

Options:

A.

Change the request consistency level to session.

B.

Set MaxIntegratedCacheStaleness to 0.

C.

Change the request consistency level to bounded staleness.

D.

Set the connectivity mode to direct mode over TCP.

Question 21

You are designing an Azure Cosmos DB for NoSQL solution.

You plan to create a new container named Container1 that will store product data for automotive repair pans as shown in the following table.

Question # 21

The data will be stored in Container! as shown in the following table

Question # 21

You need to recommend a data partitioning solution for the database. The solution must spread the workload to minimize I/O contention.

Which column should you recommend for the physical partition key and the logical partition key? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Question # 21

Options:

Question 22

You configure a backup for an Azure Cosmos DB for NoSQL account as shown in the following exhibit.

Question # 22

Use the drop-down menus to select the answer choice that completes each statement based on the information presented in the graphic.

NOTE: Each correct selection is worth one point.

Question # 22

Options:

Question 23

You have an Azure Cosmos DB container named owners. Each item in owners represents an owner and their pets. The following is a sample of the JSON

Question # 23

You are writing a query that will retrieve the average age of each pet owned by each owner, il the pet is older than two years.

How should you complete the query? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes 01 scroll to view content.

NOTE: Each correct selection is worth one point.

Question # 23

Options:

Question 24

You plan to store order data in Azure Cosmos DB for NoSQL 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 or requests.

Options:

A.

Create a single database that contains one container. Store orders and order items in separate documents in the container.

B.

Create a single database that contains one container. Create a separate document for each order and embed the order items into the order documents.

C.

Create a database for orders and a database for order items.

D.

Create a single database that contains a container for order and a container for order items.

Question 25

The following is a sample of a document in orders.

Question # 25

The orders container uses customer as the partition key.

You need to provide a report of the total items ordered per month by item type. The solution must meet the following requirements:

Ensure that the report can run as quickly as possible.

Minimize the consumption of request units (RUs).

What should you do?

Options:

A.

Configure the report to query orders by using a SQL query.

B.

Configure the report to query a new aggregate container. Populate the aggregates by using the change feed.

C.

Configure the report to query orders by using a SQL query through a dedicated gateway.

D.

Configure the report to query a new aggregate container. Populate the aggregates by using SQL queries that run daily.

Question 26

You have an Azure Cosmos DB for NoSQL account that has multiple write regions.

You need to receive an alert when requests that target the database exceed the available request units per second (RU/s).

Which Azure Monitor signal should you use?

Options:

A.

Region Removed

B.

Provisioned Throughput

C.

Metadata Requests

D.

Data Usage

Question 27

You have a database named db1 in an Azure Cosmos DB for NoSQL account named account1. The db1 database has a manual throughput of 4,000 request units per second (RU/s).

You need to move db1 from manual throughput to autoscale throughput by using the Azure CLI. The solution must provide a minimum of 4,000 RU/s and a maximum of 40,000 RU/s.

How should you complete the CLI statements? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Question # 27

Options:

Question 28

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?

Options:

A.

a function that pulls items from the conflicts feed and is triggered by a timer trigger

B.

a function that receives items pushed from the change feed and is triggered by an Azure Cosmos DB trigger

C.

a function that pulls items from the change feed and is triggered by a timer trigger

D.

a function that receives items pushed from the conflicts feed and is triggered by an Azure Cosmos DB trigger

Question 29

You have an Azure Cosmos DB for NoSQL account that contains a container named customers.

You have an application named App1 that caches customers and must be notified when the list of customers changes.

You implement a change feed. The Time to Live settings have the default values.

You discover the following:

• Notifications for INSERT and UPDATE operations are received within 10 seconds.

• Notifications for DELETE operations are NOT received.

Which two actions should you perform to ensure that App1 receives notifications for DELETE operations? Each correct answer present part of the solution.

NOTE: Each correct selection is worth one point.

Options:

A.

Add a post-trigger.

B.

Use an UPDATE instead of a DELETE.

C.

Add an IsDeleted flag to the items.

D.

Increase the TTL

E.

Add a pre-trigger.

Question 30

You have an Azure Cosmos DB for NoSQL account named account1.

In account 1, you plan to create a container named container1 that will contain data continuously collected from sell-driving cars. The items in container! will be accessed mostly by using queries that target data collected from a specific car during a given day. Each car is identifiable by using a property named Vehicle-Identification-Number.

You need to identify a partition strategy for container1. The strategy must meet the following requirements:

• Maximize read and write performance.

• Minimize the costs of data reads and writes.

What should you identify?

Options:

A.

Use a partition key based on the vehicle-identification-Number property.

B.

Construct a synthetic key by concatenating the current date and a random suffix.

C.

Use a partition key based on the current date.

D.

Construct a synthetic key by concatenating the current date and a hash of the Vehicle-identification-Number property value.

Question 31

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?

Options:

A.

0

B.

200

C.

2,000

D.

4,000

E.

10,000

Question 32

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.

Question # 32

Options:

Question 33

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

What should you select?

Options:

A.

the timestamp

B.

the humidity

C.

the temperature

D.

the device ID

Question 34

You configure multi-region writes for account1.

You need to ensure that App1 supports the new configuration for account1. The solution must meet the business requirements and the product catalog requirements.

What should you do?

Options:

A.

Set the default consistency level of accountl to bounded staleness.

B.

Create a private endpoint connection.

C.

Modify the connection policy of App1.

D.

Increase the number of request units per second (RU/s) allocated to the con-product and con-productVendor containers.

Question 35

You need to implement a solution to meet the product catalog requirements.

What should you do to implement the conflict resolution policy.

Options:

A.

Remove frequently changed field from the index policy of the con-product container.

B.

Disable indexing on all fields in the index policy of the con-product container.

C.

Set the default consistency level for account1 to eventual.

D.

Create a new container and migrate the product catalog data to the new container.

Question 36

You are troubleshooting the current issues caused by the application updates.

Which action can address the application updates issue without affecting the functionality of the application?

Options:

A.

Enable time to live for the con-product container.

B.

Set the default consistency level of account1 to strong.

C.

Set the default consistency level of account1 to bounded staleness.

D.

Add a custom indexing policy to the con-product container.

Question 37

You need to identify which connectivity mode to use when implementing App2. The solution must support the planned changes and meet the business requirements.

Which connectivity mode should you identify?

Options:

A.

Direct mode over HTTPS

B.

Gateway mode (using HTTPS)

C.

Direct mode over TCP

Question 38

You need to select the capacity mode and scale configuration for account2 to support the planned changes and meet the business requirements. What should you select? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Question # 38

Options:

Question 39

You need to provide a solution for the Azure Functions notifications following updates to con-product. The solution must meet the business requirements and the product catalog requirements.

Which two actions should you perform? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.

Options:

A.

Configure the trigger for each function to use a different leaseCollectionPrefix

B.

Configure the trigger for each function to use the same leaseCollectionNair.e

C.

Configure the trigger for each function to use a different leaseCollectionName

D.

Configure the trigger for each function to use the same leaseCollectionPrefix

Page: 1 / 20
Total 204 questions