DP-420 Dumps

DP-420 Braindumps DP-420 Real Questions DP-420 Practice Test

DP-420 Actual Questions


killexams.com


Microsoft


DP-420


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


https://killexams.com/pass4sure/exam-detail/DP-420


Question: 20


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


  1. All items will be deleted after one year.

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

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

  4. All items will be deleted after one hour.


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


Question: 21


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?


  1. Enable Continuous Backup for the account.

  2. Configure the Backup & Restore settings for the account.

  3. Create a new account that has a periodic backup policy.

  4. Configure the Point In Time Restore settings for the account.


Answer: A


Explanation:


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


Question: 22


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 sett 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 conlainer1 in an Azure Cosmos DB for NoSQL 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 to copy data to another Azure Cosmos DB for NoSQL container. Does this meet the goal?

  1. Yes

  2. No


Answer: B Question: 23

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?


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

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

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


Answer: A Question: 24 HOTSPOT

You have an Azure Cosmos DB for NoSQL account named account that has the disablekey Basedletadatwrite Access property enabled.


You are developing an app named App1 that will be used by a use1 named DevUser1 to create containers in account1. DevUser1 has a non-privileged user account in the 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


wrong


Answer: A Question: 25

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?


  1. Modify The index attributes in Cognitive Search to searchable.

  2. Modify the index attributes in Cognitive Search to Retrievable.

  3. Change the indexing mode of container 1 to consistent-

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


Answer: C Question: 26 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.



wrong Answer: C 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: 27


The following is a sample of a document in orders.


The orders container uses customerId 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?


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

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

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

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


Answer: D


Explanation:


You can facilitate aggregate data by using Change Feed and Azure Functions, and then use it for reporting. Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed


Question: 28


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.



wrong Answer: D 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: 29


You are building an application that will store data in an Azure Cosmos DB for NoSQL account. The account uses the session default consistency level. The account is used by five other applications. The account has a single read-write region and 10 additional read regions.


Approximately 20 percent of the items stored in the account are updated hourly. Several users will access the new application from multiple devices.

You need to ensure that the users see the same item values consistently when they browse from the different devices. The solution must not affect the other applications.


Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.


  1. Use implicit session management when performing read requests.

  2. Provide a stored session token when performing read requests.

  3. Associate a session token to the user account.

  4. Set the default consistency level to eventual.

  5. Associate a session token to the device.


Answer: A,B,C Question: 30 HOTSPOT

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.



wrong


Answer: A,B,C


Explanation:


Box 1: ConsistencyLevel


The ItemRequestOptions Class ConsistencyLevel property gets or sets the consistency level required for the request in the Azure Cosmos DB service.


Azure Cosmos DB offers 5 different consistency levels. Strong, Bounded Staleness, Session, Consistent Prefix and Eventual - in order of strongest to weakest consistency.


Box 2: _etag


The ItemRequestOptions class helped us implement optimistic concurrency by specifying that we wanted the SDK to use the If-Match header to allow the server to decide whether a resource should be updated. The If-Match value is the ETag value to be checked against. If the ETag value matches the server ETag value, the resource is updated.


Question: 31


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?

  1. Yes

  2. No


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


Question: 32


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?

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

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

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

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


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


Question: 33


You have a container named container1 in an Azure Cosmos DB Core (SQL) API account. Upserts of items in container1 occur every three seconds.

You have an Azure Functions app named function1 that is supposed to run whenever items are inserted or replaced in container1.

You discover that function1 runs, but not on every upsert.


You need to ensure that function1 processes each upsert within one second of the upsert. Which property should you change in the Function.json file of function1?

  1. checkpointInterval

  2. leaseCollectionsThroughput

  3. maxItemsPerInvocation

  4. feedPollDelay


Answer: D


Explanation:


With an upsert operation we can either insert or update an existing record at the same time.


FeedPollDelay: The time (in milliseconds) for the delay between polling a partition for new changes on the feed, after all current changes are drained. Default is 5,000 milliseconds, or 5 seconds.


Reference: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb-v2-trigger


Question: 34


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.


wrong


Answer: D Question: 35 HOTSPOT

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


You plan to create a container that will store employee data for 5,000 small businesses. Each business will have up to 25 employees. Each employee item will have an email Address value.


You need to ensure that the email Address value for each employee within the same company is unique.


To what should you set the partition key and the unique key? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.


wrong


Answer: D


Explanation:


Box 1: CompanyID


After you create a container with a unique key policy, the creation of a new or an update of an existing item resulting in a duplicate within a logical partition is prevented, as specified by the unique key constraint. The partition key combined with the unique key guarantees the uniqueness of an item within the scope of the container.


For example, consider an Azure Cosmos container with Email address as the unique key constraint and CompanyID as the partition key. When you configure the user's email address with a unique key, each item has a unique email address within a given CompanyID. Two items can't be created with duplicate email addresses and with the same partition key value.


Box 2: emailAddress