exam questions

Exam DP-420 All Questions

View all questions & answers for the DP-420 exam

Exam DP-420 topic 3 question 3 discussion

Actual exam question from Microsoft's DP-420
Question #: 3
Topic #: 3
[All DP-420 Questions]

HOTSPOT -
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:

Show Suggested Answer Hide Answer
Suggested Answer:
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

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
basiltomato
Highly Voted 1 year, 3 months ago
Correct - N - https://learn.microsoft.com/en-us/azure/cosmos-db/change-feed#features-of-change-feed N - https://stackoverflow.com/questions/68409298/how-to-tell-the-difference-between-insert-and-update-in-cosmos-db-change-feed Y - 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
upvoted 8 times
...
azuredemo2022three
Most Recent 1 year ago
The correct answer is NYY. Explanation: Fn1 will receive item1 from the change feed: No (The item was deleted from cn1, so it will not be received by Fn1.) Fn2 checks the _etag of item2 to see whether the item is an update or an insert: Yes (Fn2 will be able to determine whether item2 is an update or an insert based on its _etag value.) Fn3 will receive item3 from the change feed: Yes (The update of the time to live (TTL) for item3 in cn3 will trigger a change event in the change feed, and Fn3 will receive it.) Therefore, the correct answer is NYY.
upvoted 1 times
My Mistake Answer is NNY
upvoted 6 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...