Pre-Winter Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70percent

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

Demo: 37 questions
Total 194 questions

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

Question 1

You plan to implement an Azure Cosmos DB container that will store telemetry data from 1,000 loT devices. The data will be updated once every minute. An app will read the data once daily and generate aggregated reports that summarize the state of each device.

You need to configure a partition key for the container. The solution must meet the following requirements:

• Minimize the possibility of reaching the partition limits.

• Spread read and write operations evenly across the partitions.

• Minimize how long it takes to locate a specific set of telemetry values.

To what should you set the partition key?

Options:

A.

the date and a random value

B.

the device ID and date

C.

the device ID

D.

the date

Question 2

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 3

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?

Options:

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

Question 4

You have an Azure subscription that contains an Azure Cosmos DB for NoSQL account named accounts

You configure account! to send resource logs to Log Analytics.

You need to identify any containers in account1 that were deleted during the past 24 hours.

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

NOTE: Each correct selection is worth one point.

Options:

Question 5

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

You plan to implement the integrated cache for account1.

You need to configure the connectivity mode and the consistency level for requests that target account1. The solution must maximize consistency while using the integrated cache.

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

NOTE: Each correct selection is worth one point.

Options:

Question 6

You have an Azure subscription that contains an Azure Cosmos DB for NoSQL account named accounts In account1, you create a container that has the following configurations:

• Partition key: CompanylD

• Composite unique key: UserName and EmailAddress

To the container, you plan to add the data items shown in the following table.

How many conflicts will occur?

Options:

A.

0

B.

1

C.

2

D.

3

Question 7

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

Backups for account1 have the following configurations:

• Interval: 2 hours

• Retention period: 4 days

You need to estimate the charges associated with the retention of the backups. How many copies of the backups will incur additional charges?

Options:

A.

8

B.

12

C.

46

D.

48

Question 8

You have an Azure Synapse Analytics workspace named workspace1 that contains a server less SQL pool.

You have an Azure Table Storage account that stores operational data.

You need to replace the Table storage account with Azure Cosmos DB for NoSQL The solution must meet the following requirements:

• Support Queries from the server less SQL pool.

• Only pay for analytical compute when running queries.

• Ensure that analytical processes do

NOTE: affect operational processes.

Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

Options:

Question 9

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:

Minimizes the partition skew

Avoids capacity limits

Avoids hot partitions

What should you do?

Options:

A.

Use timestamp as the partition key.

B.

Create a new synthetic key that contains deviceId and sensor1Value.

C.

Create a new synthetic key that contains deviceId and deviceManufacturer.

D.

Create a new synthetic key that contains deviceId and a random number.

Question 10

You have a database in an Azure Cosmos DB for NoSQL account. The database contains a container named container1. The indexing mode container1 is set to none. You configure Azure Cognitive Search to extract data from container1 and make the data searchable. You discover that the Cognitive Search index is missing all the data from the Azure Cosmos DB index. What should you do to resolve the issue?

Options:

A.

Modify The index attributes in Cognitive Search to searchable.

B.

Modify the index attributes in Cognitive Search to Retrievable.

C.

Change the indexing mode of container 1 to consistent-

D.

Modify the indexing policy of container 1 to exclude the / * path

Question 11

You are implementing an Azure Data Factory data flow that will use an Azure Cosmos DB (SQL API) sink to write a dataset. The data flow will use 2,000 Apache Spark partitions.

You need to ensure that the ingestion from each Spark partition is balanced to optimize throughput.

Which sink setting should you configure?

Options:

A.

Throughput

B.

Write throughput budget

C.

Batch size

D.

Collection action

Question 12

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.

Options:

Question 13

You have the following query.

SELECT * FROM с

WHERE c.sensor = " TEMP1 "

AND c.value < 22

AND c.timestamp > = 1619146031231

You need to recommend a composite index strategy that will minimize the request units (RUs) consumed by the query.

What should you recommend?

Options:

A.

a composite index for (sensor ASC, value ASC) and a composite index for (sensor ASC, timestamp ASC)

B.

