Free DP-420 Exam Braindumps (page: 11)

Page 10 of 23

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

  1. a function that pulls items from the con icts 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 con icts feed and is triggered by an Azure Cosmos DB trigger

Answer(s): 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



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. Con gure the report to query orders by using a SQL query.
  2. Con gure the report to query a new aggregate container. Populate the aggregates by using the change feed.
  3. Con gure the report to query orders by using a SQL query through a dedicated gateway.
  4. Con gure the report to query a new aggregate container. Populate the aggregates by using SQL queries that run daily.

Answer(s): B

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



HOTSPOT (Drag and Drop is not supported).
You have three containers in an Azure Cosmos DB Core (SQL) API account as shown in the following table.



You have the following Azure functions:
A function named Fn1 that reads the change feed of cn1
A function named Fn2 that reads the change feed of cn2
A function named Fn3 that reads the change feed of cn3
You perform the following actions:
Delete an item named item1 from cn1.
Update an item named item2 in cn2.
For an item named item3 in cn3, update the item time to live to 3,600 seconds. For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: No
Azure Cosmos DB's change feed is a great choice as a central data store in event sourcing architectures where all data ingestion is modeled as writes (no updates or deletes).
Note: The change feed does not capture deletes. If you delete an item from your container, it is also removed from the change feed. The most common method of handling this is adding a soft marker on the items that are being deleted. You can add a property called "deleted" and set it to "true" at the time of deletion. This document update will show up in the change feed. You can set a TTL on this item so that it can be automatically deleted later.

Box 2: No
The _etag format is internal and you should not take dependency on it, because it can change anytime.

Box 3: Yes
Change feed support in Azure Cosmos DB works by listening to an Azure Cosmos container for any changes.


Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/sql/change-feed-design-patterns https://docs.microsoft.com/en-us/azure/cosmos- db/change-feed



HOTSPOT (Drag and Drop is not supported).
You con gure Azure Cognitive Search to index a container in an Azure Cosmos DB Core (SQL) API account as shown in the following exhibit.



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.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: country
The country eld is lterable.
Note: lterable: Indicates whether to enable the eld to be referenced in $ lter queries. Filterable differs from searchable in how strings are handled. Fields of type
Edm.String or Collection(Edm.String) that are lterable do not undergo lexical analysis, so comparisons are for exact matches only.

Box 2: name
The name eld is not Retrievable.
Retrievable: Indicates whether the eld can be returned in a search result. Set this attribute to false if you want to use a eld (for example, margin) as a lter, sorting, or scoring mechanism but do not want the eld to be visible to the end user. Note: searchable: Indicates whether the eld is full-text searchable and can be referenced in search queries.


Reference:

https://docs.microsoft.com/en-us/rest/api/searchservice/create-index






Post your Comments and Discuss Microsoft DP-420 exam with other Community members: