question

DavidAndrews-4781 avatar image
0 Votes"
DavidAndrews-4781 asked DavidAndrews-4781 commented

Creating a blob trigger for newly created folder not triggering blob

I have a blob trigger for a new folder on an existing blob container but I've created a new folder that will trigger the blob.

The blob trigger works fine on a local storage emulator but when I deploy to a function app on azure it does not work for the new folder. If I point the blob trigger to an existing folder on that blob container it works fine but any new folder I am trying to create doesnt work.

azure-functionsazure-blob-storage
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @DavidAndrews-4781, Would you please share with us the trigger configurations e.g., prefix/suffix that you currently have. Thanks!

0 Votes 0 ·

177977-image.png




I have created the InboundFile and InboundReceivedFile but it doesnt recognize these blobs

0 Votes 0 ·
image.png (26.9 KiB)
nasreen-akter avatar image nasreen-akter DavidAndrews-4781 ·

Hi @DavidAndrews-4781,

Apologies, this image does not make sense to me. The Tigger should have containerName, then /, then optionalPath. Please see the documentation below. If the documentation does not help, then please give us more details e.g, what's the value in DataLakePath.StatusService, is it hardcoded value etc.
https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=csharp#blob-name-patterns

Thanks!

0 Votes 0 ·
Show more comments

1 Answer

nasreen-akter avatar image
0 Votes"
nasreen-akter answered DavidAndrews-4781 commented

Hi @DavidAndrews-4781,

Thank you for the ask. Let me explain a little bit, that way it would be easier to understand the problem. When we create a BlobTrigger function, an Event is created in the storageAccount with that azure function EndPoint. You can see it by going to the Storage Accout --> Events from left side menu. Now Subject Begins With means prefix, right, so in your case, if you see something like /blobServices/default/containers/status-service/blobs/inbound/Received, that means this condition is true for any file created in the status-service container with inbound/Received prefix. Now, if you want to expand the scope, you have to remove the sub-folder(s). Hope this will help. Thanks!

178627-image.png



image.png (47.5 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@nasreen-akter Thanks for your help. My issue was an existing filter but this led me to solve the issue.

1 Vote 1 ·
nasreen-akter avatar image nasreen-akter DavidAndrews-4781 ·

@DavidAndrews-4781, glad that it helped. Thanks! :)

0 Votes 0 ·

I eventually figured out there is was a bug in the earlier version of Nuget package Microsoft.Azure.Webjobs.Extensions.Storage. I upgraded the version and it solved my issue so hope this helps someone out in the future

0 Votes 0 ·