ExamGecko
Home / Microsoft / DP-420 / List of questions
Ask Question

Microsoft DP-420 Practice Test - Questions Answers, Page 2

Add to Whishlist

List of questions

Question 11

Report Export Collapse

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.

Microsoft DP-420 image Question 3 90135 10022024015919000000

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?

Use timestamp as the partition key.
Use timestamp as the partition key.
Create a new synthetic key that contains deviceId and sensor1Value.
Create a new synthetic key that contains deviceId and sensor1Value.
Create a new synthetic key that contains deviceId and deviceManufacturer.
Create a new synthetic key that contains deviceId and deviceManufacturer.
Create a new synthetic key that contains deviceId and a random number.
Create a new synthetic key that contains deviceId and a random number.
Suggested answer: D
Explanation:

Use a partition key with a random suffix. Distribute the workload more evenly is to append a random number at the end of the partition key value. When you distribute items in this way, you can perform parallel write operations across partitions.

Incorrect Answers:

A: You will also not like to partition the data on "DateTime", because this will create a hot partition.

Imagine you have partitioned the data on time, then for a given minute, all the calls will hit one partition. If you need to retrieve the data for a customer, then it will be a fan-out query because data may be distributed on all the partitions.

B: Senser1Value has only two values.

C: All the devices could have the same manufacturer.

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/synthetic-partition-keys

asked 02/10/2024
mallesu kante
32 questions

Question 12

Report Export Collapse

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

Microsoft DP-420 image Question 4 90136 10022024015919000000

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?

Create a container for Author and a container for Book. In each Author document, embed bookId for each book by the author. In each Book document embed authorId of each author.
Create a container for Author and a container for Book. In each Author document, embed bookId for each book by the author. In each Book document embed authorId of each author.
Create Author, Book, and Bookauthorlnk documents in the same container.
Create Author, Book, and Bookauthorlnk documents in the same container.
Create a container that contains a document for each Author and a document for each Book. In each Book document, embed authorId.
Create a container that contains a document for each Author and a document for each Book. In each Book document, embed authorId.
Create a container for Author and a container for Book. In each Author document and Book document embed the data from Bookauthorlnk.
Create a container for Author and a container for Book. In each Author document and Book document embed the data from Bookauthorlnk.
Suggested answer: A
Explanation:

Store multiple entity types in the same container.

asked 02/10/2024
Francisco Julian Mota Fraile
48 questions

Question 13

Report Export Collapse

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

You run the following query against a container in the account.

SELECT

IS_NUMBER("1234") AS A,

IS_NUMBER(1234) AS B,

IS_NUMBER({prop: 1234}) AS C

What is the output of the query?

[{"A": false, "B": true, "C": false}]
[{"A": false, "B": true, "C": false}]
[{"A": true, "B": false, "C": true}]
[{"A": true, "B": false, "C": true}]
[{"A": true, "B": true, "C": false}]
[{"A": true, "B": true, "C": false}]
[{"A": true, "B": true, "C": true}]
[{"A": true, "B": true, "C": true}]
Suggested answer: A
Explanation:

IS_NUMBER returns a Boolean value indicating if the type of the specified expression is a number.

"1234" is a string, not a number.

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-is-number

asked 02/10/2024
Mohammad Sameer
40 questions

Question 14

Report Export Collapse

You need to implement a trigger in Azure Cosmos DB Core (SQL) API that will run before an item is inserted into a container.

Which two actions should you perform to ensure that the trigger runs? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.

Append pre to the name of the JavaScript function trigger.
Append pre to the name of the JavaScript function trigger.
For each create request, set the access condition in RequestOptions.
For each create request, set the access condition in RequestOptions.
Register the trigger as a pre-trigger.
Register the trigger as a pre-trigger.
For each create request, set the consistency level to session in RequestOptions.
For each create request, set the consistency level to session in RequestOptions.
For each create request, set the trigger name in RequestOptions.
For each create request, set the trigger name in RequestOptions.
Suggested answer: C, E
Explanation:

C: When triggers are registered, you can specify the operations that it can run with.

E: When executing, pre-triggers are passed in the RequestOptions object by specifying PreTriggerInclude and then passing the name of the trigger in a List object.

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/how-to-use-stored-procedurestriggers-udfs