a composite index for (sensor ASC, value ASC, timestamp ASC) and a composite index for (sensor DESC, value DESC, timestamp DESC)

C.

a composite index for (value ASC, sensor ASC) and a composite index for (timestamp ASC, sensor ASC)

D.

a composite index for (sensor ASC, value ASC, timestamp ASC)

Question 14

You have a container m an Azure Cosmos DB for NoSQL account. The container stores data about families. Data about parents, children, and pets are stored as separate documents.

Each document contains the address of each family. Members of the same family share the same partition key named family Id

You need to update the address for each member of the same family that share the same address. The solution must meet the following requirements:

• Be atomic consistent isolated, and durable (ACID).

• Provide the lowest latency.

What should you do?

Options:

A.

Update the document of each family member by using a transactional batch operation.

B.

Update the document of each family member separately by using a patch operation.

C.

Update the document of each family member separately and set the consistency level to strong.

Question 15

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 16

You have a container in an Azure Cosmos DB for NoSQL account that stores data about orders.

The following is a sample of an order document.

Documents are up to 2 KB.

You plan to receive one million orders daily.

Customers will frequently view their past order history.

You are the evaluating whether to use order-Date as the partition key.

What are two effects of using order-Date as the partition key? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

Options:

A.

You will exceed the maximum number of partition key values.

B.

You will exceed the maximum storage per partition.

C.

There will always be a hot partition.

D.

Queries will run cross-partition.

Question 17

You have an Azure Cosmos DB for NoSQL account that hosts a container named Container1. The items in Container1 are stored in the following format.

You need to write a query to return the Given and Family names of the children in Family1.

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

NOTE: Each correct selection is worth one point

Options:

Question 18

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.

Options:

Question 19

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 20

You have an app that stores data in an Azure Cosmos DB Core (SQL) API account The app performs queries that return large result sets.

You need to return a complete result set to the app by using pagination. Each page of results must return 80 items.

Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

Options:

Question 21

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

For account 1, you plan to implement an integrated gateway that will use the D4s SKU.

You need to optimize integrated gateway performance for point reads from account1. The solution must meet the following requirements:

• For new point reads, maximize how long returned items remain in the integrated cache.

• For new and repeating point reads, maximize the cost benefits of the integrated cache.

What should you do for each requirement? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Options:

Question 22

You have an Azure subscription that contains an Azure Cosmos DB for NoSQL account. The account contains a database named DB1 and an Azure Key Vault named KV1.

You need to create a container named Container1 in DB1. The solution must ensure that the properties of the items in Container1 are encrypted by using Always Encrypted.

Which four actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

Options:

Question 23

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 a container named container1 in an Azure Cosmos DB Core (SQL) API account.

You need to make the contents of container1 available as reference data for an Azure Stream Analytics job.

Solution: You create an Azure function that uses Azure Cosmos DB Core (SQL) API change feed as a trigger and Azure event hub as the output.

Does this meet the goal?

Options:

A.

Yes

B.

No

Question 24

You have an Azure subscription that contains the resources shown in the following table.

You need to configure the sink connector for KafkaConnect1 to deliver messages from Topic1 to Container1.

How should you configure the value converter for the sink connector? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Options:

Question 25

You have a container in an Azure Cosmos DB for NoSQL account. The database that has a manual throughput of 30,000 request units per second (RU/s). The current consumption details are shewn in the following chart.

Normalized RU Consumption (%) By PartitionKeyRangeID

Use the drop-down menus to select the answer choice that answers each question based on the information presented in the graphic. NOTE: Each correct selection is worth one point.

Options:

Question 26

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 27

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 28

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 29

You have an Azure Cosmos DB for NoSQL database that hosts the containers shown in the following table.

You need to ensure that when a product name changes in the Products container, the product name changes in all orders that have NOT been shipped.

What should you implement?

Options:

A.

a change feed

B.

a post-trigger

C.

a pre-trigger

D.

a stored procedure

Question 30

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.

Options:

Question 31

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 32

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 33

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 34

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 35

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

Question 36

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 37

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.

Options:

Demo: 37 questions
Total 194 questions