简体   繁体   中英

List the azure blobs in descending orders in logic apps

I have thousands of azure blobs in my container. I want to get the list of these azure blobs in my logic apps and then do the filtering. However, I am unable to get all the list of these azure blobs. Probably, there are some limits on how many lists of azure blobs I can get. Getting the latest azure blobs list is critical. So, I was thinking if I cannot get all the list of blob storage, then listing the blob storage in descending order by date so that I can get information on the latest blobs. I don't seem to find how to do this in logic apps. Is there any way that I can configure my logic apps so that I can list the azure blobs in descending order by date?. Any suggestions would be great.

I have not used Logic Apps so I will answer from general storage service usage point of view.

However, I am unable to get all the list of these azure blobs. Probably, there are some limits on how many lists of azure blobs I can get.

Each call to storage service to get the list of blobs will return a maximum of 5000 blobs. If there are more than 5000 blobs, then the storage service also returns a continuation token and you must use that to fetch the next set of blobs. I have not used Logic Apps so I am not sure how you would do it there but you will need to do this somehow ie try listing the blobs. Save the blobs list somewhere and check for continuation token. If you get a continuation token, use that to get next set of blobs. Keep on repeating it till the time you don't get continuation token. Then you will have a list of all blobs.

Is there any way that I can configure my logic apps so that I can list the azure blobs in descending order by date?.

Again, blob storage only returns blobs order by blob name in ascending order. No other kind of server-side sorting is allowed unfortunately. Once you have the list of the blobs, you will need to sort them in Logic App only by blob's created date property.

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