exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 3 question 33 discussion

Actual exam question from Microsoft's AZ-204
Question #: 33
Topic #: 3
[All AZ-204 Questions]

HOTSPOT -

You are developing an application that monitors data added to an Azure Blob storage account.

You need to process each change made to the storage account.

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

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

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
tcybu
Highly Voted 2 years, 3 months ago
I've tried the code in VS. Here's some thoughts: 1. box: - GetChanges() - wrong - var c in the foreach would be BlobChangeFeedEvent which doesn't contain Values property used in ProcessChanges(c.Values) line below - GetChangesAsync - wrong - code won't compile because it would require await foreach loop instead - GetChanges(x).AsPages() - correct - it's the only option to make this code even compile - GetChanges(x).GetEnumerator() - wrong - you cannot use IEnumerator type as foreach source 2. box: - x = c.ContinuationToken - right - variable x was used as continuationToken parameter in changeFeedClient.GetChanges(x).AsPages() above - c.GetRawResponse().ReasonPhrase - wrong - that does not make sense to use this value as continuation token - x = c.Values.Min - wrong - continuation token is a number not date - x = c.Values.Max - wrong - as above So to sum up 1. changeFeedClient.GetChanges(x).AsPages() 2. x = c.ContinuationToken; You can find more about Continuation Token here: https://jessehouwing.net/azure-devops-accessing-apis-with-large-volumes-of-data/
upvoted 83 times
applepie
1 year, 9 months ago
got this question today, go with this answer - 7/30/2023, score 895/1000
upvoted 3 times
Elbanna
1 year, 7 months ago
Does all questions came from exam topics ?
upvoted 2 times
Net_IT
1 year, 6 months ago
The majority of the questions
upvoted 1 times
...
...
...
DP_Bhatt
2 years, 3 months ago
Agree. Box 1. GetChanges(x).AsPages() Box 2. ContinuationToken
upvoted 5 times
...
Michael2023
2 years, 3 months ago
you are right... 1. changeFeedClient.GetChanges(x).AsPages() -> returns an IEnumerable<Page<BlobChangeFeedEvent>> ... when you loop through these pages "Page<BlobChangeFeedEvent>" you will get the options "page.ContinuationToken" and page.Values which are used in this example 100% Correct... found the code here https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/storage/Azure.Storage.Blobs.ChangeFeed#resume-with-continuationtoken
upvoted 4 times
...
warchoon
2 years, 2 months ago
var x = default(string); so, x is string ContinuationToken is not string
upvoted 3 times
...
...
4bd3116
Most Recent 8 months, 1 week ago
The Answer is correct!! var changeFeedClient = new BlobServiceClient("..").GetChangeFeedClient(); var continuationToken = default(string); while (true) { var changeFeed = changeFeedClient.GetChanges(continuationToken); foreach (var change in changeFeed) { continuationToken = change.ContinuationToken; ProcessChanges(change.Values); } } https://learn.microsoft.com/en-us/dotnet/api/azure.storage.blobs.changefeed.blobchangefeedclient.getchanges?view=azure-dotnet-preview#azure-storage-blobs-changefeed-blobchangefeedclient-getchanges
upvoted 1 times
...
8ac3742
8 months, 4 weeks ago
The answer is incorrect, continuationToken points to the position of the last processed change event, changeFeedClient.Getchanges(x).AsPages retrieves changes in chunks or pages so it's more efficient Handling.
upvoted 1 times
...
Stel0Papad4
11 months ago
For those who are wondering of the answer see this link by following the methods you see its using above above. 1. GetChanges(x).AsPages() 2. ContinuationToken is the correct answer
upvoted 1 times
Stel0Papad4
11 months ago
https://learn.microsoft.com/en-us/dotnet/api/azure.storage.blobs.changefeed.blobchangefeedclient.getchanges?view=azure-dotnet-preview#azure-storage-blobs-changefeed-blobchangefeedclient-getchanges
upvoted 1 times
...
...
neelkanths
1 year ago
Got it on 20 April 2024...Marks > 900...All questions from examtopics 400 questions... - GetChanges(x).AsPages() ContinuationToken;
upvoted 3 times
...
Nihilist11
1 year, 3 months ago
Jan-21-2024 - This was in my exam - Score 740, just border :) Didnt purchased contributor access. Contosso case study [Couldnt find here]
upvoted 2 times
...
1989jay
1 year, 3 months ago
This question was on exam. 09/01/2024. Passed 872.
upvoted 2 times
...
leviatas
1 year, 7 months ago
Got this quesiton in examn - 2023.09.25. Got Case Study Contoso
upvoted 2 times
kajal2205
1 year, 4 months ago
What answer you selected?
upvoted 1 times
...
...
NightshadeRC
1 year, 9 months ago
Had this question in today's exam: 2023-07-26
upvoted 1 times
...
Videira
2 years, 2 months ago
On my exam 2023-02-25
upvoted 2 times
...
tmuras
2 years, 2 months ago
This question was on exam on 17/02/23.
upvoted 1 times
red0400
2 years, 2 months ago
what answer do you put ?
upvoted 1 times
...
...
Esward
2 years, 3 months ago
As per Microsoft docs: GetchangesAsync(), contiuationtoken are correct https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-change-feed-how-to
upvoted 2 times
drjakiell
2 years, 3 months ago
for GetchangesAsync you need the async await approach
upvoted 3 times
...
AfPham
2 years, 2 months ago
Async option can be ignore, it requires 'await', which is not there in this situation
upvoted 5 times
...
...
frks
2 years, 3 months ago
I believe it should be await... getchangesasync.... then getrawresponse, as x is a string. I don't see the connection to cancellationtoken.
upvoted 1 times
...
chettir01
2 years, 3 months ago
i think the fisrt box must be : getChangesAsync() the second one is correct source : https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-change-feed-how-to
upvoted 3 times
MikeSantos
2 years ago
I don't agree. There is no await statement before the method
upvoted 2 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago