简体   繁体   中英

Is there a way to only pass the appended blob content to blob trigger Azure Function?

I am trying to make a blob trigger azure function for log files, but the problem is it will pass through the entire blob content when any blob is created or updated.

So I am wondering is there a way to only get the appended blob content?

module.exports = async function main(context, myBlob) {
 // I am using javascript, myblob contains the entire content of single blob.
 // For logs in append blob, it results in duplicated logs, which is not ideal.
};

So I am wondering is there a way to only get the appended blob content?

No.


Unless you

  • maintain the byte-index/position per log file where you read last some place (eg using a file/DB/any-persistant-storage) or use Durable Function
  • on change notification, you find the last byte-index/position and read starting from that location using appropriate SDK/API. Here is the REST API (for ADLS Gen2, find the right one if you're using Gen1 or Blob) and some description on how to read a byte range out of a file in blobs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM