I have about 800k blobs in my azure storage. When I create azure function with a blobTrigger it starts to process all blobs that I have in the storage. How can I configure my function to be triggered only for new and updated blobs?
For more information, see Tutorial: Trigger Azure Functions on blob containers using an event subscription. Blob name string is manually added to a storage queue when a blob is added to the container. This value is passed directly by a Queue Storage trigger to a Blob Storage input binding on the same function.
There are no plans to support multiple triggers per Function. You will have to create a Function for each EventHub. If there is common code that may be shared between Functions, you may move them to a helper method that can be called from each Function.
There is no way to do this currently. Internally we track which blobs we have processed by storing receipts in our control container azure-webjobs-hosts
. Any blob not having a receipt, or an old receipt (based on blob ETag) will be processed (or reprocessed). That's why your existing blobs are being processed - they don't have receipts. BlobTrigger
is currently designed to ensure that ALL blobs in a container matching the path pattern are eventually processed, and reprocessed any time they are updated.
If you feel passionately about this, you can log a feature request in our repo here with details on your scenario.
The way I get around this is to set Metadata on a processed Blob (e.g Status = Complete). When the trigger gets fired I first check for this piece of Metadata and return the function if it is already set.
The downside to this is that the update of the Metadata will trigger an additional execution of the function
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With