asked 02/10/2024
Memo Albah
29 questions

Question 15

Report Export Collapse

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?

Yes
Yes
No
No
Suggested answer: A
Explanation:

You can set up alerts from the Azure Cosmos DB pane or the Azure Monitor service in the Azure portal.

Note: Alerts are used to set up recurring tests to monitor the availability and responsiveness of your Azure Cosmos DB resources. Alerts can send you a notification in the form of an email, or execute an Azure Function when one of your metrics reaches the threshold or if a specific event is logged in the activity log.

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/create-alerts

asked 02/10/2024
Andrew Staton
33 questions

Question 16

Report Export Collapse

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 the function to have an Azure CosmosDB trigger.

Does this meet the goal?

Yes
Yes
No
No
Suggested answer: B
Explanation:

Instead configure an Azure Monitor alert to trigger the function.

You can set up alerts from the Azure Cosmos DB pane or the Azure Monitor service in the Azure portal.

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/create-alerts

asked 02/10/2024
Rob Versteeg
43 questions

Question 17

Report Export Collapse

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 application to use the change feed processor to read the change feed and you configure the application to trigger the function.

Does this meet the goal?

Yes
Yes
No
No
Suggested answer: B
Explanation:

Instead configure an Azure Monitor alert to trigger the function.

You can set up alerts from the Azure Cosmos DB pane or the Azure Monitor service in the Azure portal.

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/create-alerts

asked 02/10/2024
Sushil Karki
48 questions

Question 18

Report Export Collapse

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.

Microsoft DP-420 image Question 10 90142 10022024015919000000

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

What should you do?

Decrease the offerThroughput value for the container.
Decrease the offerThroughput value for the container.
Increase the offerThroughput value for the container.
Increase the offerThroughput value for the container.
Move the data to a new container that has a partition key of deviceId.
Move the data to a new container that has a partition key of deviceId.
Move the data to a new container that uses a partition key of date.
Move the data to a new container that uses a partition key of date.
Suggested answer: C
Explanation:

The partition key is what will determine how data is routed in the various partitions by Cosmos DB and needs to make sense in the context of your specific scenario. The IoT Device ID is generally the "natural" partition key for IoT applications.

Reference: https://docs.microsoft.com/en-us/azure/architecture/solution-ideas/articles/iot-usingcosmos-db

asked 02/10/2024
Mohamed Khazem
30 questions

Question 19

Report Export Collapse

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

Microsoft DP-420 image Question 11 90143 10022024015919000000

Which statement describes the configuration of the container?

All items will be deleted after one year.
All items will be deleted after one year.
Items stored in the collection will be retained always, regardless of the items time to live value.
Items stored in the collection will be retained always, regardless of the items time to live value.
Items stored in the collection will expire only if the item has a time to live value.
Items stored in the collection will expire only if the item has a time to live value.
All items will be deleted after one hour.
All items will be deleted after one hour.
Suggested answer: C
Explanation:

When DefaultTimeToLive is -1 then your Time to Live setting is On (No default) Time to Live on a container, if present and the value is set to "-1", it is equal to infinity, and items don't expire by default.

Time to Live on an item:

This Property is applicable only if DefaultTimeToLive is present and it is not set to null for the parent container.

If present, it overrides the DefaultTimeToLive value of the parent container.

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/time-to-live

asked 02/10/2024
Junan Kuah
39 questions

Question 20

Report Export Collapse

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?

a function that pulls items from the conflicts feed and is triggered by a timer trigger
a function that pulls items from the conflicts feed and is triggered by a timer trigger
a function that receives items pushed from the change feed and is triggered by an Azure Cosmos DB trigger
a function that receives items pushed from the change feed and is triggered by an Azure Cosmos DB trigger
a function that pulls items from the change feed and is triggered by a timer trigger
a function that pulls items from the change feed and is triggered by a timer trigger
a function that receives items pushed from the conflicts feed and is triggered by an Azure Cosmos DB trigger
a function that receives items pushed from the conflicts feed and is triggered by an Azure Cosmos DB trigger
Suggested answer: D
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

asked 02/10/2024
Duane Innmon
29 questions
Total 139 questions
Go to page: of 14
Search

Related questions