HOTSPOT - You need to implement the retail store location Azure Function. How should you configure the solution? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:
1. (binding) = Azure CosmosDB
reason: Azure Functions must update Azure Cosmos DB
2. (direction) = output
reason: all triggers are input, so we are not talking about the trigger binding. we must update Azure Cosmos DB so we need output binding. If input and output were selectable, i'd probably go for that
3. (trigger) = EventGrid
reason: the azure function is triggered by an EventGrid event so that processing happens immediately
I think it should be:
1. Azure Cosmos DB
2. output
3. Blob storage
My reasoning: Looking at the options we conclude that we can use only one binding.
We need to process the uploaded data and update the database. (one output binding to the Cosmos DB is certain)
With Event Grid we will receive only information about the event and nothing else. With Blob storage trigger we will have access to the blob itself. No need for additional input binding.
The question is very confusing IMO.
If we choose Binding direction: Input, then
1. HTTP
2. Input
3. Blob storage
However, if we choose Binding direction: Output, then
1. Azure CosmosDB
2. Output
3. Blob storage
Why would we need trigger for output? I think it's:
Binding: blob storage
direction: input
trigger: event grid (counting previous question at page 38 topic 21 question 1 established that pattern is blob -> event queue -> Function)?
nowhere is said that there is an Event Grid, but the requirements only speak about Blob Storage, so why not a much simpler Trigger Blob Storage - Binding Cosmos DB - direction Input ?
1. azure cosmos 2. output 3. blob storage
For updating Azure Cosmos DB upon processing the data, an output binding to Azure Cosmos DB is needed. This enables the function to write data directly to Cosmos DB without needing to manually implement the database connection and data insertion logic.
The trigger for this function should be Blob storage because the requirement is to start the processing immediately when data is uploaded to the Blob storage. This directly supports the scenario where store locations send data every hour to be processed.
I would say Cosmos - Output - Blob.
You have a Blob storage trigger ( Azure Functions must process data immediately when data is uploaded to Blob storage).
And a Cosmos Output Binding (Azure Functions must update Azure Cosmos DB by using native SQL language queries)
I wonder why the answer is not
binding - Blob
direction - in
trigger - event grid.
example scenario 2 - https://learn.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings?tabs=csharp
1. Azure Cosmos DB
2. Output
3. Event Grid
using Event Grid Trigger for blob events instead of using Blob storage as input to function, provides low latency.
Reference: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=csharp-script&pivots=programming-language-csharp
according to this reference, it says: "If you require faster or more reliable blob processing, you should instead implement one of the following strategies:
Add the source parameter with a value of EventGrid to your binding definition and create an event subscription on the same container.
OR
Replace the Blob Storage trigger with an Event Grid trigger using an event subscription on the same container."
1. azure cosmos
2. output
3. blob storage
Becase
1.Triggers cause a function to run. A trigger defines how a function is invoked and a function must have exactly one trigger. Triggers have associated data, which is often provided as the payload of the function.
2.Binding to a function is a way of declaratively connecting another resource to the function; bindings may be connected as input bindings, output bindings, or both. Data from bindings is provided to the function as parameters.
refer : https://learn.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings?tabs=csharp
If it was function.json it should have been someting like:
{
"disabled":false,
"bindings":[
// ... bindings here
{
"type": "EventGridTrigger",
"direction": "in",
"name": "inBinding",
// ... more depending on binding
},
{
"type": "CosmosDBOutput",
"direction": "out",
"name": "outBinding",
// ... more depending on binding
}
]
}
I do not understand this question. Binding is Azure cosmos, then the binding direction should be output. If it is trigger then binding direction should be in. So, I do not understand what this means. I just hope these kind of absurd questions are not asked by Microsoft.
But for the trigger I will use EventGrid because it says it should respond immediately. Blob triggers use polling, while event grid triggers are "event-driven" (basically Microsoft wants us to better use Event Grid for storage events)
upvoted 4 times
...
This section is not available anymore. Please use the main Exam Page.AZ-204 Exam Questions
Log in to ExamTopics
Sign in:
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.
andrvelich
Highly Voted 3 years, 1 month agoSaintBahamut
3 years, 1 month agoDani_ac7
2 years, 9 months agoadilkhan
2 years, 2 months agoUzrShkl
2 years agoSenseiJC
Highly Voted 2 years, 6 months agoantonmelode
1 year agomacobuzi
1 year, 9 months agoks321
1 year, 10 months agonnmdmm
Most Recent 9 months ago4b6d959
10 months ago8ac3742
10 months, 1 week agoProtossOR89144
11 months agogiuliohome
11 months, 1 week agoFeriAZ
1 year, 4 months agokatrang
1 year, 8 months agociberclon
1 year, 4 months agoapplepie
1 year, 11 months agomacobuzi
1 year, 9 months agoDenysEx
2 years, 1 month agoAQMA
2 years, 2 months agoNhiendo
2 years, 5 months agoOPT_001122
2 years, 5 months agocoffecold
2 years, 7 months agoOPT_001122
2 years, 6 months agocoffecold
2 years, 7 months agoOPT_001122
2 years, 6 months agoelequiel
2 years, 7 months agodarsak10
2 years agoCiupaz
1 year, 7 months agogmishra88
2 years, 8 months ago