Exam AZ-204 All QuestionsBrowse all questions from this exam
Question 391

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:

    Correct Answer:

    Scenario: Retail store locations: Azure Functions must process data immediately when data is uploaded to Blob storage.

    Box 1: HTTP -

    Binding configuration example: https://.blob.core.windows.net

    Box 2: Input -

    Read blob storage data in a function: Input binding

    Box 3: Blob storage -

    The Blob storage trigger starts a function when a new or updated blob is detected.

    Azure Functions integrates with Azure Storage via triggers and bindings. Integrating with Blob storage allows you to build functions that react to changes in blob data as well as read and write values.

    Reference:

    https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger

Discussion
andrvelich

1. azure cosmos 2. output 3. blob storage

SaintBahamut

Agreed: We need write to cosmos output, so that deals box1 and 2, and func is triggered by changes on bloob

Dani_ac7

Seems ok, te person who writes answers in exam topics doesn't read questions...

adilkhan

100% correct!

UzrShkl

Correct

SenseiJC

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

ks321

This is the right answer and has to be highest voted

macobuzi

There is no EventGrid mentioned anywhere. You can simply use Azure Function Blob Trigger to get triggered from the Blob storage.

antonmelode

You're quite right. Don't really understand those suggested answers. Especially when they mention immediately and CosmosDB

DenysEx

based on the Topic 21 - Testlet 22, question #1 event routing: BLOB -> EventGrid -> Function 1. CosmosDB 2. Output 3. trigger = EventGrid

elequiel

got for me in 20/10/2022

darsak10

Can you confirm what is the correct answer, it looks like the answer is not clear yet.

Ciupaz

Should be: Azure Cosmos DB Output Event Grid

applepie

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

macobuzi

Question stated that Function must update data to Azure Cosmos DB

AQMA

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."

gmishra88

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)

FeriAZ

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.

katrang

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)

ciberclon

For me it is the correct answer

Nhiendo

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

OPT_001122

1. azure cosmos 2. output 3. blob storage

coffecold

Can someone give a clue from which system this configuration format is? Azure functions : No Cosmos DB : No Azure Event Grid : No Storage blob : No

coffecold

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 } ] }

OPT_001122

this is more convincing !! Thanks

OPT_001122

this is more convincing !! Thanks

ProtossOR89144

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)?

giuliohome

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 ?